/* Button gallery pages (/css-buttons/...). Builds on app.css tokens and components. */
.g-page .topbar { justify-content: space-between; }
.g-main { max-width: 1200px; margin: 0 auto; padding: 20px 24px 40px; }
.g-main a { color: var(--accent); text-underline-offset: 3px; }
.g-main a:hover { color: #c4b5fd; }

.g-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 12px; color: var(--dim); }
.g-crumbs li + li::before { content: '›'; margin-right: 6px; }
.g-crumbs a { color: var(--muted); text-decoration: none; }
.g-crumbs a:hover { color: var(--text); }

.g-hero { margin: 8px 0 26px; max-width: 760px; }
.g-hero h1 { margin: 0 0 12px; font: 700 clamp(28px, 4.4vw, 44px)/1.08 var(--display); letter-spacing: -.03em; }
.g-lead { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.g-lead code, .g-blurb code, .g-prose code { font: 500 .9em var(--mono); color: #e9d5ff; background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 5px; }

.g-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.g-chips a {
    padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel);
    color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none;
}
.g-chips a:hover, .g-chips a[aria-current] { border-color: var(--accent); background: rgba(167,139,250,.12); color: var(--text); }

.g-section { margin: 0 0 44px; }
.g-section .section-head h2 a { color: var(--text); text-decoration: none; }
.g-section .section-head h2 a:hover { color: var(--accent); }
.g-blurb { margin: -4px 0 16px; max-width: 760px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.g-more { margin: 14px 0 0; font-weight: 600; }
.g-grid { margin-bottom: 40px; }

.g-main .preset { color: var(--text); text-decoration: none; }
.g-main .preset:hover { color: var(--text); }
.preset-name { margin: 0; font: 600 13px var(--display); }
.preset-view[data-bg="void"] { color: #fff; }

.g-az { columns: 4 160px; gap: 24px; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 2; }
.g-az a { color: var(--muted); text-decoration: none; }
.g-az a:hover { color: var(--text); }

/* Preset page */
.g-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; margin-bottom: 36px; align-items: start; }
.g-stage {
    position: relative; min-height: 360px; border-radius: 18px; border: 1px solid var(--line); overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 40px 20px 20px;
}
.g-stage[data-bg="void"], .g-stage[data-bg="checker"] {
    background-color: #0a0a12;
    background-image: radial-gradient(ellipse at 50% 45%, rgba(124,58,237,.18), transparent 60%),
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 100% 100%, 32px 32px, 32px 32px;
}
.g-stage[data-bg="aurora"] { background: linear-gradient(125deg, #4c1d95, #be185d, #ea580c, #0e7490); }
.g-stage[data-bg="paper"] { background: #f6f7fb radial-gradient(rgba(15,23,42,.12) 1px, transparent 1px) 0 0 / 22px 22px; }
.g-stage[data-bg="clay"] { background: #e0e5ec; }
.g-stage > button { transform: scale(1.25); margin: auto 0; }
.g-main .g-edit { color: #fff; }
.g-code { display: grid; gap: 14px; }
.g-code .code { max-height: 340px; }
.g-code-title { margin: 0; font: 600 12px var(--mono); color: var(--muted); letter-spacing: .04em; }

.g-prose { max-width: 760px; margin: 0 0 44px; font-size: 15px; line-height: 1.7; color: #cfcfe0; }
.g-prose h2 { margin: 28px 0 10px; font: 700 22px/1.2 var(--display); letter-spacing: -.02em; color: var(--text); }
.g-prose h2:first-child { margin-top: 0; }
.g-prose ul, .g-prose ol { padding-left: 20px; }
.g-prose li { margin: 6px 0; }
.g-prose b { color: var(--text); }
.g-note { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); font-size: 14px; }

.g-pager { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 44px; font-weight: 600; }
.g-styles h2 { margin: 0 0 14px; font: 700 18px var(--display); }

@media (max-width: 900px) {
    .g-detail { grid-template-columns: 1fr; }
    .g-stage { min-height: 280px; }
}
@media (max-width: 640px) {
    .g-main { padding: 14px 16px 32px; }
    .g-page .topbar { padding: 10px 16px; }
    .g-page .brand-name { font-size: 14px; }
}
