/* Woodlogos Makers: public site + shared tokens (Studio loads this too). */

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f3f0ea;
  --ink: #1c1917;
  --ink-2: #57534e;
  --ink-3: #8a847c;
  --line: #e7e2da;
  --line-strong: #d6cfc4;

  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ef;
  --logo-ink: #faf8f5;

  --collab: #6d28d9;  --collab-soft: #f0eafb;
  --sale: #b45309;    --sale-soft: #fcf1e2;
  --open: #15803d;    --open-soft: #e7f4ea;
  --k-devlog: #1d4ed8; --k-devlog-soft: #e8eefc;
  --k-problem: #b42318; --k-problem-soft: #fbeae8;
  --k-ai: #6d28d9;     --k-ai-soft: #f0eafb;
  --k-idea: #a15c07;   --k-idea-soft: #fbf0dc;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .05), 0 4px 16px rgba(28, 25, 23, .05);
  --shadow-hover: 0 2px 4px rgba(28, 25, 23, .06), 0 12px 28px rgba(28, 25, 23, .09);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131211; --surface: #1c1b19; --surface-2: #252320; --ink: #f4f1ec; --ink-2: #bdb6ac; --ink-3: #8c857b;
    --line: #322f2b; --line-strong: #45413b;
    --accent: #2dd4bf; --accent-hover: #5eead4; --accent-ink: #042f2e; --accent-soft: #10302c; --logo-ink: #131211;
    --collab: #b79cf5; --collab-soft: #2a2140; --sale: #f0b060; --sale-soft: #362614; --open: #6fd08c; --open-soft: #17301f;
    --k-devlog: #8fb0ff; --k-devlog-soft: #1a2540; --k-problem: #ff9a8f; --k-problem-soft: #3a1c19;
    --k-ai: #b79cf5; --k-ai-soft: #2a2140; --k-idea: #f0b060; --k-idea-soft: #362614;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-hover: 0 8px 24px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131211; --surface: #1c1b19; --surface-2: #252320; --ink: #f4f1ec; --ink-2: #bdb6ac; --ink-3: #8c857b;
  --line: #322f2b; --line-strong: #45413b;
  --accent: #2dd4bf; --accent-hover: #5eead4; --accent-ink: #042f2e; --accent-soft: #10302c; --logo-ink: #131211;
  --collab: #b79cf5; --collab-soft: #2a2140; --sale: #f0b060; --sale-soft: #362614; --open: #6fd08c; --open-soft: #17301f;
  --k-devlog: #8fb0ff; --k-devlog-soft: #1a2540; --k-problem: #ff9a8f; --k-problem-soft: #3a1c19;
  --k-ai: #b79cf5; --k-ai-soft: #2a2140; --k-idea: #f0b060; --k-idea-soft: #362614;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-hover: 0 8px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
