/* =====================================================================
   IconVault design system
   Identity: the icon as a selected object in a design tool. Icons sit on
   construction grids inside a selection frame with corner handles and
   magenta measurement tags. Everything around that stays quiet.
   ===================================================================== */

:root {
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --surface-3: #e6e9ee;
  --ink: #191c24;
  --ink-2: #3a3f4b;
  --muted: #687082;
  --line: #e2e5ea;
  --line-strong: #cdd2da;
  --accent: #2b3bea;
  --accent-hover: #1f2ed4;
  --accent-ink: #ffffff;
  --accent-soft: rgba(43, 59, 234, 0.08);
  --accent-line: rgba(43, 59, 234, 0.28);
  --guide: #e0307a;
  --guide-soft: rgba(224, 48, 122, 0.1);
  --grid-line: rgba(25, 28, 36, 0.06);
  --grid-key: rgba(43, 59, 234, 0.14);

  --success: #12795a;
  --success-soft: rgba(18, 121, 90, 0.1);
  --warning: #9a5b00;
  --warning-soft: rgba(196, 128, 0, 0.12);
  --danger: #c9353d;
  --danger-soft: rgba(201, 53, 61, 0.09);
  --premium: #7a4b00;
  --premium-soft: #fbefd7;

  --r-xs: 6px;
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --radius: var(--r-lg);
  --radius-sm: var(--r-sm);
  --radius-xs: var(--r-xs);

  --shadow-sm: 0 1px 2px rgba(20, 24, 36, 0.06);
  --shadow: 0 1px 2px rgba(20, 24, 36, 0.05), 0 4px 12px rgba(20, 24, 36, 0.05);
  --shadow-lg: 0 12px 40px -8px rgba(20, 24, 36, 0.22), 0 2px 6px rgba(20, 24, 36, 0.06);

  --header-h: 60px;
  --container: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #12141a;
  --surface: #181b22;
  --surface-2: #1f232c;
  --surface-3: #272c36;
  --ink: #e8eaf0;
  --ink-2: #c4c8d2;
  --muted: #8d94a5;
  --line: #262a34;
  --line-strong: #343a47;
  --accent: #7380ff;
  --accent-hover: #8a95ff;
  --accent-ink: #0f1230;
  --accent-soft: rgba(115, 128, 255, 0.12);
  --accent-line: rgba(115, 128, 255, 0.35);
  --guide: #ff5c9e;
  --guide-soft: rgba(255, 92, 158, 0.14);
  --grid-line: rgba(232, 234, 240, 0.05);
  --grid-key: rgba(115, 128, 255, 0.18);
  --success: #3fbf8f;
  --success-soft: rgba(63, 191, 143, 0.12);
  --warning: #e4a845;
  --warning-soft: rgba(228, 168, 69, 0.13);
  --danger: #ff6b72;
  --danger-soft: rgba(255, 107, 114, 0.12);
  --premium: #f0c46c;
  --premium-soft: rgba(240, 196, 108, 0.13);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 18px 50px -10px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: 15px; line-height: 1.55; font-optical-sizing: auto;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.035em; }
h2 { font-size: 22px; }
h3 { font-size: 16px; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
small { font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.section { padding: 56px 0; }
.section--tight { padding: 28px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.t-right { text-align: right; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 200; padding: 8px 14px; border-radius: var(--r-sm); background: var(--ink); color: var(--bg); }
.skip-link:focus { top: 10px; }
.ui-icon { flex: none; display: inline-block; vertical-align: middle; }
.hp, .hp-field { position: absolute !important; left: -9999px !important; }

/* icon glyphs: user SVGs scale to their box and inherit color */
.icon-glyph { display: inline-flex; align-items: center; justify-content: center; color: var(--ink); line-height: 0; }
.icon-glyph svg { width: 100%; height: 100%; display: block; }

/* construction grid used by every icon stage */
.keyline {
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: center;
}

/* selection frame handles + measurement tags (the signature) */
.handle {
  position: absolute; width: 7px; height: 7px; background: var(--surface);
  border: 1.25px solid var(--guide); border-radius: 1.5px; pointer-events: none;
}
.handle--tl { left: -4px; top: -4px; }
.handle--tr { right: -4px; top: -4px; }
.handle--bl { left: -4px; bottom: -4px; }
.handle--br { right: -4px; bottom: -4px; }
.measure {
  position: absolute; font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap;
  padding: 3px 6px; border-radius: 4px; background: var(--guide); color: #fff; font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.measure--w { left: 50%; top: calc(100% + 10px); transform: translateX(-50%); }
.measure--h { top: 50%; left: calc(100% + 10px); transform: translateY(-50%); }

/* ---------- buttons ---------- */
.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-line: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--b-line); background: var(--b-bg); color: var(--b-fg);
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: -0.005em; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-line: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 2px rgba(20,24,60,.18); }
.btn-primary:hover { --b-bg: var(--accent-hover); --b-line: var(--accent-hover); }
.btn-outline:hover { --b-bg: var(--surface-2); }
.btn-ghost { --b-bg: transparent; --b-line: transparent; --b-fg: var(--ink-2); }
.btn-ghost:hover { --b-bg: var(--surface-2); --b-fg: var(--ink); }
.btn-danger { --b-bg: var(--danger); --b-fg: #fff; --b-line: var(--danger); }
.btn-danger:hover { filter: brightness(1.06); }
.btn-danger-text, .btn.btn-danger-text { --b-fg: var(--danger); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn-lg { min-height: 46px; padding: 0 20px; font-size: 15px; border-radius: var(--r); }
.btn-block { width: 100%; }
.btn.is-active, .btn[aria-pressed="true"] { --b-bg: var(--accent-soft); --b-line: var(--accent-line); --b-fg: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-row--tight { gap: 6px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none;
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.link-btn:hover { color: var(--accent); text-decoration: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
  border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn--sm { width: 30px; height: 30px; }
.kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface);
  color: var(--muted); font-family: var(--font); font-size: 11px; font-weight: 600; line-height: 1;
}

/* ---------- chips, badges, status ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: 13px; font-weight: 500; text-decoration: none; transition: border-color .15s, color .15s, background-color .15s;
}
a.chip:hover { border-color: var(--accent-line); color: var(--accent); text-decoration: none; }
.chip--removable { cursor: pointer; background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip--removable input { position: absolute; opacity: 0; pointer-events: none; }
.chip-row, .chip-set { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-radio span {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500;
  transition: all .15s;
}
.chip-radio:hover span { border-color: var(--line-strong); }
.chip-radio input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2);
}
.badge--free { background: var(--success-soft); color: var(--success); }
.badge--premium { background: var(--premium-soft); color: var(--premium); }
.badge--accent { background: var(--accent-soft); color: var(--accent); }
.status {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--published, .status--paid, .status--active { background: var(--success-soft); color: var(--success); }
.status--draft, .status--pending { background: var(--warning-soft); color: var(--warning); }
.status--failed, .status--cancelled, .status--banned { background: var(--danger-soft); color: var(--danger); }
.status--refunded { background: var(--accent-soft); color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; font-size: 17px; letter-spacing: -0.03em; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: block; flex: none; }
.brand-name { line-height: 1; }
.brand img { display: block; max-height: 30px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; height: 34px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav-link.is-active { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; background: none; }
.nav-mobile-account { display: none; }
.header-search {
  position: relative; display: flex; align-items: center; gap: 8px; margin-left: auto;
  width: min(300px, 26vw); height: 36px; padding: 0 8px 0 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--muted);
  cursor: text; transition: border-color .15s, box-shadow .15s;
}
.header-search:hover { border-color: var(--line-strong); }
.header-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; outline: none; }
.header-search input::placeholder { color: var(--muted); }
.header-search input::-webkit-search-cancel-button { display: none; }
.header-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.search-btn { display: none; }
.theme-toggle .theme-toggle__dark, :root[data-theme="dark"] .theme-toggle .theme-toggle__light { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-toggle__dark { display: inline-flex; }
.theme-toggle__light, .theme-toggle__dark { display: inline-flex; }
.nav-toggle { display: none; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 700;
}
.avatar--lg { width: 56px; height: 56px; font-size: 22px; }
.avatar-btn { padding: 2px; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.avatar-btn:hover .avatar { box-shadow: 0 0 0 3px var(--accent-soft); }

/* dropdowns */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 230px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px) scale(.98); transform-origin: top right;
  transition: opacity .14s, transform .14s var(--ease), visibility 0s .14s;
}
.dropdown.is-open .dropdown-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .14s, transform .14s var(--ease); }
.dropdown-menu--wide { min-width: 290px; }
.detail-head__actions .dropdown-menu { left: auto; right: 0; }
.dropdown-menu a, .dropdown-menu button[role="menuitem"] {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-xs);
  background: none; color: var(--ink-2); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button[role="menuitem"]:hover { background: var(--surface-2); color: var(--ink); }
.dropdown-menu a .ui-icon { color: var(--muted); }
.dropdown-menu form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
.dropdown-head { display: flex; flex-direction: column; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.dropdown-head span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.dropdown-note { margin: 0; padding: 10px; color: var(--muted); font-size: 13.5px; }

/* suggestion lists (hero) */
.search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
}
.search-suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-xs); color: var(--ink); font-size: 14px; }
.search-suggest a:hover, .search-suggest a.is-active { background: var(--surface-2); text-decoration: none; }
.search-suggest .icon-glyph { width: 20px; height: 20px; }
.search-suggest small { margin-left: auto; color: var(--muted); }
.search-suggest__all { color: var(--accent) !important; font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-xs) var(--r-xs) !important; margin-top: 4px; }

