
        :root {
            --bg: #ffffff;
            --text: #111111;
            --muted: #5f6368;
            --card: #f6f6f7;
            --border: #d9d9dc;
            --accent: #111111;
            --accent-text: #ffffff;
        }
        @media (prefers-color-scheme: dark) {
            :root:not([data-theme="light"]) {
                --bg: #0f0f10;
                --text: #f5f5f5;
                --muted: #a0a0a4;
                --card: #1a1a1d;
                --border: #333336;
                --accent: #f5f5f5;
                --accent-text: #0f0f10;
            }
        }

        * { box-sizing: border-box; }
        html, body { overflow-x: hidden; }
        body {
            margin: 0;
            background: var(--bg);
            color: var(--text);
            font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
            line-height: 1.65;
        }
        .wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
        a { color: var(--text); }
        svg { max-width: 100%; }

        /* Header */
        header.site-header { border-bottom: 1px solid var(--border); padding: 12px 0; position: sticky; top: 0; background: var(--bg); z-index: 10; }
        .header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
        .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 19px; }
        .brand svg { width: 34px; height: 34px; }
        nav.main-nav { display: flex; flex-wrap: wrap; gap: 4px; }
        nav.main-nav a { padding: 6px 10px; border-radius: 6px; text-decoration: none; font-size: 15px; color: var(--text); }
        nav.main-nav a:hover, nav.main-nav a.active { background: var(--card); }
        .nav-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .lang-select { width: auto; padding: 6px 8px; font-size: 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: inherit; }

        /* Headings and intro */
        h1 { font-size: clamp(28px, 4vw, 40px); margin: 30px 0 8px; line-height: 1.2; }
        h2 { font-size: 22px; margin: 36px 0 10px; }
        h3 { font-size: 17px; margin: 22px 0 6px; }
        .intro { color: var(--muted); max-width: 720px; margin: 0 0 24px; }

        /* Tool layout: side panel + wheel */
        .tool { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
        @media (max-width: 820px) { .tool { grid-template-columns: 1fr; } }
        .panel { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
        .panel label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
        textarea#options {
            width: 100%;
            min-height: 220px;
            padding: 12px;
            font-size: 15px;
            font-family: inherit;
            color: var(--text);
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 10px;
            resize: vertical;
        }
        textarea#options:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
        .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
        .field { margin-top: 14px; }
        .field-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
        input[type="range"] { width: 100%; }
        select { width: 100%; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 14px; }
        .btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

        .stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
        .pointer {
            width: 0; height: 0;
            border-left: 14px solid transparent;
            border-right: 14px solid transparent;
            border-top: 26px solid var(--accent);
            margin-bottom: -8px;
            position: relative;
            z-index: 2;
        }
        .wheel-box { position: relative; width: 100%; max-width: 420px; }
        canvas#wheel { width: 100%; height: auto; display: block; }
        canvas.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
        .count { font-size: 13px; color: var(--muted); }

        .btn {
            background: var(--accent);
            color: var(--accent-text);
            border: 0;
            border-radius: 8px;
            padding: 11px 20px;
            font-weight: 700;
            cursor: pointer;
            font-size: 15px;
            text-decoration: none;
            display: inline-block;
        }
        .btn:hover { opacity: .88; }
        .btn:disabled { opacity: .4; cursor: not-allowed; }
        .btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
        .btn-small { padding: 7px 12px; font-size: 13px; }

        .result {
            min-height: 56px;
            font-size: 20px;
            font-weight: 700;
            text-align: center;
            padding: 10px 16px;
            border-radius: 10px;
            background: var(--card);
            border: 1px solid var(--border);
            width: 100%;
        }
        .result.muted { color: var(--muted); font-weight: 400; font-size: 15px; }

        /* Body content sections */
        section.content { margin: 40px 0; }
        section.content ol, section.content ul { padding-left: 22px; }
        .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
        .feature { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--card); }
        .feature h3 { margin-top: 0; }
        .faq-item { border-bottom: 1px solid var(--border); padding: 12px 0; }
        .faq-item summary { font-weight: 600; cursor: pointer; }
        .faq-item p { margin: 8px 0 0; color: var(--muted); }

        /* Toast */
        .toast {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--accent);
            color: var(--accent-text);
            padding: 10px 18px;
            border-radius: 8px;
            font-weight: 600;
            opacity: 0;
            transition: opacity .2s;
            pointer-events: none;
            z-index: 20;
        }
        .toast.show { opacity: 1; }

        /* Footer */
        footer.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 28px 0 36px; font-size: 14px; color: var(--muted); }
        .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
        @media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr; } }
        footer.site-footer h4 { color: var(--text); margin: 0 0 8px; font-size: 14px; }
        footer.site-footer ul { list-style: none; padding: 0; margin: 0; }
        footer.site-footer li { margin-bottom: 6px; }
        footer.site-footer a { color: var(--text); text-decoration: none; }
        footer.site-footer a:hover { text-decoration: underline; }
    