input, select, textarea { min-width: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .4em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.75rem); font-weight: 700; letter-spacing: -0.028em; }
h2 { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.6rem); font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }
.narrow-left { max-width: 780px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.accent { color: var(--accent); font-weight: 500; }
.lead { font-size: 1.125rem; color: var(--ink-2); line-height: 1.55; }
.h-small { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }

/* ── Buttons, chips, badges ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font: 500 .95rem/1 var(--font); padding: .72em 1.1em; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn--text { background: none; color: var(--ink-2); padding-inline: .4em; }
.btn--danger { background: var(--surface); color: var(--k-problem); border-color: var(--line-strong); }
.btn--danger:hover { border-color: var(--k-problem); }
.btn--sm { font-size: .875rem; padding: .55em .95em; }
.btn--lg { font-size: 1.05rem; padding: .9em 1.4em; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; padding: .38em .85em; border-radius: 999px; font-size: .875rem; font-weight: 500;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); text-decoration: none !important;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip--collab::before, .chip--sale::before, .chip--open::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-right: .5em; }
.chip--collab::before { background: var(--collab); }
.chip--sale::before { background: var(--sale); }
.chip--open::before { background: var(--open); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; font-size: .75rem; font-weight: 600; letter-spacing: .01em;
  padding: .28em .65em; border-radius: 6px; background: var(--surface-2); color: var(--ink-2);
}
.badge--collab { background: var(--collab-soft); color: var(--collab); }
.badge--sale { background: var(--sale-soft); color: var(--sale); }
.badge--open { background: var(--open-soft); color: var(--open); }

.kind { display: inline-flex; font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; padding: .3em .6em; border-radius: 6px; white-space: nowrap; }
.kind--devlog { color: var(--k-devlog); background: var(--k-devlog-soft); }
.kind--problem { color: var(--k-problem); background: var(--k-problem-soft); }
.kind--ai { color: var(--k-ai); background: var(--k-ai-soft); }
.kind--idea { color: var(--k-idea); background: var(--k-idea-soft); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 1em 0 0; }
.tag { font-size: .8rem; color: var(--ink-2); background: var(--surface-2); padding: .2em .6em; border-radius: 6px; }
a.tag:hover { color: var(--ink); text-decoration: none; }

/* ── Header / footer ───────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; letter-spacing: -.01em; text-decoration: none !important; white-space: nowrap; }
.logo b { font-weight: 700; }
.logo-mark { width: 28px; height: 28px; color: var(--ink); flex: none; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--ink-2); font-weight: 500; font-size: .95rem; padding: .45em .75em; border-radius: 8px; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.header-search { flex: 1; min-width: 0; max-width: 340px; margin-left: auto; }
.header-search input, .field input, .field select, .field textarea, .hero-search input {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: .6em .85em; transition: border-color .15s, box-shadow .15s;
}
.header-search input { font-size: .9rem; padding: .5em .85em; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.header-search input:focus, .field input:focus, .field select:focus, .field textarea:focus, .hero-search input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface);
}
@media (max-width: 860px) {
  .site-nav { display: none; }
  .header-search { max-width: none; }
}
@media (max-width: 560px) {
  .site-header__inner { gap: 10px; }
  .logo span { display: none; }
  .site-header .btn { font-size: .8rem; padding: .5em .8em; }
}

.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding-block: 40px; background: var(--surface); }
.site-footer__inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 32px; }
.site-footer__inner p { max-width: 42ch; margin-top: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; align-content: flex-start; justify-content: flex-end; }
.site-footer nav a { color: var(--ink-2); font-size: .9rem; }
@media (max-width: 720px) { .site-footer__inner { grid-template-columns: 1fr; } .site-footer nav { justify-content: flex-start; } }

/* ── Sections ──────────────────────────────────────────────────────────── */
.section { padding-block: 48px; }
.section--flush { padding-top: 8px; }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head p { margin: 0; }
.link-arrow { font-weight: 500; font-size: .95rem; white-space: nowrap; }
.block { padding-block: 28px; }
.block + .block { border-top: 1px solid var(--line); }

.hero { padding-block: clamp(48px, 8vw, 96px) 40px; background:
  radial-gradient(60% 80% at 85% 0%, var(--accent-soft), transparent 70%),
  radial-gradient(50% 60% at 0% 100%, var(--sale-soft), transparent 70%); }
.hero__inner > * { max-width: 860px; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.8rem); line-height: 1.05; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--ink-2); max-width: 62ch; margin-block: 18px 28px; }
.hero-search { display: flex; gap: 8px; max-width: 620px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: var(--shadow); }
.hero-search input { border: 0; background: transparent; font-size: 1.05rem; padding-left: 1em; border-radius: 999px; }
.hero-search input:focus { box-shadow: none; background: transparent; }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
@media (max-width: 480px) {
  .hero-search { border-radius: 16px; flex-direction: column; }
  .hero-search .btn { width: 100%; }
}

.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.how__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.how__steps li { counter-increment: step; padding: 18px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.how__steps li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; display: grid; place-items: center; margin-bottom: 6px; }
.how__steps span { color: var(--ink-2); font-size: .92rem; }
@media (max-width: 860px) { .how, .how__steps { grid-template-columns: 1fr; } }

.cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: clamp(24px, 4vw, 44px); border-radius: 20px; background: var(--ink); color: var(--bg); }
.cta h2 { color: var(--bg); }
.cta p { margin: 0; color: color-mix(in srgb, var(--bg) 75%, transparent); }
.cta .btn--primary { background: var(--bg); color: var(--ink); }

.page-head { padding-block: 28px 20px; }
.page-head h1 { margin-top: 6px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 10px; font-size: .85rem; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--ink-2); }