/* ---------- command palette ---------- */
.palette { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette__backdrop { position: absolute; inset: 0; background: rgba(15, 17, 26, .38); backdrop-filter: blur(3px); animation: fade .15s ease; }
.palette__dialog {
  position: relative; width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  animation: pop .18s var(--ease);
}
.palette__bar { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 58px; border-bottom: 1px solid var(--line); color: var(--muted); margin: 0; }
.palette__bar input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--ink); font: inherit; font-size: 17px; }
.palette__bar input::-webkit-search-cancel-button { display: none; }
.palette__body { overflow-y: auto; padding: 8px; min-height: 120px; }
.palette__group { padding: 6px 0; }
.palette__label { padding: 6px 10px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.palette__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px; padding: 2px; }
.palette__icon {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 10px;
  border-radius: var(--r-sm); color: var(--ink); font-size: 12px; text-align: center; text-decoration: none; border: 1px solid transparent;
}
.palette__icon .icon-glyph { width: 26px; height: 26px; }
.palette__icon span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.palette__icon:hover, .palette__icon.is-active { background: var(--accent-soft); border-color: var(--accent-line); text-decoration: none; }
.palette__row {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--ink); font-size: 14px; text-decoration: none;
}
.palette__row .ui-icon { color: var(--muted); }
.palette__row small { margin-left: auto; color: var(--muted); }
.palette__row:hover, .palette__row.is-active { background: var(--surface-2); text-decoration: none; }
.palette__empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.palette__foot {
  display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px; background: var(--surface);
}
.palette__foot span { display: inline-flex; align-items: center; gap: 4px; }
.palette__foot a { margin-left: auto; font-weight: 600; }
body.palette-open { overflow: hidden; }