/* ---- content pages ---- */
:root {
    --bg: #ffffff;
    --text: #111111;
    --muted: #5f6368;
    --card: #f6f6f7;
    --border: #d9d9dc;
    --accent: #111111;
    --accent-text: #ffffff;
    --highlight: #fff4d6;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f0f10;
        --text: #f5f5f5;
        --muted: #a0a0a4;
        --card: #1a1a1d;
        --border: #333336;
        --accent: #f5f5f5;
        --accent-text: #0f0f10;
        --highlight: #3a3220;
    }
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.65;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
a { color: var(--text); }
img, svg { max-width: 100%; }

/* Header */
header.site-header { border-bottom: 1px solid var(--border); padding: 12px 0; position: sticky; top: 0; background: var(--bg); z-index: 10; }
.header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 19px; }
.brand svg { width: 34px; height: 34px; }
nav.main-nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav.main-nav a { padding: 6px 10px; border-radius: 6px; text-decoration: none; font-size: 15px; color: var(--text); }
nav.main-nav a:hover, nav.main-nav a.active { background: var(--card); }

/* Headings and intro */
h1 { font-size: clamp(28px, 4vw, 40px); margin: 30px 0 8px; line-height: 1.2; }
h2 { font-size: 22px; margin: 36px 0 10px; }
h3 { font-size: 17px; margin: 22px 0 6px; }
.intro { color: var(--muted); max-width: 720px; margin: 0 0 24px; }

/* Tool layout: side panel + wheel */
.tool { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
@media (max-width: 820px) { .tool { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.panel label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
textarea#options {
    width: 100%;
    min-height: 220px;
    padding: 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    resize: vertical;
}
textarea#options:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.field { margin-top: 14px; }
.field-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
input[type="range"] { width: 100%; }
select { width: 100%; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 14px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pointer {
    width: 0; height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 26px solid var(--accent);
    margin-bottom: -8px;
    position: relative;
    z-index: 2;
}
.wheel-box { position: relative; width: 100%; max-width: 420px; }
canvas#wheel { width: 100%; height: auto; display: block; }
canvas.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.count { font-size: 13px; color: var(--muted); }

.btn {
    background: var(--accent);
    color: var(--accent-text);
    border: 0;
    border-radius: 8px;
    padding: 11px 20px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
    display: inline-block;
}
.btn:hover { opacity: .88; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-small { padding: 7px 12px; font-size: 13px; }

.result {
    min-height: 56px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    width: 100%;
}
.result.muted { color: var(--muted); font-weight: 400; font-size: 15px; }

/* Body content sections */
section.content { margin: 40px 0; }
section.content ol, section.content ul { padding-left: 22px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.feature { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--card); }
.feature h3 { margin-top: 0; }
.faq-item { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq-item summary { font-weight: 600; cursor: pointer; }
.faq-item p { margin: 8px 0 0; color: var(--muted); }

/* Templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.tpl-card { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; }
.tpl-strip { height: 90px; }
.tpl-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tpl-body h3 { margin: 0; }
.tpl-body p { margin: 0; color: var(--muted); font-size: 14px; }
.tpl-body .btn { margin-top: auto; align-self: flex-start; }

/* Blog */
.post { border-bottom: 1px solid var(--border); padding: 22px 0; }
.post h2 { margin-top: 0; }
.post .meta { font-size: 13px; color: var(--muted); }

/* Static pages */
.page { padding-bottom: 20px; }
.page h2 { margin-top: 28px; }
.notice { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; color: var(--muted); }

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--accent-text);
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
    z-index: 20;
}
.toast.show { opacity: 1; }

/* Footer */
footer.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 28px 0 36px; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr; } }
footer.site-footer h4 { color: var(--text); margin: 0 0 8px; font-size: 14px; }
footer.site-footer ul { list-style: none; padding: 0; margin: 0; }
footer.site-footer li { margin-bottom: 6px; }
footer.site-footer a { color: var(--text); text-decoration: none; }
footer.site-footer a:hover { text-decoration: underline; }

/* ---- blog list ---- */
.count { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.blog-card { display: flex; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.blog-icon { flex: 0 0 56px; height: 56px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.blog-body { flex: 1; min-width: 0; }
.blog-card h3 { margin: 0 0 4px; font-size: 22px; }
.blog-card h3 a { color: var(--text); text-decoration: none; }
.blog-card h3 a:hover { text-decoration: underline; }
.blog-meta { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.blog-card p { margin: 0 0 10px; }
.read-more { font-weight: 700; color: var(--text); text-decoration: none; }
.read-more:hover { text-decoration: underline; }
.cta-box { margin: 48px 0 24px; padding: 28px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); text-align: center; }
.cta-box h2 { margin-top: 0; }
@media (max-width: 480px) { .blog-card { flex-direction: column; } }