.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 18px 0 14px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.page-head .sr-only:first-child + .tabs { margin-top: 0; }
.tab { padding: .6em .9em; color: var(--ink-2); font-weight: 500; font-size: .95rem; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none !important; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font-family: inherit; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"], .tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.field { display: grid; gap: 6px; font-size: .9rem; }
.field > span { font-weight: 500; color: var(--ink-2); }
.field--inline { grid-template-columns: auto; }
.field--grow { flex: 1 1 260px; }
.field select { padding-right: 2em; }

/* ── Cards & grids ─────────────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.grid--apps { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.grid--makers { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
a.card { color: inherit; text-decoration: none; transition: box-shadow .2s, border-color .2s, transform .2s; }
a.card:hover { box-shadow: var(--shadow-hover); border-color: var(--line-strong); }

.app-card { position: relative; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .2s, border-color .2s, transform .2s; }
.app-card:hover { box-shadow: var(--shadow-hover); border-color: var(--line-strong); transform: translateY(-1px); }
.app-card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.app-card__head { display: flex; gap: 12px; align-items: center; }
.app-card__title h3 { margin: 0; }
.app-card__title p { margin: 0; }
.app-card__tagline { color: var(--ink-2); font-size: .95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.app-card__foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px dashed var(--line); }
.app-card .maker-chip { position: relative; z-index: 2; }
.app-card__foot .muted { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-icon { flex: none; border-radius: 22%; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.app-icon--md { width: 48px; height: 48px; }
.app-icon--lg { width: clamp(72px, 12vw, 104px); height: clamp(72px, 12vw, 104px); }
.app-icon--text { display: grid; place-items: center; font-weight: 700; color: hsl(var(--h) 45% 32%); background: hsl(var(--h) 55% 90%); border-color: transparent; letter-spacing: -.02em; }
.app-icon--md.app-icon--text { font-size: 1.05rem; }
.app-icon--lg.app-icon--text { font-size: 2rem; }

.avatar { flex: none; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.avatar--xs { width: 22px; height: 22px; font-size: .6rem; }
.avatar--sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar--md { width: 48px; height: 48px; font-size: 1rem; }
.avatar--xl { width: clamp(80px, 14vw, 112px); height: clamp(80px, 14vw, 112px); font-size: 2rem; }
.avatar--text { display: grid; place-items: center; font-weight: 650; color: hsl(var(--h) 40% 30%); background: hsl(var(--h) 50% 88%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-icon--text, :root:not([data-theme="light"]) .avatar--text { color: hsl(var(--h) 60% 82%); background: hsl(var(--h) 30% 24%); }
}
:root[data-theme="dark"] .app-icon--text, :root[data-theme="dark"] .avatar--text { color: hsl(var(--h) 60% 82%); background: hsl(var(--h) 30% 24%); }

.maker-chip { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: .875rem; font-weight: 500; min-width: 0; }
.maker-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maker-chip:hover { color: var(--ink); text-decoration: none; }

.maker-card { display: flex; gap: 14px; align-items: center; }
.maker-card h3, .maker-card p { margin: 0; }

.log-list { display: grid; }
.log-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.log-item:first-child { padding-top: 4px; }
.log-item h3 { font-size: 1.1rem; margin-bottom: .25em; }
.log-item h3 a { color: var(--ink); }
.log-item p { margin: 0 0 .35em; color: var(--ink-2); }
.log-item .meta { font-size: .85rem; color: var(--ink-3); }
.log-item .meta a { color: var(--ink-2); }
@media (max-width: 640px) { .log-item { grid-template-columns: 1fr; gap: 6px; } }
.meta { color: var(--ink-3); font-size: .9rem; }

.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.empty p { color: var(--ink-2); max-width: 46ch; margin-inline: auto; }
.pager { display: flex; justify-content: space-between; margin-top: 28px; }

/* ── App page ──────────────────────────────────────────────────────────── */
.app-hero { padding-block: 28px 24px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg)); }
.app-hero__main { display: flex; gap: clamp(16px, 3vw, 28px); align-items: flex-start; margin-top: 10px; }
.app-hero__text { min-width: 0; }
.app-hero__text h1 { margin-bottom: .15em; }
.app-hero__tagline { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--ink-2); margin-bottom: .6em; }
.app-hero__by { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: .8em; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.app-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.app-aside { position: sticky; top: 84px; display: grid; gap: 14px; padding-block: 28px; }
@media (max-width: 960px) {
  .app-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .app-aside { position: static; order: -1; padding-bottom: 0; }
}
.facts { margin: 8px 0 0; display: grid; }
.facts > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.callout h3 { margin-bottom: .35em; }
.callout p:last-child { margin-bottom: 0; }
.callout--collab { border-left: 4px solid var(--collab); }
.callout--sale { border-left: 4px solid var(--sale); }
.maker-row { display: flex; gap: 12px; align-items: center; color: inherit; margin: 10px 0 12px; }
.maker-row:hover { text-decoration: none; }
.contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.contact li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; overflow-wrap: anywhere; }
.contact li > span { color: var(--ink-3); }