/* ---------- flashes & toasts ---------- */
.flash-stack { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.flash {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); font-size: 14px; cursor: pointer;
}
.flash--success { border-color: color-mix(in srgb, var(--success) 30%, var(--line)); }
.flash--success .ui-icon { color: var(--success); }
.flash--error { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.flash--error .ui-icon { color: var(--danger); }
.flash--info .ui-icon { color: var(--accent); }
.alert { padding: 11px 14px; border-radius: var(--r); font-size: 14px; border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 16px; }
.alert--error { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.alert--success { background: var(--success-soft); border-color: transparent; color: var(--success); }
.alert--info { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.toast-region {
  position: fixed; left: 50%; bottom: 24px; z-index: 140; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; border-radius: var(--r);
  background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg);
  pointer-events: auto; animation: toast-in .24s var(--ease);
}
.toast .ui-icon { color: #59d39f; }
:root[data-theme="dark"] .toast .ui-icon { color: var(--success); }
.toast--error .ui-icon { color: #ff8a8f; }
.toast.is-leaving { animation: toast-out .2s ease forwards; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form--row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span:first-child, .field__label {
  font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.4;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px;
  white-space: nowrap; /* the label itself never breaks ("Site URL" stays on one line) */
}
/* a hint moves below the label when there is no room, instead of squeezing it */
.field > span:first-child small, .field__label small { white-space: normal; font-weight: 400; }
/* in rows of fields, inputs line up along the bottom even when one label is taller */
.form-grid > .field, .field-grid > .field { justify-content: space-between; }
.field__label output { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.field__hint, .field small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.field__row { display: flex; gap: 10px; }
.field--inline { flex-direction: row; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: stretch; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: stretch; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="url"], input[type="tel"], input:not([type]),
select, textarea, .input {
  width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; }
select {
  appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23687082' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--muted)); }
input:focus, select:focus, textarea:focus, .input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
/* inputs embedded in composite search fields */
.header-search input, .hero-search input[type="search"], .results-search input, .palette__bar input {
  border: 0 !important; background: none !important; box-shadow: none !important; min-height: 0; padding: 0; border-radius: 0;
}
.input--sm { min-height: 32px; padding: 5px 9px; font-size: 13px; }
.input--xs { min-height: 28px; padding: 3px 8px; font-size: 13px; }
.code-input { font-family: var(--mono); font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input, .check-row input, .filter-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
input[type="range"] { width: 100%; height: 22px; accent-color: var(--accent); background: none; padding: 0; border: 0; min-height: 0; box-shadow: none; }
.inline-input { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.inline-input input { width: 86px; min-height: 32px; padding: 4px 8px; }
.color-input {
  display: flex; align-items: center; gap: 0; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); overflow: hidden;
}
.color-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.color-input input[type="color"] { width: 38px; height: 100%; padding: 6px; border: 0; border-right: 1px solid var(--line); background: none; cursor: pointer; flex: none; }
.color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.color-input input[type="color"]::-moz-color-swatch { border: 0; border-radius: 5px; }
.color-input input[type="text"] { border: 0; min-height: 0; height: 100%; box-shadow: none !important; font-family: var(--mono); font-size: 13px; text-transform: lowercase; }
.color-input:has(input:only-child) { width: 38px; }
.color-input:has(input:only-child) input[type="color"] { border-right: 0; }
.seg-group { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.seg-group--fill { display: flex; }
.seg-group--fill .seg { flex: 1; }
.seg {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 28px; padding: 0 9px;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, color .12s;
}
.seg:hover { color: var(--ink); }
.seg.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }

/* ---------- panels, cards, tables ---------- */
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card--danger, .panel--danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.card-title { font-size: 16px; margin-bottom: 4px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel__head h2 { margin: 0; font-size: 16px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.t-check { width: 40px; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.inline-form--tight { gap: 4px; }
.inline { display: inline; }
.key-reveal { display: flex; gap: 8px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--success-soft); }
.key-reveal code { flex: 1; overflow-x: auto; white-space: nowrap; font-size: 13px; }

/* ---------- section heads ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.025em; }
.section-sub { margin: 6px 0 0; color: var(--muted); max-width: 56ch; }
.section-title { font-size: 22px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--ink-2); }
.link-more::after { content: ""; width: 7px; height: 7px; border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; transform: rotate(45deg); margin-left: 2px; transition: transform .15s; }
.link-more:hover { color: var(--accent); text-decoration: none; }
.link-more:hover::after { transform: translateX(2px) rotate(45deg); }
.page-title { font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 6px; letter-spacing: -0.035em; }
.page-intro { color: var(--muted); font-size: 16px; max-width: 62ch; margin: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 22px 0 18px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs [aria-current] { color: var(--ink); }
.tabbar { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.tabbar__tab {
  position: relative; padding: 0 0 12px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font: inherit; font-size: clamp(18px, 2vw, 22px); font-weight: 600; letter-spacing: -0.02em;
}
.tabbar__tab:hover { color: var(--ink); }
.tabbar__tab.is-active { color: var(--ink); }
.tabbar__tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab { padding: 10px 12px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-active { color: var(--ink); border-color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 64px 0 56px; border-bottom: 1px solid var(--line); background: var(--surface); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 64px; align-items: center; }
.hero-title {
  font-size: clamp(40px, 6vw, 72px); line-height: .98; letter-spacing: -0.045em; font-weight: 600;
  margin: 0 0 20px; max-width: 11ch; font-variation-settings: "opsz" 96;
}
.hero-sub { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 46ch; margin-bottom: 28px; }
.hero-search, .big-search {
  position: relative; display: flex; align-items: center; gap: 10px; max-width: 560px; height: 56px; padding: 0 6px 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--muted);
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-search input[type="search"] { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; box-shadow: none !important; color: var(--ink); font: inherit; font-size: 17px; padding: 0; }
.hero-search .btn { height: 44px; border-radius: var(--r); padding: 0 18px; }
.hero-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 32px; font-size: 13px; }
.hero-suggest .muted { margin-right: 4px; }
.hero-actions { margin-bottom: 36px; }
.hero-facts { display: flex; gap: 0; margin: 0; border-top: 1px solid var(--line); max-width: 560px; }
.hero-facts > div { flex: 0 1 auto; padding: 14px 28px 0 0; }
.hero-facts > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.hero-facts dd { white-space: nowrap; }
.hero-facts dt { font-size: 12.5px; color: var(--muted); }
.hero-facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* hero specimen */
.specimen { display: flex; flex-direction: column; gap: 14px; }
.specimen__canvas {
  position: relative; aspect-ratio: 5 / 4; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background-size: 24px 24px;
}
.specimen__canvas::before, .specimen__canvas::after {
  content: ""; position: absolute; background: var(--grid-key); pointer-events: none;
}
.specimen__canvas::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.specimen__canvas::after { top: 50%; left: 0; right: 0; height: 1px; }
.specimen__frame { position: relative; width: 42%; aspect-ratio: 1; outline: 1.25px solid var(--guide); z-index: 1; }
.specimen__icon { width: 100%; height: 100%; color: var(--ink); transition: opacity .18s; }
.specimen__icon.is-swapping { opacity: 0; }
.specimen.is-drawing .specimen__icon svg * { stroke-dasharray: 120; stroke-dashoffset: 120; animation: draw 1.4s var(--ease) .2s forwards; }
.specimen__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 2px; }
.specimen__name { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; font-size: 16px; }
.specimen__strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.specimen__thumb {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm);
  border: 1px solid transparent; color: var(--ink-2); transition: background-color .12s, border-color .12s, color .12s;
}
.specimen__thumb .icon-glyph { width: 52%; height: 52%; color: inherit; }
.specimen__thumb:hover { background: var(--surface-2); color: var(--ink); }
.specimen__thumb.is-active { border-color: var(--guide); color: var(--ink); background: var(--guide-soft); }

/* ---------- categories ---------- */
.category-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
}
.category-card {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 18px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: background-color .15s;
}
.category-card:hover { background: var(--surface-2); text-decoration: none; }
.category-card__icon {
  width: 40px; height: 40px; padding: 9px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink);
  transition: background-color .15s, color .15s;
}
.category-card:hover .category-card__icon { background: var(--accent); color: var(--accent-ink); }
.category-card__name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.category-card__count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.category-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.category-row {
  display: grid; grid-template-columns: 48px minmax(0, 1.2fr) minmax(0, 1fr) 100px; align-items: center; gap: 20px;
  padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.category-row:last-child { border-bottom: 0; }
.category-row:hover { background: var(--surface-2); text-decoration: none; }
.category-row__icon { width: 48px; height: 48px; padding: 11px; border-radius: var(--r); background: var(--surface-2); }
.category-row:hover .category-row__icon { background: var(--accent); color: var(--accent-ink); }
.category-row__text { display: flex; flex-direction: column; min-width: 0; }
.category-row__text .muted { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-row__preview { display: flex; gap: 14px; color: var(--ink-2); }
.category-row__preview .icon-glyph { width: 22px; height: 22px; color: var(--ink-2); }
.category-row__count { text-align: right; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* ---------- icon grid & cards ---------- */
.icon-grid { --tile: 168px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); gap: 14px; }
.icon-grid--shelf { --tile: 150px; }
[data-density="s"] .icon-grid { --tile: 118px; gap: 10px; }
[data-density="l"] .icon-grid { --tile: 220px; gap: 18px; }
.icon-card { position: relative; min-width: 0; }
.icon-card__tile {
  position: relative; aspect-ratio: 1; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line); transition: border-color .15s, background-color .15s;
}
.icon-card__preview { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: inherit; color: var(--ink); }
.icon-card__preview .icon-glyph { width: 30%; height: 30%; transition: transform .25s var(--ease); }
[data-density="s"] .icon-card__preview .icon-glyph { width: 34%; height: 34%; }
.icon-card__frame { position: absolute; inset: 22%; outline: 1.25px solid var(--guide); opacity: 0; transition: opacity .15s, inset .2s var(--ease); pointer-events: none; }
.icon-card__frame i { position: absolute; width: 6px; height: 6px; background: var(--surface); border: 1.25px solid var(--guide); border-radius: 1.5px; }
.icon-card__frame i:nth-child(1) { left: -3.5px; top: -3.5px; }
.icon-card__frame i:nth-child(2) { right: -3.5px; top: -3.5px; }
.icon-card__frame i:nth-child(3) { left: -3.5px; bottom: -3.5px; }
.icon-card__frame i:nth-child(4) { right: -3.5px; bottom: -3.5px; }
.icon-card__badge { position: absolute; left: 8px; top: 8px; height: 20px; font-size: 11px; }
.fav-btn {
  position: absolute; right: 6px; top: 6px; z-index: 2; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer;
  opacity: 0; transition: opacity .15s, color .15s, background-color .15s, transform .15s;
}
.fav-btn:hover { background: var(--surface-2); color: var(--ink); }
.fav-btn.is-active { opacity: 1; color: var(--guide); }
.fav-btn.is-active svg { fill: currentColor; }
.is-pop { animation: pop-heart .32s var(--ease); }
.icon-card__actions {
  position: absolute; left: 6px; right: 6px; bottom: 6px; z-index: 2; display: flex; gap: 4px;
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .18s var(--ease);
}
.card-action {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: none; box-shadow: var(--shadow-sm);
}
.card-action:first-child { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.card-action:hover { text-decoration: none; filter: brightness(1.08); }
.card-action--icon { flex: 0 0 30px; padding: 0; }
.icon-card:hover .icon-card__tile, .icon-card:focus-within .icon-card__tile { border-color: var(--line-strong); }
.icon-card:hover .icon-card__frame, .icon-card:focus-within .icon-card__frame { opacity: 1; inset: 26% 26% 30%; }
.icon-card:hover .icon-card__preview .icon-glyph, .icon-card:focus-within .icon-card__preview .icon-glyph { transform: translateY(-7%) scale(.94); }
.icon-card:hover .icon-card__actions, .icon-card:focus-within .icon-card__actions,
.icon-card:hover .fav-btn, .icon-card:focus-within .fav-btn { opacity: 1; transform: none; }
.icon-card__meta { padding: 9px 2px 0; min-width: 0; }
.icon-card__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; }
.icon-card__name:hover { color: var(--accent); text-decoration: none; }
.icon-card__sub { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 1px; }
.icon-card__sub span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-card__dl { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; flex: none; }
[data-density="s"] .icon-card__sub { display: none; }
@media (hover: none) {
  .icon-card__actions, .fav-btn { opacity: 1; transform: none; }
  .icon-card__actions .card-action span { display: none; }
  .icon-card__actions { left: auto; }
  .card-action { flex: 0 0 30px; padding: 0; }
  .icon-card__preview .icon-glyph { transform: translateY(-8%); }
}
.is-editable .grid-item, .grid-item { position: relative; }
.collection-item { position: relative; min-width: 0; }
.collection-item__remove { position: absolute; left: 6px; top: 6px; z-index: 3; margin: 0; }
.collection-item__remove .icon-btn { width: 28px; height: 28px; border-color: var(--line); background: var(--surface); color: var(--danger); }
.collection-item__remove .icon-btn:hover { background: var(--danger-soft); }

/* skeletons */
.skeleton, .skeleton-line {
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 40%, var(--surface-2) 80%);
  background-size: 300% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r-xs);
}
.skeleton-line { display: block; height: 10px; margin: 6px 0; }
.skeleton-line--short { width: 55%; }
.skeleton-card .skeleton-tile { aspect-ratio: 1; border-radius: var(--r); }
.skeleton-card .skeleton-line { height: 9px; margin-top: 12px; width: 70%; }
.skeleton-card .skeleton-line + .skeleton-line { width: 40%; margin-top: 6px; }

/* ---------- browse ---------- */
.browse-head { padding: 34px 0 26px; border-bottom: 1px solid var(--line); background: var(--surface); }
.browse { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 36px; padding-top: 28px; padding-bottom: 72px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 22px; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; margin: 0; }
.filters__head { display: flex; align-items: center; justify-content: space-between; }
.filters__head h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.filters__done { display: none; }
.filter-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.filter-group legend { padding: 0; margin-bottom: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.filter-scroll { display: flex; flex-direction: column; gap: 1px; max-height: 320px; overflow-y: auto; scrollbar-width: thin; margin: 0 -8px; padding: 0 8px; }
.filter-option {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: var(--r-xs);
  font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.filter-option:hover { background: var(--surface-2); color: var(--ink); }
.filter-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filter-option__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-option:has(input:checked) { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.filter-option:has(input:focus-visible) { outline: 2px solid var(--accent); }
.count { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.swatch-set { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatch__dot { display: block; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: box-shadow .12s; }
.swatch__dot--any { background: conic-gradient(from 45deg, var(--surface-2) 0 25%, var(--line-strong) 0 50%, var(--surface-2) 0 75%, var(--line-strong) 0) !important; background-size: 8px 8px; }
.swatch input:checked + .swatch__dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.swatch input:focus-visible + .swatch__dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.results { min-width: 0; }
.results-bar {
  position: sticky; top: var(--header-h); z-index: 20; display: flex; gap: 10px; align-items: center;
  padding: 12px 0; margin-top: -12px; background: var(--bg);
}
.results-search {
  position: relative; flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}
.results-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.results-search input { flex: 1; min-width: 0; border: 0; height: 100%; padding: 0; background: none; box-shadow: none !important; font-size: 15px; }
.sort-select select { height: 44px; min-width: 150px; border-radius: var(--r); }
.filters-toggle { display: none; height: 44px; }
.density { display: inline-flex; padding: 3px; gap: 2px; height: 44px; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
.density__opt { width: 34px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
.density__opt:hover { color: var(--ink); }
.density__opt.is-active { background: var(--surface-2); color: var(--ink); }
.results-summary { margin: 6px 0 18px; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
[data-results] { transition: opacity .15s; }
[data-results].is-loading { opacity: .55; }
.load-more { display: flex; justify-content: center; padding: 32px 0 0; }
.load-more.is-loading .btn { pointer-events: none; color: transparent; position: relative; }
.load-more.is-loading .btn::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; }
.grid-sentinel { height: 1px; }

/* empty / error states */
.empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 56px 24px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface);
}
.empty-state h2 { margin: 6px 0 0; font-size: 19px; }
.empty-state p { margin: 0 0 8px; color: var(--muted); max-width: 44ch; }
.empty-state__icon, .empty-state > .ui-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; padding: 14px;
  border-radius: 50%; background: var(--surface-2); color: var(--muted); box-sizing: border-box;
}
.empty-state .chip-row { justify-content: center; margin-bottom: 8px; }
.empty-state--sm { padding: 28px 16px; }
.error-page { text-align: center; padding: 96px 0; }
.error-code { font-size: clamp(80px, 14vw, 160px); line-height: 1; font-weight: 600; letter-spacing: -0.06em; color: var(--surface-3); margin: 0; font-variation-settings: "opsz" 96; }
.error-page .hero-search, .error-page .big-search { margin: 24px auto; text-align: left; }
.error-page .page-intro { margin: 0 auto; }
.keyline--small {
  position: relative; width: 168px; height: 168px; margin: 0 auto 28px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-lg); background-size: 14px 14px;
}
.keyline--small span { font-size: 40px; font-weight: 600; letter-spacing: -0.04em; color: var(--ink); outline: 1.25px dashed var(--guide); outline-offset: 10px; padding: 0 4px; }
.keyline--small::after { content: "missing"; position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: #fff; background: var(--guide); padding: 2px 6px; border-radius: 4px; }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 28px; }
.page-link { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; }
.page-link:hover { border-color: var(--line-strong); text-decoration: none; }
.page-link.is-current, .page-link.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.page-gap { padding: 0 6px; color: var(--muted); align-self: center; }

/* ---------- icon detail ---------- */
.detail-page { padding-bottom: 40px; }
.detail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.detail-title { font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.04em; margin: 0 0 6px; font-variation-settings: "opsz" 96; }
.detail-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0; color: var(--muted); font-size: 14px; }
.detail-sub a { color: var(--ink-2); }
.sep { display: none; }
.detail-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fav-toggle.is-active { --b-bg: var(--guide-soft); --b-line: color-mix(in srgb, var(--guide) 35%, transparent); --b-fg: var(--guide); }
.fav-toggle.is-active svg { fill: currentColor; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.detail-preview { display: flex; flex-direction: column; gap: 22px; min-width: 0; position: sticky; top: calc(var(--header-h) + 20px); }
.stage { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.stage__canvas {
  position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background-size: 20px 20px; transition: background-color .2s;
}
.stage__canvas.is-light { background-color: #ffffff; background-image: none; }
.stage__canvas.is-dark { background-color: #14161d; background-image: none; }
.stage__canvas.is-dark .stage__icon .icon-glyph { color: #e8eaf0; }
.stage__canvas.is-light .stage__icon .icon-glyph { color: #191c24; }
.stage__sel { position: relative; outline: 1.25px solid var(--guide); outline-offset: 10px; }
.stage__icon { display: flex; align-items: center; justify-content: center; width: 50%; height: 50%; min-width: 16px; transition: width .2s var(--ease), height .2s var(--ease); }
.stage__icon .icon-glyph { width: 100%; height: 100%; }
.stage__sel .handle--tl { left: -14px; top: -14px; }
.stage__sel .handle--tr { right: -14px; top: -14px; }
.stage__sel .handle--bl { left: -14px; bottom: -14px; }
.stage__sel .handle--br { right: -14px; bottom: -14px; }
.stage__sel .measure--w { top: calc(100% + 20px); }
.stage__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.size-strip { display: flex; align-items: flex-end; gap: 18px; padding: 0 4px; }
.size-strip__cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.size-strip__cell small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.about { display: flex; flex-direction: column; gap: 16px; }
.detail-desc { font-size: 15.5px; color: var(--ink-2); max-width: 68ch; margin: 0; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.facts > div { padding: 12px 14px; min-width: 0; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facts dd a { color: var(--ink); }
.license-note { font-size: 13.5px; color: var(--muted); margin: 0; max-width: 72ch; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.inspector { display: flex; flex-direction: column; gap: 14px; }
.inspector .panel { padding: 0; overflow: hidden; }
.inspector .panel__head { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--line); }
.insp { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.insp:last-child { border-bottom: 0; }
.insp--flat { padding: 14px 0 0; border: 0; }
.insp__title { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.field--range { gap: 2px; }
.bg-options { display: grid; grid-template-columns: auto auto 1fr; gap: 10px 12px; align-items: center; }
.bg-options[hidden] { display: none; }
.bg-options .field--inline { grid-column: 1 / -1; }
.bg-options .field--inline input { flex: 1; }
.downloads { padding: 16px 18px 18px !important; }
.downloads .panel__head { padding: 0 0 12px !important; border: 0 !important; }
.btn-download { flex-direction: row; justify-content: flex-start; gap: 12px; height: 56px; padding: 0 18px; font-size: 16px; }
.btn-download small { margin-left: auto; font-weight: 500; font-size: 12.5px; opacity: .75; }
.download-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.copy-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.unlock-card { padding: 18px; border-radius: var(--r-lg); background: var(--premium-soft); color: var(--ink); }
.unlock-card h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--premium); }
.unlock-card p { color: var(--ink-2); font-size: 14px; }

/* quick preview modal */
.modal { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 17, 26, .42); backdrop-filter: blur(3px); animation: fade .15s ease; }
.modal__dialog {
  position: relative; width: min(760px, 100%); display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  animation: pop .2s var(--ease);
}
.modal__close { position: absolute; right: 10px; top: 10px; z-index: 2; }
.preview-stage { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--line); background-size: 20px 20px; }
.preview-stage .icon-glyph { width: 40%; height: 40%; }
.preview-info { display: flex; flex-direction: column; padding: 28px 24px 24px; }
.preview-info h2 { font-size: 24px; margin: 0 0 4px; padding-right: 32px; letter-spacing: -0.03em; }
.preview-sizes { display: flex; align-items: flex-end; gap: 16px; margin: 18px 0 auto; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); }
.preview-info .btn-row { margin-top: 20px; }
.preview-info .btn-row .btn { flex: 1; }
body.modal-open { overflow: hidden; }

/* ---------- packs ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pack-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  color: var(--ink); overflow: hidden; text-decoration: none; transition: border-color .15s;
}
.pack-card:hover { border-color: var(--line-strong); text-decoration: none; }
.pack-card__preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pack-card__preview .icon-glyph { aspect-ratio: 1; padding: 26%; width: 100%; }
.pack-card:hover .pack-card__preview .icon-glyph { color: var(--accent); }
.pack-card__body { padding: 16px 18px 18px; }
.pack-card__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pack-card__title h3 { margin: 0; font-size: 16px; }
.pack-card__body p { margin: 4px 0 0; font-size: 13.5px; }
.pack-hero { padding: 26px 0 40px; border-bottom: 1px solid var(--line); background: var(--surface); }
.pack-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.pack-hero .breadcrumbs { margin-top: 0; }
.fact-row { display: flex; flex-wrap: wrap; gap: 0; margin: 22px 0 0; border-top: 1px solid var(--line); }
.fact-row > div { padding: 12px 22px 0 0; margin-right: 22px; }
.fact-row > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.fact-row dt { font-size: 12.5px; color: var(--muted); }
.fact-row dd { margin: 2px 0 0; font-weight: 600; }
.pack-buy { display: flex; flex-direction: column; gap: 10px; }
.pack-buy__title { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; margin: 0; }
.pack-buy .muted { font-size: 14px; margin: 0 0 6px; }
.price-tag { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }

/* ---------- CTA & showcase ---------- */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: 36px 40px; border-radius: var(--r-lg); background: var(--ink); color: var(--bg);
}
.cta-band h2 { color: inherit; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.03em; margin-bottom: 8px; }
.cta-band p { color: color-mix(in srgb, var(--bg) 72%, transparent); margin: 0; max-width: 54ch; }
.cta-band .btn-primary { --b-bg: var(--bg); --b-fg: var(--ink); --b-line: var(--bg); box-shadow: none; }
.cta-band .btn-primary:hover { --b-bg: var(--surface-2); }
.showcase { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.showcase__copy h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.035em; }
.showcase__copy p { color: var(--muted); font-size: 16px; max-width: 46ch; }
.check-points { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; }
.check-points li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.check-points .ui-icon { color: var(--accent); }
.showcase__board { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.showcase__row { display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; padding: 26px 22px; }
.showcase__row + .showcase__row { border-top: 1px solid var(--line); }
.showcase__cell { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.showcase__cell small { color: var(--guide); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.showcase__row--colors { align-items: center; }
.showcase__swatch .icon-glyph { width: 30px; height: 30px; color: inherit; }
.showcase__tile { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; }
.showcase__tile .icon-glyph { width: 26px; height: 26px; color: inherit; }
.showcase__tile--ink { background: var(--ink); color: var(--bg); border-radius: 12px; }
.showcase__tile--accent { background: var(--accent); color: var(--accent-ink); border-radius: 16px; }
.showcase__tile--soft { background: var(--accent-soft); color: var(--accent); border-radius: 8px; }
.showcase__tile--round { background: var(--surface-2); color: var(--ink); border-radius: 50%; }

/* ---------- account ---------- */
.account { display: grid; grid-template-columns: 228px minmax(0, 1fr); column-gap: 40px; align-items: start; padding-top: 36px; }
.account > * { grid-column: 2; margin-bottom: 22px; }
.account > .account-nav { grid-column: 1; grid-row: 1 / span 30; position: sticky; top: calc(var(--header-h) + 24px); margin: 0; }
.account > .page-title { margin-bottom: 18px; }
.account-nav { display: flex; flex-direction: column; gap: 2px; }
.account-nav__user { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); min-width: 0; }
.account-nav__user > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.account-nav__user strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-nav__user small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-nav__link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.account-nav__link .ui-icon { color: var(--muted); }
.account-nav__link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.account-nav__link.is-active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.account-nav__link.is-active .ui-icon { color: var(--accent); }
.account-nav__link--muted { margin-top: 10px; color: var(--muted); }
.account__head, .account-head { display: flex; align-items: center; gap: 16px; }
.account__head .avatar { width: 56px; height: 56px; font-size: 22px; }
.account__head .page-title { margin: 0; }
.account__head p { margin: 2px 0 0; }
.account-head--compact { margin-bottom: 8px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; color: var(--ink); text-decoration: none; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat:hover { background: var(--surface-2); text-decoration: none; }
.stat strong { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13.5px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.settings-grid__wide { grid-column: 1 / -1; }
.history { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.history__item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 90px; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.history__item:last-child { border-bottom: 0; }
.history__item:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.history__glyph { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 10px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); }
.history__name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history__item time { text-align: right; font-size: 13px; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.collection-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; transition: border-color .15s; }
.collection-card:hover { border-color: var(--line-strong); }
.collection-card__preview { display: grid; grid-template-columns: repeat(4, 1fr); padding: 16px; gap: 0; background: var(--surface-2); border-bottom: 1px solid var(--line); min-height: 110px; color: var(--ink); }
.collection-card__preview .icon-glyph { aspect-ratio: 1; padding: 26%; width: 100%; }
.collection-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; }
.collection-card__body h3, .collection-card__body a { margin: 0; color: var(--ink); font-weight: 600; }
.collection-card__actions { display: flex; gap: 6px; padding: 0 16px 16px; }
.create-collection { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.collection-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.edit-details summary, .inline-edit summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.check-list { display: flex; flex-direction: column; gap: 1px; max-height: 260px; overflow: auto; padding: 2px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-xs); font-size: 14px; cursor: pointer; }
.check-row:hover { background: var(--surface-2); }
.check-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collection-quick { display: flex; gap: 6px; padding: 8px 4px 4px; margin-top: 4px; border-top: 1px solid var(--line); }
.collection-quick .input--sm { flex: 1; min-width: 0; }

/* ---------- auth ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.auth__art {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 24px; padding: 48px;
  border-right: 1px solid var(--line); background: var(--surface);
}
.auth__art .keyline { display: grid; grid-template-columns: repeat(3, 1fr); width: min(360px, 100%); border: 1px solid var(--line); border-radius: var(--r-lg); background-size: 20px 20px; }
.auth__art .keyline .icon-glyph { aspect-ratio: 1; padding: 34%; width: 100%; }
.auth__art .keyline .icon-glyph:nth-child(5) { outline: 1.25px solid var(--guide); outline-offset: -14px; background: var(--guide-soft); }
.auth__art p { color: var(--muted); font-size: 15px; text-align: center; max-width: 30ch; }
.auth__panel { display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 440px; margin: 0 auto; padding: 48px 24px; }
.auth__panel .page-title { font-size: 30px; }
.auth__panel .page-intro { margin-bottom: 26px; font-size: 15px; }
.auth__switch { margin-top: 18px; color: var(--muted); font-size: 14px; text-align: center; }
.auth-wrap, .auth-card { max-width: 420px; margin: 48px auto; }

/* ---------- prose, docs, pricing, misc ---------- */
.prose { max-width: 72ch; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.prose h2 { margin-top: 1.8em; font-size: 22px; color: var(--ink); }
.prose h3 { margin-top: 1.4em; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
pre.code, .code {
  display: block; padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; line-height: 1.6; overflow-x: auto; color: var(--ink);
}
:not(pre) > code { padding: 1px 6px; border-radius: 5px; background: var(--surface-2); font-size: .88em; }
.license-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 28px; }
.license-grid .card { padding: 18px; }
.license-grid h3 { font-size: 15px; }
.license-grid p { font-size: 14px; color: var(--muted); margin: 0; }
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pricing__plan { display: flex; flex-direction: column; gap: 10px; padding: 26px; }
.pricing__plan h2 { font-size: 18px; margin: 0; }
.pricing__price { font-size: 38px; font-weight: 600; letter-spacing: -0.04em; margin: 0; }
.pricing__price small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.pricing__plan p:not(.pricing__price) { color: var(--muted); flex: 1; }
.pricing__plan--accent { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.docs__toc { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.docs__toc a { padding: 6px 10px; border-radius: var(--r-xs); color: var(--ink-2); }
.docs__toc a:hover { background: var(--surface-2); text-decoration: none; }
.docs__body { min-width: 0; }
.method { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 5px; background: var(--success-soft); color: var(--success); font-size: 11.5px; font-weight: 700; margin-right: 6px; }
.post { padding: 20px 0; border-bottom: 1px solid var(--line); }
.post h2 { font-size: 20px; }
.ad-slot { margin: 24px auto; text-align: center; }
.ad-slot--header { margin: 12px auto 0; }

/* ---------- footer ---------- */
.site-footer { margin-top: 72px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding-top: 48px; padding-bottom: 40px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 38ch; margin: 14px 0 16px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 9px; }
.footer-title { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 4px; letter-spacing: 0; }
.footer-grid nav a { color: var(--muted); font-size: 14px; width: fit-content; }
.footer-grid nav a:hover { color: var(--ink); text-decoration: none; }
.social-links { display: flex; gap: 4px; }
.social-links a { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: var(--r-sm); color: var(--muted); }
.social-links a:hover { background: var(--surface-2); color: var(--ink); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.theme-switch { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.theme-switch__opt { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.theme-switch__opt.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- motion ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop-heart { 40% { transform: scale(1.22); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .specimen.is-drawing .specimen__icon svg * { stroke-dashoffset: 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .main-nav .nav-link:nth-child(n+5) { display: none; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero-title { max-width: 14ch; }
  .specimen { max-width: 620px; }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .detail-preview { position: static; }
  .showcase { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .pack-hero__inner { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; }
  .docs__toc { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  :root { --header-h: 56px; }
  .header-inner { gap: 10px; }
  .main-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 24px; overflow-y: auto;
    background: var(--bg); visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity .16s, transform .16s var(--ease), visibility 0s .16s;
  }
  .main-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .16s, transform .16s var(--ease); }
  .main-nav .nav-link, .main-nav .nav-link:nth-child(n+5) { display: flex; height: 48px; font-size: 17px; padding: 0 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav .nav-link.is-active { box-shadow: none; color: var(--accent); }
  .nav-mobile-account { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
  .header-search { display: none; }
  .search-btn, .nav-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .hide-sm { display: none !important; }
  .browse { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .filters {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 90; max-height: 82vh; padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-lg);
    transform: translateY(105%); transition: transform .26s var(--ease); visibility: hidden;
  }
  .filters.is-open { transform: none; visibility: visible; }
  .filters__done { display: flex; position: sticky; bottom: 0; }
  body.filters-open::after { content: ""; position: fixed; inset: 0; z-index: 80; background: rgba(15, 17, 26, .4); }
  .filters-toggle { display: inline-flex; }
  .density { display: none; }
  .results-bar { flex-wrap: wrap; }
  .results-search { flex-basis: 100%; }
  .sort-select { flex: 1; }
  .sort-select select { width: 100%; }
  .account { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }
  .account > *, .account > .account-nav { grid-column: 1; grid-row: auto; position: static; }
  .account-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; margin-bottom: 18px !important; scrollbar-width: none; }
  .account-nav__user, .account-nav__link--muted { display: none; }
  .account-nav__link { white-space: nowrap; }
  .settings-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__art { display: none; }
  .modal__dialog { grid-template-columns: 1fr; }
  .preview-stage { aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid var(--line); }
  .category-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .category-row__preview { display: none; }
}
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .hero { padding: 36px 0 40px; }
  .hero-sub { font-size: 16px; }
  .hero-search { height: 52px; }
  .hero-search .btn { display: none; }
  .hero-facts dd { font-size: 15px; white-space: normal; }
  .hero-facts > div { padding-right: 14px; }
  .hero-facts > div + div { padding-left: 14px; }
  .specimen__strip { grid-template-columns: repeat(6, 1fr); }
  .specimen__strip .specimen__thumb:nth-child(n+7) { display: none; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .category-card { grid-template-columns: auto 1fr; padding: 14px; gap: 10px; }
  .category-card__count { grid-column: 2; margin-top: -10px; }
  .category-card__icon { grid-row: span 2; }
  .icon-grid { --tile: 104px; gap: 10px; }
  .icon-grid--shelf { --tile: 104px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .tabbar { gap: 16px; width: 100%; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > div:nth-child(3) { border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .detail-head { align-items: flex-start; }
  .detail-head__actions .btn { flex: 1; }
  .detail-head__actions { width: 100%; }
  .detail-head__actions .dropdown { flex: 1; display: flex; }
  .stage__canvas { aspect-ratio: 1; }
  .stat-row { grid-template-columns: 1fr 1fr 1fr; }
  .stat { padding: 14px; }
  .stat strong { font-size: 22px; }
  .history__item { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .history__item time { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cta-band { padding: 28px 22px; }
  .palette { padding: 0; align-items: stretch; }
  .palette__dialog { max-height: none; height: 100%; border-radius: 0; border: 0; }
  .palette__foot span { display: none; }
  .toast-region { bottom: 16px; }
}

/* theme icon pairs used in the admin top bar */
.theme-icon-dark, :root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: inline-flex; }
.theme-icon-light { display: inline-flex; }
@media (max-width: 720px) { .hero-actions .btn { flex: 1; } }

/* ---------- verification code screens (login code, password reset) ---------- */
.verify-wrap {
  display: flex; justify-content: center; align-items: flex-start; padding: 56px 16px 80px;
  min-height: calc(100vh - var(--header-h) - 200px);
  background-image: radial-gradient(circle at 50% 0, var(--accent-soft), transparent 420px);
}
.verify-card {
  width: min(440px, 100%); padding: 18px 28px 26px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.verify-card__bar { display: flex; align-items: center; justify-content: space-between; margin: 0 -10px 6px; }
.verify-card__secure { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--success); }
.verify-badge { display: flex; justify-content: center; margin: 8px 0 18px; }
.verify-badge span {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px;
  border-radius: 18px; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 10px var(--accent-soft), 0 10px 24px -8px var(--accent);
}
.verify-title { font-size: 24px; letter-spacing: -0.03em; margin: 0 0 8px; }
.verify-intro { color: var(--muted); font-size: 14.5px; line-height: 1.55; max-width: 34ch; margin: 0 auto 22px; }
.verify-intro strong { color: var(--ink); font-weight: 600; }
.verify-error { text-align: left; margin-bottom: 14px; }
.verify-form { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp input {
  width: 100%; aspect-ratio: 52 / 60; min-height: 0; padding: 0; text-align: center;
  font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface-2);
  caret-color: var(--accent); transition: border-color .15s, background-color .15s, box-shadow .15s, transform .15s;
}
.otp input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); transform: translateY(-1px); }
.otp input.is-filled { background: var(--surface); border-color: var(--ink-2); }
.otp.is-error input { border-color: var(--danger); background: var(--danger-soft); }
.otp.is-error { animation: otp-shake .38s ease; }
.otp.is-success input { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.otp-fallback { text-align: center; font-size: 20px; letter-spacing: .3em; }
.otp-timer { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.otp-timer strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.otp-timer.is-low strong { color: var(--warning); }
.otp-timer.is-expired, .otp-timer.is-expired strong { color: var(--danger); }
.verify-trust { justify-content: center; font-size: 13.5px; }
.verify-btn { gap: 10px; }
.verify-btn svg { transition: transform .2s var(--ease); }
.verify-btn:hover svg { transform: translateX(3px); }
.verify-form.is-busy .verify-btn { pointer-events: none; opacity: .75; }
.verify-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--muted); font-size: 12.5px; }
.verify-divider::before, .verify-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.verify-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.verify-alt form { margin: 0; }
.verify-alt .btn { font-size: 13px; font-weight: 600; }
.verify-note { margin: 16px 0 0; font-size: 12.5px; color: var(--muted); }
@keyframes otp-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* reset progress + password meter */
.steps-mini { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 20px; counter-reset: s; }
.steps-mini li { flex: 1; counter-increment: s; font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 8px; border-top: 3px solid var(--line); }
.steps-mini li::before { content: counter(s) ". "; }
.steps-mini .is-done { color: var(--success); border-color: var(--success); }
.steps-mini .is-current { color: var(--ink); border-color: var(--accent); }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: -8px; }
.pw-meter span { height: 4px; border-radius: 99px; background: var(--line); transition: background-color .2s; }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--warning); }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: var(--success); }
.pw-meter[data-score="4"] span { background: var(--success); }

@media (max-width: 480px) {
  .verify-wrap { padding-top: 24px; }
  .verify-card { padding: 14px 18px 22px; border-radius: 16px; }
  .otp { gap: 6px; }
  .otp input { font-size: 20px; border-radius: 10px; }
  .verify-alt { grid-template-columns: 1fr; }
}

/* pack checkout */
.pay-options { display: flex; flex-direction: column; gap: 8px; }
.pay-options form { margin: 0; }
.pay-btn--paypal.btn-outline { --b-bg: #ffc439; --b-line: #ffc439; --b-fg: #111; }
.pay-btn--paypal.btn-outline:hover { --b-bg: #f2b52d; }
.pay-note { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }

/* form buttons keep their natural width unless they ask for full width */
.form > .btn:not(.btn-block) { align-self: flex-start; }

/* premium account */
.premium-hero { padding: 40px 0 48px; border-bottom: 1px solid var(--line); background: var(--surface); }
.premium-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; }
.premium-hero .badge { margin-bottom: 14px; }
.premium-hero .page-intro { margin-bottom: 22px; }
.premium-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); }
.premium-card__price { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -0.035em; }
.premium-card__price small { display: block; font-size: 13.5px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.premium-card__state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--success); }
.premium-card p { margin: 0; }
.premium-upsell { display: block; padding: 12px 14px; border-radius: var(--r); background: var(--premium-soft); color: var(--ink); font-size: 13.5px; text-decoration: none; }
.premium-upsell strong { display: block; color: var(--premium); }
.premium-upsell:hover { text-decoration: none; filter: brightness(.98); }
@media (max-width: 900px) { .premium-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* homepage search with "search in" dropdown */
.hero-search--scoped { padding: 0 6px 0 6px; gap: 0; }
.hero-search__field { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; height: 100%; padding: 0 12px; }
.hero-search--scoped .btn { gap: 8px; }
.scope { position: relative; flex: none; height: 44px; }
.scope__btn {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 14px; border-radius: var(--r);
  background: var(--surface-2); color: var(--ink); font-size: 14.5px; font-weight: 600; cursor: pointer; list-style: none; user-select: none;
  white-space: nowrap; transition: background-color .15s;
}
.scope__btn::-webkit-details-marker { display: none; }
.scope__btn:hover, .scope[open] .scope__btn { background: var(--surface-3); }
.scope__btn .ui-icon { color: var(--muted); transition: transform .15s; }
.scope[open] .scope__btn .ui-icon { transform: rotate(180deg); }
.scope__menu {
  position: absolute; left: 0; top: calc(100% + 10px); z-index: 45; width: 220px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
}
.scope__group { margin: 6px 8px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.scope__group + .scope__opt { margin-top: 0; }
.scope__menu .scope__group:not(:first-child) { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.scope__opt { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-xs); font-size: 14px; cursor: pointer; color: var(--ink-2); }
.scope__opt:hover { background: var(--surface-2); color: var(--ink); }
.scope__opt input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
.scope__opt:has(input:checked) { color: var(--ink); font-weight: 600; }
.hero-suggest .muted { font-weight: 500; }
@media (max-width: 720px) {
  .scope__btn span { max-width: 64px; overflow: hidden; text-overflow: ellipsis; }
  .hero-search__field { padding: 0 8px; }
  .hero-search__field .ui-icon { display: none; }
  .hero-search--scoped .btn { display: inline-flex; width: 44px; padding: 0; }
  .hero-search--scoped .btn span { display: none; }
}
.download-buttons:has(.svg-locked) { grid-template-columns: 1fr 1fr; }
.svg-locked { color: var(--muted); }
.svg-locked .ui-icon { color: var(--premium); }
.downloads .premium-upsell { margin-top: 10px; }

/* stickers, animated icons, illustrations */
.icon-card[data-kind="sticker"] .icon-card__preview .icon-glyph { width: 52%; height: 52%; }
.icon-card[data-kind="animated"] .icon-card__preview .icon-glyph { width: 56%; height: 56%; }
.icon-card[data-kind="illustration"] .icon-card__preview .icon-glyph { width: 82%; height: 72%; }
.icon-card[data-kind="illustration"] .icon-card__frame, .icon-card[data-kind="sticker"] .icon-card__frame, .icon-card[data-kind="animated"] .icon-card__frame { display: none; }
.icon-glyph--anim img { width: 100%; height: 100%; object-fit: contain; display: block; }
.anim-panel { padding: 0 0 16px !important; }
.anim-panel > .btn, .anim-panel > p { margin: 12px 18px 0; width: auto; }
.anim-panel__stage { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; background-size: 16px 16px; }
.anim-panel__stage img { width: 46%; height: auto; max-height: 90%; object-fit: contain; }

/* header without search bar: actions sit on the right */
.header-actions { margin-left: auto; }
.about-intro { display: flex; gap: 16px; align-items: flex-start; }
.about-intro__img { flex: none; width: 72px; height: 72px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.about-intro__title { font-size: 17px; margin: 2px 0 6px; letter-spacing: -0.01em; }
@media (max-width: 520px) { .about-intro__img { width: 56px; height: 56px; padding: 9px; } }
.lang-switch { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.lang-switch a { color: var(--muted); }
.lang-switch a:hover { color: var(--ink); text-decoration: none; }
.lang-switch a.is-active { color: var(--ink); font-weight: 600; }
:lang(hi), :lang(zh-CN) { font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Devanagari", "Microsoft YaHei", "PingFang SC", sans-serif; }
.related-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.letter-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 18px; }
.letter-nav a { min-width: 32px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.letter-nav a:hover { border-color: var(--line-strong); text-decoration: none; }
.letter-nav a.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tag-cloud { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.tag-cloud__item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: 14px; }
.tag-cloud__item:hover { border-color: var(--accent-line); color: var(--accent); text-decoration: none; }
.tag-cloud__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-cloud__item small { color: var(--muted); font-variant-numeric: tabular-nums; }
.usecase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.usecase-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); }
.usecase-card:hover { border-color: var(--line-strong); text-decoration: none; }
.usecase-card__icons { display: flex; gap: 14px; color: var(--ink-2); }
.usecase-card__icons .icon-glyph { width: 26px; height: 26px; color: inherit; }
.usecase-card:hover .usecase-card__icons { color: var(--accent); }
.usecase-card__title { font-weight: 600; font-size: 15px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.plan-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin: 0; }
.plan-card--accent { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.plan-card__name { font-weight: 600; font-size: 15px; color: var(--muted); }
.plan-card__price { margin: 0; font-size: 32px; font-weight: 600; letter-spacing: -0.035em; }
.plan-card__price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-card .badge { align-self: flex-start; }
.plan-card .check-points { margin: 4px 0 6px; }

/* ---------- editor ---------- */
.page-editor .site-footer { margin-top: 0; }
.editor-app { display: grid; grid-template-columns: 260px minmax(0, 1fr) 290px; gap: 0; min-height: calc(100vh - var(--header-h)); border-bottom: 1px solid var(--line); }
.ed-side { background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: calc(100vh - var(--header-h)); position: sticky; top: var(--header-h); }
.ed-library { border-right: 1px solid var(--line); }
.ed-props { border-left: 1px solid var(--line); }
.ed-props .insp { padding: 0 0 14px; }
.ed-tabs { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: var(--surface-2); }
.ed-tab { flex: 1; height: 30px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ed-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.ed-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--muted); }
.ed-search input { border: 0 !important; box-shadow: none !important; padding: 0; min-height: 0; background: none; }
.ed-results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 10px; }
.ed-result { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; color: var(--ink); }
.ed-result:hover { border-color: var(--accent); background: var(--accent-soft); }
.ed-result .icon-glyph { width: 55%; height: 55%; }
.ed-shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.ed-shape { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--accent); cursor: pointer; }
.ed-shape:hover { border-color: var(--accent); }
.ed-stage { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.ed-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.ed-toolbar__spacer { flex: 1; }
.ed-canvas-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px; background-size: 24px 24px; }
.ed-canvas { width: min(100%, 560px); aspect-ratio: 1; height: auto; background: transparent; outline: 1px dashed var(--line-strong); touch-action: none; user-select: none; }
.ed-canvas g[data-id] { cursor: move; }
.ed-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.ed-row input[type="color"] { width: 44px; height: 34px; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.ed-row .field { flex: 1 1 100%; }
.ed-row select { flex: 1; }
@media (max-width: 1100px) {
  .editor-app { grid-template-columns: 1fr; }
  .ed-side { position: static; max-height: none; border: 0; border-bottom: 1px solid var(--line); }
  .ed-results { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 600px) { .ed-results { grid-template-columns: repeat(5, 1fr); } .ed-canvas-wrap { padding: 12px; } }

/* ---------- pick several icons ---------- */
.select-toggle.is-active { --b-bg: var(--accent-soft); --b-line: var(--accent-line); --b-fg: var(--accent); }
body.select-mode .icon-card__tile { cursor: pointer; }
body.select-mode .icon-card__actions, body.select-mode .icon-card__frame { display: none; }
body.select-mode .icon-card__tile::after { content: ""; position: absolute; left: 8px; top: 8px; width: 20px; height: 20px; border: 2px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
.icon-card.is-picked .icon-card__tile { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
body.select-mode .icon-card.is-picked .icon-card__tile::after { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.pick-tray {
  position: fixed; left: 50%; bottom: 18px; z-index: 95; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  max-width: calc(100vw - 24px); padding: 10px 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.pick-tray[hidden] { display: none; }
.pick-tray strong { font-size: 14px; padding: 0 4px; }
.pick-tray__opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.pick-tray__opt select { width: auto; min-height: 30px; padding: 3px 26px 3px 8px; font-size: 13px; }
.pick-tray__opt input[type="color"] { width: 32px; height: 28px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
.footer-newsletter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 22px; padding-bottom: 22px; border-top: 1px solid var(--line); }
.footer-newsletter .footer-title { margin-bottom: 4px; }
.footer-newsletter p { margin: 0; }
.nl-form { display: flex; gap: 8px; flex: 1 1 320px; max-width: 460px; }
.nl-form input[type="email"] { flex: 1; min-width: 0; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.detail-author { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.detail-author a { font-weight: 600; }
.designer-avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 18px; }
.cat-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.cat-preview__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); min-width: 0; }
.cat-preview__item .icon-glyph { width: 26px; height: 26px; flex: none; }
.cat-preview__item > span:last-child { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.cat-preview__item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-preview__item .is-none { color: var(--warning); }
.bulk-log { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; max-height: 220px; overflow: auto; }
.bulk-log .is-error { color: var(--danger); } .bulk-log .is-duplicate { color: var(--muted); } .bulk-log .is-created { color: var(--success); }
.chip--accent { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.ai-gen { display: grid; gap: 16px; max-width: 760px; }
.ai-form { display: flex; flex-direction: column; gap: 12px; }
.ai-form .seg { cursor: pointer; }
.ai-result__stage { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; margin-bottom: 14px; border-radius: var(--r); background-size: 18px 18px; color: var(--ink); }
.ai-result__stage svg { width: 36%; height: auto; max-height: 85%; }
.ai-history { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.ai-history__item { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; color: var(--ink); }
.ai-history__item:hover { border-color: var(--accent); }
.ai-history__item .icon-glyph { width: 55%; height: 55%; }
.image-drop__zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 36px 16px; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--muted); text-align: center; cursor: pointer; position: relative; }
.image-drop__zone:hover { border-color: var(--accent); color: var(--accent); }
.image-drop__zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
.steps-list .btn { margin-left: 8px; }
.quota-left { margin: 6px 0 2px; font-size: 12.5px; color: var(--muted); text-align: center; }
.quota-left.is-out { color: var(--danger); text-align: left; }
.btn-google { --b-bg: #fff; --b-fg: #1f1f1f; --b-line: #dadce0; gap: 10px; font-weight: 600; }
.btn-google:hover { --b-bg: #f8f9fa; --b-line: #c6c9cf; }
[data-theme="dark"] .btn-google { --b-bg: #131314; --b-fg: #e3e3e3; --b-line: #8e918f; }
.auth-social { margin-bottom: 4px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 12.5px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.quota-login { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; text-align: center; }

/* pricing page */
.pricing-head .center, .pricing-head { text-align: center; }
.billing-switch { display: inline-flex; gap: 2px; padding: 3px; margin-top: 18px; border-radius: var(--r); background: var(--surface-2); }
.billing-switch button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.billing-switch button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.plan-grid--pricing { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.plan-card .btn.is-static { pointer-events: none; }
.plan-card .btn-google { margin-top: -4px; }
.plan-card .center { text-align: center; margin: 0; }
.cmp-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 14px; }
.cmp-table th, .cmp-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.cmp-table thead th { position: sticky; top: 0; background: var(--surface); font-size: 14px; }
.cmp-table tbody th { text-align: left; font-weight: 600; width: 38%; }
.cmp-table tbody th small { display: block; margin-top: 2px; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: 0; }
.cmp-table .is-hl { background: var(--accent-soft); }
.cmp-yes { color: var(--success); display: inline-flex; }
.cmp-no { color: var(--muted); }
.cmp-text { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.faq { display: grid; gap: 8px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px 16px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }
.section-title { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 16px; }
