:root {
  --ink: #171717;
  --muted: #676767;
  --paper: #fffdf8;
  --surface: #ffffff;
  --soft: #f6f1e8;
  --accent: #a05a00;
  --accent-strong: #6f3d00;
  --line: #ded8ce;
  --success: #176b45;
  --danger: #9d2a2a;
  --radius: 12px;
  --radius-lg: 22px;
  --shadow: 0 12px 32px rgba(23, 23, 23, .07);
  --container: 1160px;
  --space: clamp(64px, 8vw, 108px);
  --font: "Poppins", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img, svg, canvas { max-width: 100%; }
::selection { background: #f3d9aa; color: #1f1405; }
:focus-visible { outline: 3px solid #d08a23; outline-offset: 3px; }
[hidden] { display: none !important; }

.container { width: min(calc(100% - 36px), var(--container)); margin-inline: auto; }
.section { padding: var(--space) 0; content-visibility: auto; contain-intrinsic-size: 700px; }
.section-compact { padding: clamp(44px, 6vw, 72px) 0; }
.section-soft { background: var(--soft); border-block: 1px solid var(--line); }
.section-dark { background: var(--ink); color: #fff; }
.section-heading { max-width: 760px; margin-bottom: 30px; }
.section-heading.centered { text-align: center; margin-inline: auto; }
.section-heading p:last-child { color: var(--muted); margin-bottom: 0; }
.section-dark .section-heading p:last-child { color: #d7d7d7; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.16; margin-top: 0; text-wrap: balance; }
h1 { font-size: clamp(2.65rem, 6.8vw, 5.8rem); letter-spacing: -.055em; margin-bottom: 22px; }
h2 { font-size: clamp(2rem, 4vw, 3.35rem); letter-spacing: -.035em; margin-bottom: 16px; }
h3 { font-size: clamp(1.08rem, 2vw, 1.35rem); letter-spacing: -.015em; margin-bottom: 10px; }
p { margin-top: 0; }
.lead { font-size: clamp(1.02rem, 2vw, 1.22rem); color: var(--muted); max-width: 700px; }
.muted { color: var(--muted); }
.text-link { color: var(--accent-strong); font-weight: 700; text-underline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 9999; background: #fff; padding: 10px 16px; border: 1px solid var(--ink); }
.skip-link:focus { top: 16px; }

.btn {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  padding: 10px 17px;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  text-decoration: none;
  line-height: 1;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { color: #fff; }
.btn-soft { background: var(--soft); color: var(--ink); border-color: var(--line); }
.btn-soft:hover { color: #fff; }
.btn-small { min-height: 38px; padding: 8px 12px; font-size: .86rem; }
.icon-button {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: inline-grid; place-items: center; font-size: 1.28rem;
}
.icon-button.is-active { background: #fff1b9; border-color: #d6a72f; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000; background: rgba(255, 253, 248, .96);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.header-inner { min-height: 76px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; white-space: nowrap; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-size: 1.45rem; background: #fff; }
.site-nav { justify-self: center; }
.site-nav ul { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 1.4vw, 21px); list-style: none; padding: 0; margin: 0; }
.site-nav a { font-size: .86rem; font-weight: 700; text-decoration: none; padding: 8px 0; position: relative; white-space: nowrap; }
.site-nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 3px; height: 1px; background: currentColor; transition: right .18s ease; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }
.menu-toggle { display: none; width: 46px; height: 42px; border: 1px solid var(--line); background: #fff; border-radius: 7px; }
.menu-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--ink); }

/* Hero */
.hero { padding: clamp(64px, 9vw, 120px) 0 clamp(54px, 7vw, 86px); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(270px, .6fr); gap: clamp(42px, 7vw, 90px); align-items: center; }
.hero-copy { max-width: 820px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 4.55rem); letter-spacing: -.045em; }
.hero-copy .lead { margin-bottom: 28px; }
.hero-visual { min-height: 360px; display: grid; place-items: center; position: relative; }
.featured-emoji-stage {
  width: min(100%, 360px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 26%, #f6eddc 56%, #e9d6b7 100%); position: relative;
}
.featured-emoji-stage::before, .featured-emoji-stage::after { content: ''; position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.featured-emoji-stage::before { inset: -18px; }
.featured-emoji-stage::after { inset: 42px; border-style: dashed; }
.featured-emoji { font-size: clamp(6.5rem, 14vw, 10rem); filter: drop-shadow(0 18px 22px rgba(0,0,0,.12)); z-index: 1; }
.hero-code-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); margin-top: 34px; border: 1px solid var(--line); background: var(--surface); }
.hero-code-strip div { padding: 15px 17px; border-right: 1px solid var(--line); min-width: 0; }
.hero-code-strip div:last-child { border-right: 0; }
.hero-code-strip span { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; }
.hero-code-strip code { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; font-size: .87rem; }

/* Filters and galleries */
.gallery-section { padding-top: 54px; }
/* Homepage gallery hero */
.gallery-hero {
  padding: clamp(52px, 7vw, 82px) 0 clamp(62px, 8vw, 96px);
  background: linear-gradient(180deg, #fffdf8 0%, #fbf6eb 100%);
  border-bottom: 1px solid var(--line);
}
.gallery-hero .section-heading { max-width: 880px; margin-bottom: 30px; }
.gallery-hero h1 { font-size: clamp(2.15rem, 4.7vw, 3.75rem); letter-spacing: -.04em; }
.gallery-hero .gallery-toolbar { background: rgba(255,255,255,.82); }

.gallery-toolbar { border: 1px solid var(--line); background: var(--surface); padding: 18px; display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(130px, .7fr)) auto; gap: 12px; align-items: end; }
.field { display: grid; gap: 7px; }
.field label, .field-label { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.field input, .field select, .generator-controls input, .generator-controls select, .faq-search input {
  width: 100%; min-height: 46px; border: 1px solid #bfb8ae; border-radius: 6px; background: #fff; color: var(--ink); padding: 10px 12px;
}
.field input[type="range"], .generator-controls input[type="range"] { min-height: auto; padding: 0; border: 0; }
.gallery-status { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 2px 14px; color: var(--muted); font-size: .92rem; }
.emoji-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.emoji-card {
  position: relative; min-width: 0; border: 1px solid var(--line); background: var(--surface); padding: 16px; display: flex; flex-direction: column; min-height: 270px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.emoji-card:hover { transform: translateY(-3px); border-color: #a8a095; box-shadow: 0 10px 24px rgba(0,0,0,.055); }
.emoji-preview {
  min-height: 108px; display: grid; place-items: center; margin-bottom: 14px; border: 1px solid var(--line); background: linear-gradient(135deg, #fffdf8, #f5efe4); font-size: 3.5rem; overflow: hidden;
}
.emoji-card[data-style="Outline"] .emoji-preview { background: #fff; border: 2px solid var(--ink); }
.emoji-card[data-style="Neon"] .emoji-preview { background: #111; box-shadow: inset 0 0 20px rgba(255,220,70,.25); }
.emoji-card[data-style="Sticker"] .emoji-preview { border-radius: 20px 4px 18px 6px; transform: rotate(-1deg); background: #fff8d8; }
.emoji-card[data-style="Pixel"] .emoji-preview { border-radius: 0; box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5px #222; image-rendering: pixelated; }
.emoji-card[data-style="Metallic"] .emoji-preview { background: linear-gradient(135deg, #5f5f5f, #f3f3f3 45%, #7b7b7b); }
.emoji-card[data-style="Glass"] .emoji-preview { background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(219,235,255,.55)); backdrop-filter: blur(10px); }
.emoji-card[data-color="Black"] .emoji-preview { background: #171717; }
.emoji-card[data-color="Pink"] .emoji-preview { background: #fff0f5; }
.emoji-card[data-color="Blue"] .emoji-preview { background: #eef7ff; }
.emoji-card[data-color="Purple"] .emoji-preview { background: #f4efff; }
.emoji-card[data-color="Green"] .emoji-preview { background: #eefaf1; }
.emoji-card[data-color="Orange"] .emoji-preview { background: #fff3e8; }
.emoji-card-copy { flex: 1; min-width: 0; }
.emoji-card-copy h3 { font-size: .98rem; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emoji-card-copy p { margin-bottom: 10px; color: var(--muted); font-size: .8rem; }
.emoji-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border: 1px solid var(--line); background: var(--soft); font-size: .68rem; font-weight: 750; border-radius: 999px; }
.emoji-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.emoji-actions .btn { width: 100%; }
.card-extra-actions { display: flex; gap: 6px; justify-content: space-between; align-items: center; margin-top: 8px; }
.details-button { border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 5px 0; font-weight: 700; font-size: .82rem; }
.gallery-pagination { display: flex; justify-content: center; gap: 10px; padding-top: 28px; }
.empty-state { border: 1px dashed #aaa096; padding: 32px; text-align: center; background: #fff; color: var(--muted); }

/* Generator */
.generator-section { border-bottom: 1px solid var(--line); }
.generator-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); border: 1px solid var(--ink); background: var(--surface); }
.generator-controls { padding: clamp(24px, 4vw, 42px); border-right: 1px solid var(--line); display: grid; gap: 18px; }
.generator-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.check-row { display: flex; flex-wrap: wrap; gap: 16px; }
.check-row label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
.check-row input { width: 18px; height: 18px; }
.generator-preview { background: var(--soft); display: grid; place-items: center; padding: clamp(26px, 5vw, 54px); min-height: 500px; }
.generator-preview canvas { width: min(100%, 420px); height: auto; background-image: linear-gradient(45deg,#e8e8e8 25%,transparent 25%),linear-gradient(-45deg,#e8e8e8 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e8e8e8 75%),linear-gradient(-45deg,transparent 75%,#e8e8e8 75%); background-size: 22px 22px; background-position: 0 0,0 11px,11px -11px,-11px 0; box-shadow: var(--shadow); }
.range-readout { color: var(--accent-strong); font-weight: 800; }

/* Content cards */
.editorial-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.editorial-card { padding: 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.editorial-card p:last-child { margin-bottom: 0; color: var(--muted); }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(26px, 5vw, 70px); }
.content-panel { border-top: 2px solid var(--ink); padding-top: 20px; }
.content-panel p:last-child { margin-bottom: 0; }
.code-copy-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border: 1px solid var(--line); }
.code-copy-item { padding: 18px; border-right: 1px solid var(--line); }
.code-copy-item:last-child { border-right: 0; }
.code-copy-item code { display: block; min-height: 42px; padding: 10px; margin-bottom: 12px; background: var(--soft); overflow-wrap: anywhere; }
.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.mini-grid .emoji-card { min-height: 250px; }
.use-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--line); }
.use-item { padding: 22px 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 40px 1fr; gap: 15px; }
.use-item:nth-child(odd) { border-right: 1px solid var(--line); }
.use-number { font-size: .8rem; color: var(--accent-strong); font-weight: 800; }
.conversation-list { display: grid; gap: 14px; max-width: 850px; }
.chat-row { border: 1px solid var(--line); padding: 18px 20px; background: var(--surface); }
.chat-row strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 5px; }
.text-art-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.text-art-card { border: 1px solid var(--line); padding: 20px; background: var(--surface); }
.text-art-value { min-height: 96px; display: grid; place-items: center; white-space: pre-wrap; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); margin-bottom: 14px; font-size: 1.05rem; }
.combination-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.combination-card { border: 1px solid var(--line); background: var(--surface); padding: 22px; display: flex; flex-direction: column; min-height: 260px; }
.combination-symbol { font-size: 2.7rem; margin-bottom: 14px; }
.combination-card p { color: var(--muted); }
.combination-card .emoji-actions { margin-top: auto; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.category-card { border: 1px solid var(--line); padding: 22px; background: var(--surface); }
.category-samples { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 16px 0; }
.category-sample { border: 1px solid var(--line); padding: 10px 7px; text-align: center; background: var(--soft); }
.category-sample span { display: block; font-size: 1.75rem; margin-bottom: 8px; }
.category-sample .emoji-actions { grid-template-columns: 1fr; gap: 5px; }
.category-sample .btn { min-height: 32px; font-size: .68rem; padding: 6px 4px; }
.comparison-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 1px solid var(--line); }
.comparison-card { padding: 24px; border-right: 1px solid var(--line); background: var(--surface); }
.comparison-card:last-child { border-right: 0; }
.comparison-emoji { font-size: 4rem; margin-bottom: 14px; }
.platform-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.platform-table th, .platform-table td { text-align: left; padding: 16px; border: 1px solid var(--line); vertical-align: top; }
.platform-table th { background: var(--soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }

/* Canvas gallery */
.canvas-card canvas { width: 100%; aspect-ratio: 1; display: block; border: 1px solid var(--line); margin-bottom: 14px; }
.canvas-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.canvas-card { border: 1px solid var(--line); padding: 16px; background: var(--surface); }
.canvas-card h3 { font-size: 1rem; }

/* Directory */
.page-hero { padding: clamp(54px, 7vw, 92px) 0; border-bottom: 1px solid var(--line); }
.page-hero .lead { max-width: 760px; }
.directory-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 26px; align-items: start; }
.directory-sidebar { position: sticky; top: 96px; border: 1px solid var(--line); background: var(--surface); padding: 18px; }
.filter-stack { display: grid; gap: 10px; }
.filter-button { width: 100%; border: 1px solid var(--line); background: #fff; padding: 10px 12px; text-align: left; border-radius: 5px; font-weight: 650; }
.filter-button.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.directory-main .gallery-toolbar { grid-template-columns: minmax(220px, 1fr) minmax(150px, .35fr) auto; }
.saved-panels { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-bottom: 26px; }
.saved-panel { border: 1px solid var(--line); padding: 18px; background: var(--surface); }
.saved-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 42px; }
.saved-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--soft); padding: 7px 9px; border-radius: 999px; }
.saved-chip span { font-size: 1.2rem; }
.saved-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.saved-panel-head h2 { font-size: 1.1rem; margin: 0; }
.directory-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.directory-grid .emoji-card { min-height: 284px; }
.favorite-button { position: absolute; top: 22px; right: 22px; z-index: 2; width: 34px; height: 34px; }

/* FAQ */
.faq-shell { display: grid; grid-template-columns: minmax(220px, .4fr) minmax(0,1fr); gap: 34px; align-items: start; }
.faq-search { position: sticky; top: 100px; border-top: 2px solid var(--ink); padding-top: 18px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question { width: 100%; border: 0; background: transparent; padding: 20px 0; display: flex; justify-content: space-between; gap: 20px; text-align: left; font-weight: 800; }
.faq-question span:last-child { font-size: 1.25rem; }
.faq-answer { padding: 0 0 22px; color: var(--muted); max-width: 820px; }
.faq-answer[hidden] { display: none; }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.blog-card { border-top: 1px solid var(--ink); padding-top: 15px; }
.blog-cover { aspect-ratio: 16 / 9; display: grid; place-items: center; margin-bottom: 17px; border: 1px solid var(--line); background: linear-gradient(135deg,#f9efd8,#fff 48%,#eee0c2); overflow: hidden; }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-meta, .article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 750; }
.blog-card h2, .blog-card h3 { margin: 10px 0; }
.blog-card h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); }
.blog-card p { color: var(--muted); }
.blog-card a { text-decoration-thickness: 1px; text-underline-offset: 5px; }
.breadcrumbs { padding-top: 24px; font-size: .82rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0; }
.article-header { padding: clamp(42px, 7vw, 82px) 0 40px; }
.article-header h1 { font-size: clamp(2.5rem, 5.8vw, 4.9rem); max-width: 950px; }
.article-cover { width: min(100%, 780px); aspect-ratio: 16/9; max-height: 520px; display: block; border: 1px solid var(--line); background: var(--soft); margin: 0 0 42px; overflow: hidden; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 60px; align-items: start; }
.article-body { max-width: 780px; font-size: 1.04rem; }
.article-body h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-top: 48px; }
.article-body h3 { margin-top: 30px; }
.article-body p, .article-body li { color: #383838; }
.article-body li { margin-bottom: 8px; }
.article-aside { position: sticky; top: 104px; border-top: 2px solid var(--ink); padding-top: 18px; }
.article-aside ul { list-style: none; padding: 0; margin: 0; }
.article-aside li { border-bottom: 1px solid var(--line); padding: 10px 0; }
.article-aside a { text-decoration: none; font-weight: 650; font-size: .9rem; }
.inline-emoji-tool { border: 1px solid var(--ink); padding: 22px; margin: 28px 0; background: var(--soft); display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.inline-emoji-tool .emoji-preview { width: 100px; min-height: 100px; margin: 0; }
.related-posts { border-top: 1px solid var(--line); margin-top: 60px; padding-top: 34px; }

/* Legal / info */
.prose { max-width: 840px; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-top: 42px; }
.prose h3 { margin-top: 28px; }
.prose p, .prose li { color: #3d3d3d; }
.info-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 30px; }
.info-card { border: 1px solid var(--line); padding: 22px; background: var(--surface); }
.contact-card { border: 1px solid var(--ink); padding: 28px; background: var(--surface); max-width: 680px; }

/* Modal and toast */
.modal { position: fixed; inset: 0; z-index: 2000; display: none; }
.modal.is-open { display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.56); }
.modal-panel { position: relative; z-index: 1; width: min(calc(100% - 28px), 620px); max-height: calc(100vh - 42px); overflow: auto; background: var(--paper); border: 1px solid var(--ink); padding: clamp(24px, 5vw, 42px); box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.modal-close { position: absolute; right: 14px; top: 10px; border: 0; background: transparent; font-size: 2rem; }
.modal-emoji { min-height: 150px; display: grid; place-items: center; font-size: 6rem; background: var(--soft); border: 1px solid var(--line); margin-bottom: 22px; }
.modal-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.modal-heading h2 { font-size: 2rem; margin-bottom: 0; }
.code-list { border-top: 1px solid var(--line); margin: 24px 0; }
.code-list div { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.code-list dt { font-weight: 800; }
.code-list dd { margin: 0; overflow-wrap: anywhere; }
.site-toast { position: fixed; left: 50%; bottom: 22px; z-index: 4000; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 11px 17px; border-radius: 6px; transition: opacity .2s ease, transform .2s ease; }
.site-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.scroll-top { position: fixed; right: 18px; bottom: 18px; z-index: 900; width: 46px; height: 46px; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); opacity: 0; pointer-events: none; transform: translateY(10px); transition: .18s ease; }
.scroll-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--ink); padding: 56px 0 24px; background: #f4efe6; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-intro p { color: var(--muted); max-width: 360px; }
.footer-column h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column li { margin: 8px 0; }
.footer-column a { text-decoration: none; font-size: .9rem; }
.footer-column a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; display: flex; justify-content: center; gap: 20px; color: var(--muted); font-size: .82rem; text-align: center; }
.footer-bottom p { margin: 0; }

/* 404 */
.not-found { min-height: 65vh; display: grid; place-items: center; text-align: center; }
.not-found-mark { font-size: clamp(6rem, 20vw, 12rem); line-height: 1; }

/* Seed system — structural changes */
body[data-seed="1"] { --radius: 16px; --radius-lg: 26px; --accent: #6941c6; --accent-strong: #4e2f99; --soft: #f6f3ff; }
body[data-seed="1"] .hero-grid { grid-template-columns: 1fr; text-align: center; }
body[data-seed="1"] .hero-copy, body[data-seed="1"] .hero-copy .lead { margin-inline: auto; }
body[data-seed="1"] .hero-copy .button-row { justify-content: center; }
body[data-seed="1"] .hero-visual { min-height: 300px; }
body[data-seed="1"] .emoji-card, body[data-seed="1"] .gallery-toolbar, body[data-seed="1"] .generator-shell { border-radius: 16px; box-shadow: var(--shadow); }

body[data-seed="2"] { --paper: #080b10; --surface: #111721; --soft: #0d131c; --ink: #f7fbff; --muted: #a9b5c6; --line: #243348; --accent: #2fffd2; --accent-strong: #2fffd2; color-scheme: dark; }
body[data-seed="2"] .site-header { background: rgba(8,11,16,.95); }
body[data-seed="2"] .header-inner { grid-template-columns: 1fr auto 1fr; }
body[data-seed="2"] .hero-grid { grid-template-columns: 1fr 1fr; }
body[data-seed="2"] .hero-visual { border-left: 1px solid var(--line); }
body[data-seed="2"] .emoji-card, body[data-seed="2"] .generator-shell { box-shadow: 0 0 0 1px rgba(47,255,210,.12), 0 0 30px rgba(47,255,210,.05); }

body[data-seed="3"] { --paper: #f4f8ff; --surface: rgba(255,255,255,.68); --soft: rgba(255,255,255,.42); --line: rgba(81,104,156,.22); --accent: #6d5dfc; --accent-strong: #4a3bd0; --radius: 24px; --radius-lg: 34px; }
body[data-seed="3"] { background-image: radial-gradient(circle at 10% 10%, #d8ecff 0, transparent 24%), radial-gradient(circle at 90% 20%, #eadcff 0, transparent 26%); }
body[data-seed="3"] .site-header, body[data-seed="3"] .emoji-card, body[data-seed="3"] .gallery-toolbar, body[data-seed="3"] .generator-shell { backdrop-filter: blur(18px); border-radius: var(--radius); }
body[data-seed="3"] .hero-grid { grid-template-columns: 1.1fr .9fr; }
body[data-seed="3"] .featured-emoji-stage { border-radius: 34% 66% 55% 45% / 48% 34% 66% 52%; }

body[data-seed="4"] { --soft: #f7f3ff; --accent: #7b3fc6; --accent-strong: #54238f; --radius: 18px; }
body[data-seed="4"] .hero-grid { grid-template-columns: 1.2fr .8fr; align-items: stretch; }
body[data-seed="4"] .hero-copy, body[data-seed="4"] .hero-visual { border: 1px solid var(--line); padding: clamp(24px,5vw,48px); border-radius: 22px; background: var(--surface); }
body[data-seed="4"] .hero-code-strip { border-radius: 16px; overflow: hidden; }
body[data-seed="4"] .emoji-grid { grid-auto-flow: dense; }
body[data-seed="4"] .emoji-card:nth-child(7n) { grid-column: span 2; }

body[data-seed="5"] { --radius: 7px; --radius-lg: 0; }
body[data-seed="5"] .site-header .brand-mark, body[data-seed="5"] .featured-emoji-stage { border-radius: 50%; }
body[data-seed="5"] .post-generator-sections { display: flex; flex-direction: column; }
body[data-seed="5"] .section-about { order: 1; }
body[data-seed="5"] .section-meanings { order: 2; }
body[data-seed="5"] .section-codes { order: 3; }
body[data-seed="5"] .section-uses { order: 4; }
body[data-seed="5"] .section-conversations { order: 5; }
body[data-seed="5"] .section-mini { order: 6; }
body[data-seed="5"] .section-categories { order: 7; }
body[data-seed="5"] .section-combinations { order: 8; }
body[data-seed="5"] .section-text-art { order: 9; }
body[data-seed="5"] .section-png { order: 10; }
body[data-seed="5"] .section-comparison { order: 11; }
body[data-seed="5"] .section-related { order: 12; }
body[data-seed="5"] .section-platform { order: 13; }
body[data-seed="5"] .section-blog { order: 14; }
body[data-seed="5"] .section-faq { order: 15; }

body[data-seed="6"] { --paper: #fff; --surface: #fff; --soft: #f4f4f4; --ink: #050505; --muted: #555; --line: #111; --accent: #e4501d; --accent-strong: #b82f00; --radius: 0; --radius-lg: 0; }
body[data-seed="6"] .header-inner { min-height: 60px; }
body[data-seed="6"] .emoji-card, body[data-seed="6"] .btn, body[data-seed="6"] input, body[data-seed="6"] select { border-radius: 0; box-shadow: none; }
body[data-seed="6"] .hero-grid { grid-template-columns: 1fr; }
body[data-seed="6"] .hero-visual { display: none; }

body[data-seed="7"] { --paper: #fff9fb; --surface: #fff; --soft: #fff0f5; --line: #efd5df; --accent: #d45586; --accent-strong: #a5305d; --radius: 28px; --radius-lg: 42px; }
body[data-seed="7"] .btn, body[data-seed="7"] input, body[data-seed="7"] select, body[data-seed="7"] .badge { border-radius: 999px; }
body[data-seed="7"] .emoji-card, body[data-seed="7"] .gallery-toolbar, body[data-seed="7"] .generator-shell { border-radius: 28px; overflow: hidden; }
body[data-seed="7"] .featured-emoji-stage { border-radius: 44% 56% 51% 49% / 58% 43% 57% 42%; }

body[data-seed="8"] { --paper: #05090d; --surface: #0b1118; --soft: #0d151e; --ink: #d6ffe8; --muted: #85a895; --line: #1e4330; --accent: #54ff9d; --accent-strong: #54ff9d; --radius: 2px; color-scheme: dark; }
body[data-seed="8"] { background-image: linear-gradient(rgba(84,255,157,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(84,255,157,.035) 1px, transparent 1px); background-size: 28px 28px; }
body[data-seed="8"] h1, body[data-seed="8"] h2, body[data-seed="8"] h3, body[data-seed="8"] .btn { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
body[data-seed="8"] .hero-grid { grid-template-columns: 1fr .75fr; }
body[data-seed="8"] .featured-emoji-stage { border-radius: 0; box-shadow: 0 0 35px rgba(84,255,157,.12); }

body[data-seed="9"] { --paper: #fff8e6; --surface: #fff; --soft: #fff0be; --line: #2b2b2b; --accent: #e64a3b; --accent-strong: #b92a1f; --radius: 18px; }
body[data-seed="9"] .emoji-card { border: 2px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); }
body[data-seed="9"] .emoji-card:nth-child(3n) { transform: rotate(.7deg); }
body[data-seed="9"] .emoji-card:nth-child(4n) { transform: rotate(-.7deg); }
body[data-seed="9"] .btn { border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); border-radius: 999px; }

body[data-seed="10"] { --paper: #faf7ff; --surface: #fff; --soft: #f1eaff; --line: #ddcfff; --accent: #6e40d7; --accent-strong: #4e25ad; --radius: 18px; --radius-lg: 32px; }
body[data-seed="10"] .hero { background: linear-gradient(135deg,#2f1b69,#7541db 58%,#f2b96d); color: #fff; }
body[data-seed="10"] .hero .lead, body[data-seed="10"] .hero .eyebrow { color: #f7efff; }
body[data-seed="10"] .hero-code-strip { color: var(--ink); border-radius: 16px; overflow: hidden; }
body[data-seed="10"] .emoji-card, body[data-seed="10"] .generator-shell { border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }

body[data-seed="11"] { --paper: #eef2f7; --surface: #fff; --soft: #f5f7fa; --line: #d6dde6; --accent: #2764c4; --accent-strong: #18478d; --radius: 8px; }
body[data-seed="11"] .header-inner { min-height: 58px; }
body[data-seed="11"] .hero { padding-block: 42px; }
body[data-seed="11"] h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
body[data-seed="11"] .emoji-grid { gap: 8px; grid-template-columns: repeat(6,minmax(0,1fr)); }
body[data-seed="11"] .emoji-card { min-height: 245px; padding: 10px; }
body[data-seed="11"] .gallery-toolbar { position: sticky; top: 58px; z-index: 20; }

body[data-seed="12"] { --paper: #f8fbff; --surface: #fff; --soft: #edf5ff; --line: #d5e4f5; --accent: #1966aa; --accent-strong: #104c81; --radius: 22px; --radius-lg: 48px; }
body[data-seed="12"] .hero-grid { grid-template-columns: .9fr 1.1fr; }
body[data-seed="12"] .hero-visual { order: -1; }
body[data-seed="12"] .featured-emoji-stage { border-radius: 50%; box-shadow: 0 0 0 22px #edf5ff, 0 0 0 23px #bdd5ed; }
body[data-seed="12"] .emoji-card, body[data-seed="12"] .generator-shell { border-radius: 22px; overflow: hidden; }


/* Seed-specific remaining homepage section order */
.post-generator-sections { display: flex; flex-direction: column; }
body[data-seed="1"] .section-about { order: 1; }
body[data-seed="1"] .section-meanings { order: 2; }
body[data-seed="1"] .section-mini { order: 3; }
body[data-seed="1"] .section-categories { order: 4; }
body[data-seed="1"] .section-codes { order: 5; }
body[data-seed="1"] .section-combinations { order: 6; }
body[data-seed="1"] .section-uses { order: 7; }
body[data-seed="1"] .section-conversations { order: 8; }
body[data-seed="1"] .section-png { order: 9; }
body[data-seed="1"] .section-text-art { order: 10; }
body[data-seed="1"] .section-related { order: 11; }
body[data-seed="1"] .section-comparison { order: 12; }
body[data-seed="1"] .section-platform { order: 13; }
body[data-seed="1"] .section-blog { order: 14; }
body[data-seed="1"] .section-faq { order: 15; }
body[data-seed="2"] .section-combinations { order: 1; }
body[data-seed="2"] .section-png { order: 2; }
body[data-seed="2"] .section-codes { order: 3; }
body[data-seed="2"] .section-meanings { order: 4; }
body[data-seed="2"] .section-comparison { order: 5; }
body[data-seed="2"] .section-related { order: 6; }
body[data-seed="2"] .section-categories { order: 7; }
body[data-seed="2"] .section-mini { order: 8; }
body[data-seed="2"] .section-uses { order: 9; }
body[data-seed="2"] .section-conversations { order: 10; }
body[data-seed="2"] .section-text-art { order: 11; }
body[data-seed="2"] .section-platform { order: 12; }
body[data-seed="2"] .section-about { order: 13; }
body[data-seed="2"] .section-blog { order: 14; }
body[data-seed="2"] .section-faq { order: 15; }
body[data-seed="3"] .section-about { order: 1; }
body[data-seed="3"] .section-meanings { order: 2; }
body[data-seed="3"] .section-png { order: 3; }
body[data-seed="3"] .section-mini { order: 4; }
body[data-seed="3"] .section-combinations { order: 5; }
body[data-seed="3"] .section-categories { order: 6; }
body[data-seed="3"] .section-uses { order: 7; }
body[data-seed="3"] .section-conversations { order: 8; }
body[data-seed="3"] .section-text-art { order: 9; }
body[data-seed="3"] .section-comparison { order: 10; }
body[data-seed="3"] .section-related { order: 11; }
body[data-seed="3"] .section-platform { order: 12; }
body[data-seed="3"] .section-codes { order: 13; }
body[data-seed="3"] .section-blog { order: 14; }
body[data-seed="3"] .section-faq { order: 15; }
body[data-seed="4"] .section-codes { order: 1; }
body[data-seed="4"] .section-mini { order: 2; }
body[data-seed="4"] .section-categories { order: 3; }
body[data-seed="4"] .section-comparison { order: 4; }
body[data-seed="4"] .section-combinations { order: 5; }
body[data-seed="4"] .section-about { order: 6; }
body[data-seed="4"] .section-meanings { order: 7; }
body[data-seed="4"] .section-uses { order: 8; }
body[data-seed="4"] .section-png { order: 9; }
body[data-seed="4"] .section-related { order: 10; }
body[data-seed="4"] .section-conversations { order: 11; }
body[data-seed="4"] .section-text-art { order: 12; }
body[data-seed="4"] .section-platform { order: 13; }
body[data-seed="4"] .section-blog { order: 14; }
body[data-seed="4"] .section-faq { order: 15; }
body[data-seed="5"] .section-about { order: 1; }
body[data-seed="5"] .section-meanings { order: 2; }
body[data-seed="5"] .section-codes { order: 3; }
body[data-seed="5"] .section-uses { order: 4; }
body[data-seed="5"] .section-conversations { order: 5; }
body[data-seed="5"] .section-mini { order: 6; }
body[data-seed="5"] .section-categories { order: 7; }
body[data-seed="5"] .section-combinations { order: 8; }
body[data-seed="5"] .section-text-art { order: 9; }
body[data-seed="5"] .section-png { order: 10; }
body[data-seed="5"] .section-comparison { order: 11; }
body[data-seed="5"] .section-related { order: 12; }
body[data-seed="5"] .section-platform { order: 13; }
body[data-seed="5"] .section-blog { order: 14; }
body[data-seed="5"] .section-faq { order: 15; }
body[data-seed="6"] .section-codes { order: 1; }
body[data-seed="6"] .section-about { order: 2; }
body[data-seed="6"] .section-meanings { order: 3; }
body[data-seed="6"] .section-comparison { order: 4; }
body[data-seed="6"] .section-platform { order: 5; }
body[data-seed="6"] .section-mini { order: 6; }
body[data-seed="6"] .section-related { order: 7; }
body[data-seed="6"] .section-categories { order: 8; }
body[data-seed="6"] .section-combinations { order: 9; }
body[data-seed="6"] .section-uses { order: 10; }
body[data-seed="6"] .section-conversations { order: 11; }
body[data-seed="6"] .section-text-art { order: 12; }
body[data-seed="6"] .section-png { order: 13; }
body[data-seed="6"] .section-blog { order: 14; }
body[data-seed="6"] .section-faq { order: 15; }
body[data-seed="7"] .section-mini { order: 1; }
body[data-seed="7"] .section-related { order: 2; }
body[data-seed="7"] .section-categories { order: 3; }
body[data-seed="7"] .section-combinations { order: 4; }
body[data-seed="7"] .section-meanings { order: 5; }
body[data-seed="7"] .section-uses { order: 6; }
body[data-seed="7"] .section-conversations { order: 7; }
body[data-seed="7"] .section-about { order: 8; }
body[data-seed="7"] .section-png { order: 9; }
body[data-seed="7"] .section-text-art { order: 10; }
body[data-seed="7"] .section-comparison { order: 11; }
body[data-seed="7"] .section-platform { order: 12; }
body[data-seed="7"] .section-codes { order: 13; }
body[data-seed="7"] .section-blog { order: 14; }
body[data-seed="7"] .section-faq { order: 15; }
body[data-seed="8"] .section-codes { order: 1; }
body[data-seed="8"] .section-platform { order: 2; }
body[data-seed="8"] .section-comparison { order: 3; }
body[data-seed="8"] .section-png { order: 4; }
body[data-seed="8"] .section-meanings { order: 5; }
body[data-seed="8"] .section-about { order: 6; }
body[data-seed="8"] .section-combinations { order: 7; }
body[data-seed="8"] .section-categories { order: 8; }
body[data-seed="8"] .section-mini { order: 9; }
body[data-seed="8"] .section-related { order: 10; }
body[data-seed="8"] .section-uses { order: 11; }
body[data-seed="8"] .section-conversations { order: 12; }
body[data-seed="8"] .section-text-art { order: 13; }
body[data-seed="8"] .section-blog { order: 14; }
body[data-seed="8"] .section-faq { order: 15; }
body[data-seed="9"] .section-combinations { order: 1; }
body[data-seed="9"] .section-mini { order: 2; }
body[data-seed="9"] .section-categories { order: 3; }
body[data-seed="9"] .section-related { order: 4; }
body[data-seed="9"] .section-uses { order: 5; }
body[data-seed="9"] .section-conversations { order: 6; }
body[data-seed="9"] .section-meanings { order: 7; }
body[data-seed="9"] .section-about { order: 8; }
body[data-seed="9"] .section-text-art { order: 9; }
body[data-seed="9"] .section-png { order: 10; }
body[data-seed="9"] .section-comparison { order: 11; }
body[data-seed="9"] .section-codes { order: 12; }
body[data-seed="9"] .section-platform { order: 13; }
body[data-seed="9"] .section-blog { order: 14; }
body[data-seed="9"] .section-faq { order: 15; }
body[data-seed="10"] .section-about { order: 1; }
body[data-seed="10"] .section-png { order: 2; }
body[data-seed="10"] .section-meanings { order: 3; }
body[data-seed="10"] .section-comparison { order: 4; }
body[data-seed="10"] .section-mini { order: 5; }
body[data-seed="10"] .section-related { order: 6; }
body[data-seed="10"] .section-combinations { order: 7; }
body[data-seed="10"] .section-uses { order: 8; }
body[data-seed="10"] .section-categories { order: 9; }
body[data-seed="10"] .section-conversations { order: 10; }
body[data-seed="10"] .section-text-art { order: 11; }
body[data-seed="10"] .section-platform { order: 12; }
body[data-seed="10"] .section-codes { order: 13; }
body[data-seed="10"] .section-blog { order: 14; }
body[data-seed="10"] .section-faq { order: 15; }
body[data-seed="11"] .section-mini { order: 1; }
body[data-seed="11"] .section-categories { order: 2; }
body[data-seed="11"] .section-combinations { order: 3; }
body[data-seed="11"] .section-related { order: 4; }
body[data-seed="11"] .section-codes { order: 5; }
body[data-seed="11"] .section-meanings { order: 6; }
body[data-seed="11"] .section-uses { order: 7; }
body[data-seed="11"] .section-conversations { order: 8; }
body[data-seed="11"] .section-png { order: 9; }
body[data-seed="11"] .section-comparison { order: 10; }
body[data-seed="11"] .section-platform { order: 11; }
body[data-seed="11"] .section-about { order: 12; }
body[data-seed="11"] .section-text-art { order: 13; }
body[data-seed="11"] .section-blog { order: 14; }
body[data-seed="11"] .section-faq { order: 15; }
body[data-seed="12"] .section-comparison { order: 1; }
body[data-seed="12"] .section-related { order: 2; }
body[data-seed="12"] .section-png { order: 3; }
body[data-seed="12"] .section-meanings { order: 4; }
body[data-seed="12"] .section-about { order: 5; }
body[data-seed="12"] .section-mini { order: 6; }
body[data-seed="12"] .section-combinations { order: 7; }
body[data-seed="12"] .section-categories { order: 8; }
body[data-seed="12"] .section-uses { order: 9; }
body[data-seed="12"] .section-conversations { order: 10; }
body[data-seed="12"] .section-text-art { order: 11; }
body[data-seed="12"] .section-codes { order: 12; }
body[data-seed="12"] .section-platform { order: 13; }
body[data-seed="12"] .section-blog { order: 14; }
body[data-seed="12"] .section-faq { order: 15; }

/* responsive */
@media (max-width: 1100px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 14px; }
  .site-nav ul { gap: 10px; }
  .site-nav a { font-size: .78rem; }
  .emoji-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .directory-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .canvas-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  body[data-seed="11"] .emoji-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .menu-toggle { display: block; justify-self: end; }
  .header-inner { grid-template-columns: auto 1fr auto; min-height: 68px; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden; transition: max-height .22s ease; }
  .site-nav.is-open { max-height: calc(100vh - 68px); overflow-y: auto; }
  .site-nav ul { display: grid; justify-content: stretch; gap: 0; padding: 12px 14px 20px; }
  .site-nav a { display: block; font-size: .94rem; padding: 12px 10px; border-bottom: 1px solid var(--line); }
  .hero-grid, body[data-seed="2"] .hero-grid, body[data-seed="3"] .hero-grid, body[data-seed="4"] .hero-grid, body[data-seed="8"] .hero-grid, body[data-seed="10"] .hero-grid, body[data-seed="12"] .hero-grid { grid-template-columns: 1fr; }
  body[data-seed="12"] .hero-visual { order: 0; }
  .hero-visual { min-height: 300px; }
  .featured-emoji-stage { width: min(75vw, 330px); }
  .hero-code-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero-code-strip div:nth-child(2) { border-right: 0; }
  .hero-code-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .gallery-toolbar { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gallery-toolbar .field:first-child { grid-column: 1 / -1; }
  .emoji-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .generator-shell { grid-template-columns: 1fr; }
  .generator-controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .generator-preview { min-height: 420px; }
  .editorial-grid, .blog-grid, .category-grid, .combination-grid, .info-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .code-copy-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .code-copy-item:nth-child(2) { border-right: 0; }
  .code-copy-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .mini-grid, .canvas-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .text-art-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .directory-layout { grid-template-columns: 1fr; }
  .directory-sidebar { position: static; }
  .filter-stack { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .article-layout { grid-template-columns: 1fr; gap: 30px; }
  .article-aside { position: static; }
  .faq-shell { grid-template-columns: 1fr; }
  .faq-search { position: static; }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-seed="11"] .emoji-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  :root { --space: 58px; }
  h1 { font-size: clamp(2.2rem, 11vw, 3.65rem); }
  .hero h1 { font-size: clamp(2.05rem, 10vw, 3.25rem); }
  h2 { font-size: clamp(1.8rem, 9vw, 2.7rem); }
  .brand span:last-child { max-width: 145px; overflow: hidden; text-overflow: ellipsis; }
  .hero { padding-top: 52px; }
  .hero-code-strip { grid-template-columns: 1fr; }
  .hero-code-strip div { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-code-strip div:last-child { border-bottom: 0; }
  .gallery-toolbar { grid-template-columns: 1fr; }
  .gallery-toolbar .field:first-child { grid-column: auto; }
  .gallery-toolbar .btn { width: 100%; }
  .gallery-status { align-items: flex-start; flex-direction: column; }
  .emoji-grid, .directory-grid, .mini-grid, .canvas-grid, .blog-grid, .category-grid, .combination-grid, .editorial-grid, .info-cards, .comparison-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .emoji-card { min-height: 255px; padding: 12px; }
  .emoji-preview { min-height: 96px; font-size: 3rem; }
  .emoji-actions { gap: 6px; }
  .emoji-actions .btn { font-size: .78rem; padding-inline: 7px; }
  .generator-control-grid, .two-column, .saved-panels, .use-list, .text-art-grid { grid-template-columns: 1fr; }
  .use-item:nth-child(odd) { border-right: 0; }
  .generator-preview { min-height: 340px; }
  .code-copy-grid { grid-template-columns: 1fr; }
  .code-copy-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .code-copy-item:last-child { border-bottom: 0; }
  .category-samples { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .comparison-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .comparison-card:last-child { border-bottom: 0; }
  .platform-table { display: block; overflow-x: auto; }
  .filter-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .directory-main .gallery-toolbar { grid-template-columns: 1fr; }
  .inline-emoji-tool { grid-template-columns: 1fr; }
  .inline-emoji-tool .emoji-preview { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
  body[data-seed="11"] .emoji-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 420px) {
  .container { width: min(calc(100% - 20px), var(--container)); }
  .brand-mark { width: 36px; height: 36px; }
  .brand span:last-child { font-size: .9rem; max-width: 120px; }
  .emoji-grid, .directory-grid, .mini-grid, .canvas-grid, .blog-grid, .category-grid, .combination-grid, .editorial-grid, .info-cards, .comparison-grid { grid-template-columns: 1fr; }
  .emoji-card { min-height: 260px; }
  .gallery-pagination { flex-direction: column; }
  .gallery-pagination .btn { width: 100%; }
  .button-row .btn { flex: 1 1 130px; }
  .category-samples { grid-template-columns: 1fr; }
  .code-list div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
}
.article-cover-actions { width: min(100%, 780px); justify-content: center; margin: -24px 0 42px; }

.home-feature-media { width: min(100%, var(--container)); margin: clamp(36px, 6vw, 68px) auto 0; aspect-ratio: 16/9; border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.home-feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