.gallery { position: relative; margin-top: 22px; }
.gallery__track { list-style: none; margin: 0; padding: 2px 2px 10px; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 2px; overscroll-behavior-x: contain; scrollbar-width: thin; }
.gallery__slide { flex: none; scroll-snap-align: start; }
.gallery__slide figure { margin: 0; display: grid; gap: 8px; }
.gallery__slide a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface-2); cursor: zoom-in; }
.gallery__slide img { display: block; height: clamp(300px, 34vw, 440px); width: auto; max-width: 82vw; object-fit: cover; transition: transform .25s; }
.gallery__slide a:hover img { transform: scale(1.015); }
.gallery__slide figcaption { font-size: .85rem; color: var(--ink-2); max-width: 36ch; }
.gallery__nav { position: absolute; top: calc(50% - 30px); width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-hover); display: grid; place-items: center; padding-bottom: 3px; }
.gallery__nav--prev { left: -12px; }
.gallery__nav--next { right: -12px; }
.gallery__nav:hover { background: var(--surface); }
.gallery__hint { margin: 0; }
@media (hover: none) { .gallery__nav { display: none; } }
@media (max-width: 560px) { .gallery__slide img { height: 340px; } }

.lightbox { position: fixed; inset: 0; z-index: 10001; background: rgba(12, 11, 10, .92); display: grid; place-items: center; padding: 56px 16px 24px; }
.lightbox__figure { margin: 0; display: grid; gap: 12px; justify-items: center; max-width: 100%; }
.lightbox__figure img { max-width: min(1100px, 92vw); max-height: calc(100vh - 140px); width: auto; height: auto; border-radius: 12px; }
.lightbox__figure figcaption { color: #eae6df; font-size: .95rem; text-align: center; }
.lightbox__count { color: #9c968d; margin-left: 8px; font-variant-numeric: tabular-nums; }
.lightbox__close, .lightbox__nav { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; border-radius: 50%; display: grid; place-items: center; }
.lightbox__close { top: 12px; right: 12px; width: 42px; height: 42px; font-size: 1.6rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; padding-bottom: 4px; }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .22); }
@media (max-width: 560px) { .lightbox__nav { display: none; } }
.maker-message { margin-top: 12px; }

.timeline { list-style: none; padding: 0; margin: 12px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline__item { position: relative; padding-left: 34px; padding-bottom: 28px; }
.timeline__marker { position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.timeline__item + .timeline__item .timeline__marker { border-color: var(--line-strong); }
.timeline__head h3 { font-size: 1.1rem; margin: 0; }
.timeline__head .meta { margin: 2px 0 10px; }
.version { font-family: var(--mono); font-size: .92em; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: .1em .45em; border-radius: 6px; margin-right: .3em; }
.why { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; }
.why h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 4px; }
.why p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.timeline__notes { margin-top: 12px; }
.timeline__notes h4 { font-size: .8rem; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.timeline__notes ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .95rem; }
.kind-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }

