* {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    :root {
        --bg: #f5f5f5;
        --bg-box: #fff;
        --text: #333;
        --border: #ddd;
        --border-light: #eee;
        --bg-header: #fafafa;
        --btn-bg: #333;
        --btn-hover: #555;
    }

    body[data-theme="dark"] {
        --bg: #1a1a1a;
        --bg-box: #2d2d2d;
        --text: #e0e0e0;
        --border: #444;
        --border-light: #3a3a3a;
        --bg-header: #252525;
        --btn-bg: #555;
        --btn-hover: #777;
    }

    body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        background: var(--bg);
        color: var(--text);
        line-height: 1.75;
        padding: 28px;
        transition: background 0.2s, color 0.2s;
    }

    .container {
        max-width: 920px;
        margin: 0 auto;
    }

    header {
        text-align: center;
        margin-bottom: 36px;
        padding-bottom: 26px;
        position: sticky;
        top: 0;
        background: var(--bg);
        z-index: 100;
        border-bottom: 1px solid gray;
    }

    h1 {
        font-size: 1.8rem;
        font-weight: 600;
    }

    small {
        display: block;
        margin-bottom: 10px;
        color: var(--text);
        font-size: 0.9rem;
    }

    a {
        color: lightblue;
        text-decoration: none;
    }

    a:hover {
        text-decoration: underline;
    }

    .controls {
        display: flex;
        gap: 14px;
        justify-content: center;
        flex-wrap: wrap;
        align-items: center;
    }

    select,
    input {
        padding: 12px 16px;
        font-size: 1rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--bg-box);
        color: var(--text);
    }

    select {
        cursor: pointer;
        appearance: auto;
    }

    input[type="search"] {
        width: 250px;
    }

    .theme-toggle {
        padding: 10px 15px;
        font-size: 1rem;
        border: 1px solid var(--border);
        border-radius: 4px;
        background: var(--bg-box);
        color: var(--text);
        cursor: pointer;
    }

    .section {
        display: none;
    }

    .section.active {
        display: block;
    }

    .section h2 {
        font-size: 1.35rem;
        margin: 42px 0 22px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--border);
    }

    .box {
        background: var(--bg-box);
        border: 1px solid var(--border);
        border-radius: 6px;
        margin-bottom: 24px;
        overflow: hidden;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
    }

    .box-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 18px;
        background: var(--bg-header);
        border-bottom: 1px solid var(--border-light);
    }

    .box-title {
        font-weight: 600;
        font-size: 1.02rem;
    }

    .box-content {
        padding: 24px 22px 22px;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        font-size: 1rem;
        line-height: 1.8;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        color: var(--text);
    }

    .box-content p,
    .box-content li,
    .box-content small,
    .box-content code {
        line-height: 1.75;
    }

    .box-content ul,
    .box-content ol {
        list-style: none;
        margin: 1rem 0 0;
        padding-left: 0;
    }

    .box-content li {
        margin-bottom: 3rem;
        padding-left: 0;
    }

    .box-content li:last-child {
        margin-bottom: 2rem;
    }

    .box-content code {
        font-family: Consolas, 'Courier New', monospace;
        font-size: 0.95rem;
        background: rgba(255, 255, 255, 0.08);
        padding: 0.12rem 0.35rem;
        border-radius: 4px;
    }

    .box-content small {
        display: block;
        margin-top: 0.3rem;
        color: var(--text);
        opacity: 0.8;
        font-size: 0.92rem;
    }

    .box-content pre {
        margin: 1.2rem 0 0;
        padding: 20px;
        border: 1px solid var(--border-light);
        border-radius: 8px;
        background: var(--bg-header);
        overflow-x: auto;
        white-space: pre;
        tab-size: 4;
        line-height: 1.75;
    }

    .box-content pre code {
        display: block;
        padding: 0;
        margin: 0;
        background: transparent;
        font-family: Consolas, 'Courier New', monospace;
        font-size: 0.95rem;
        line-height: 1.75;
    }

    .box-content pre code {
        display: block;
        padding: 0;
        margin: 0;
        background: transparent;
        font-family: Consolas, 'Courier New', monospace;
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .box-content h3 {
        margin: 1.2rem 0 0.5rem;
        font-size: 1rem;
        font-weight: 600;
    }

    .snippet-title {
        font-size: 1rem;
        margin: 8px 0;
    }

    .snippet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }


    .copy-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
        background: var(--btn-bg);
        color: #fff;
        border: none;
        border-radius: 3px;
        cursor: pointer;
    }

    .copy-btn:hover {
        background: var(--btn-hover);
    }

    .copy-snippet-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 96px;
        height: 32px;
        padding: 0 12px;
        font-size: 0.8rem;
        font-weight: 600;
        background: var(--btn-bg);
        color: #fff;
        border: 1px solid transparent;
        border-radius: 6px;
        cursor: pointer;
        flex-shrink: 0;
        white-space: nowrap;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
        transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    }

    .copy-snippet-btn:hover {
        background: var(--btn-hover);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    }

    .copy-snippet-btn:active {
        transform: translateY(1px);
    }

    .copy-snippet-btn:focus-visible {
        outline: 2px solid var(--btn-hover);
        outline-offset: 2px;
    }

    .box-content pre {
        margin: 8px 0 16px;
        padding: 12px;
        border: 1px solid var(--border-light);
        border-radius: 4px;
        background: var(--bg-header);
        overflow-x: auto;
    }

    .box-content .box-list {
        list-style: none;
        padding-left: 0;
        margin: 0;
    }

    .box-content .box-list li {
        margin-bottom: 10px;
        line-height: 1.6;
    }

    .box-content .box-list li strong {
        display: inline-block;
        min-width: 140px;
    }

    .box-content code {
        font-family: Consolas, 'Courier New', monospace;
        line-height: 1.5;
    }

    .hidden {
        display: none !important;
    }

    .dropdown-group {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .dropdown-group label {
        font-size: 0.9rem;
        color: var(--text);
    }

    .box.guide {
        border-left: 4px solid #e67e22;
    }

    .box.guide .box-header {
        background: #fff3e0;
    }

    [data-theme="dark"] .box.guide .box-header {
        background: #3d2a1a;
    }

    .box.guide .copy-btn {
        display: none;
    }

    .box.guide .box-title::before {
        content: "📌 ";
    }