/* ── Article ───────────────────────────────────────────────────────────── */
.article__head { padding-block: 28px 12px; }
.article__kind { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.version-link { font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.article__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.article__foot { display: grid; gap: 12px; margin-top: 36px; }
.app-strip { display: flex; align-items: center; gap: 14px; }
.app-strip .link-arrow { margin-left: auto; color: var(--accent); }
@media (max-width: 520px) { .app-strip .link-arrow { display: none; } }

.profile { display: flex; gap: clamp(16px, 3vw, 28px); align-items: flex-start; margin-top: 12px; }
.profile h1 { margin-bottom: .1em; }
.profile .lead { margin: .6em 0; }
.profile .badges { margin-top: 10px; }
@media (max-width: 560px) { .profile { flex-direction: column; } }

/* ── Prose (rendered Markdown) ─────────────────────────────────────────── */
.prose { font-size: 1.05rem; line-height: 1.75; overflow-wrap: break-word; padding-top: 18px; }
.prose--compact { font-size: .98rem; line-height: 1.65; padding-top: 0; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2 { font-size: 1.45rem; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 1.18rem; margin: 1.6em 0 .5em; }
.prose h4 { font-size: 1rem; margin: 1.4em 0 .4em; }
.prose--compact h1, .prose--compact h2, .prose--compact h3 { font-size: 1rem; margin: 1em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li + li { margin-top: .3em; }
.prose blockquote { margin: 1.2em 0; padding: .2em 1.1em; border-left: 3px solid var(--accent); color: var(--ink-2); background: var(--surface); border-radius: 0 8px 8px 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .12em .38em; border-radius: 5px; }
.prose pre { background: #1c1917; color: #f4f1ec; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: .88rem; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.prose img { border-radius: 10px; border: 1px solid var(--line); display: block; margin: 1.2em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: .92rem; margin: 1.2em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: .45em .7em; text-align: left; }
.prose th { background: var(--surface-2); }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }

/* ── Stars, perks, support, highlights ─────────────────────────────────── */
.badge--perk { background: var(--accent-soft); color: var(--accent); }
.badge--maker { background: var(--ink); color: var(--bg); font-size: .68rem; padding: .18em .5em; }
.chip--perk::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-right: .5em; background: var(--accent); }
.star-count { margin-left: auto; align-self: flex-start; font-size: .82rem; font-weight: 600; color: var(--sale); white-space: nowrap; }

.star-btn { gap: .5em; }
.star-btn__icon { font-size: 1.05em; line-height: 1; color: var(--sale); }
.star-btn__count { font-variant-numeric: tabular-nums; padding-left: .55em; margin-left: .1em; border-left: 1px solid var(--line-strong); color: var(--ink-2); }
.star-btn.is-on { background: var(--sale-soft); border-color: color-mix(in srgb, var(--sale) 40%, transparent); }

.audience { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.highlights { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.highlights li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: relative; }
.highlights li::before { content: ""; display: block; width: 28px; height: 4px; border-radius: 2px; background: var(--accent); margin-bottom: 12px; }
.highlights h3 { margin-bottom: .3em; }
.highlights p { margin: 0; color: var(--ink-2); font-size: .95rem; }

.callout--perk { border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.callout--perk .eyebrow { margin-bottom: 4px; font-size: .72rem; }
.callout--support { border-left: 4px solid var(--sale); }
.perk-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); margin-bottom: 8px; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 14px; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.claim-status { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: .9rem; background: var(--surface-2); }
.claim-status--granted { background: var(--open-soft); color: var(--open); font-weight: 500; }
.support-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.support-qr summary { cursor: pointer; font-size: .88rem; color: var(--accent); }
.support-qr img { display: block; width: 180px; max-width: 100%; margin-top: 10px; border-radius: 10px; border: 1px solid var(--line); }

/* ── Comments ──────────────────────────────────────────────────────────── */
.comment-form textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: .75em .9em; resize: vertical; }
.comment-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.comment-form__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.comment-signin { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.comment-list { margin-top: 18px; display: grid; }
.comment { display: flex; gap: 12px; padding-block: 14px; border-top: 1px solid var(--line); }
.comment__body { min-width: 0; flex: 1; }
.comment__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.comment__meta .linklike { margin-left: auto; }
.comment__text { margin: 0; overflow-wrap: anywhere; }

/* ── Shared bits (public pages + Studio) ───────────────────────────────── */
.btn--block { width: 100%; }
.btn--danger-solid { background: var(--k-problem); color: #fff; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; }
.linklike:hover { color: var(--ink); text-decoration: underline; }
.dialog .field { margin-top: 12px; }
.dialog .field input, .dialog .field textarea { width: 100%; }

/* ── Toasts & dialog ───────────────────────────────────────────────────── */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 10000; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 11px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: .92rem; box-shadow: var(--shadow-hover); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.is-in { opacity: 1; transform: none; }
.toast--error { background: var(--k-problem); color: #fff; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 9999; background: rgba(20, 18, 16, .45); display: grid; place-items: center; padding: 16px; }
.dialog { width: 100%; max-width: 420px; background: var(--surface); border-radius: 16px; padding: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.dialog h2 { font-size: 1.15rem; }
.dialog p { color: var(--ink-2); }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
