/* LitePage Public Page Reader Stylesheet */
html, body {
    overflow-x: hidden;
    overflow-x: clip;
}

.skip-link {
    position: fixed;
    top: -64px;
    left: 16px;
    z-index: 99999;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--accent, #0070f3);
    color: var(--on-accent, #ffffff);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    transition: top 0.16s ease;
}
.skip-link:focus {
    top: 14px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

:is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--accent, #0070f3);
    outline-offset: 2px;
}

/* Reading progress bar */
.lp-read-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2.5px;
    background: var(--accent, #0070f3);
    transform-origin: left center;
    transform: scaleX(var(--lp-progress, 0));
    z-index: 200;
    pointer-events: none;
    opacity: 0.9;
    transition: transform 0.08s linear;
}

/* Header & Nav */
.page-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 48px;
}
.page-nav-brand {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
}
.page-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border, #e0e0e0);
    background: var(--bg-secondary, #f5f5f7);
    color: var(--text-secondary, #6e6e73);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}
.lang-switcher:hover {
    color: var(--text, #1d1d1f);
    background: var(--bg-elevated, #eee);
}
.lang-switcher svg { flex-shrink: 0; }

/* Compact mobile theme cycle button when theme.css hides .theme-switcher <= 768px */
.theme-cycle-mobile {
    display: none;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid var(--border, #e0e0e0);
    background: var(--bg-secondary, #f5f5f7);
    color: var(--text-secondary, #6e6e73);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
@media (max-width: 768px) {
    .theme-cycle-mobile { display: inline-flex; }
}

/* Blog mode header */
.blog-page-header.page-nav {
    display: block;
    padding: 0 max(24px, calc((100% - 1080px) / 2));
    height: auto;
}
.blog-page-header .blog-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
    gap: 12px;
}
.blog-page-header .blog-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    text-decoration: none;
    transition: opacity 0.3s;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.blog-page-header .blog-title:hover { opacity: 0.7; }
@media (max-width: 640px) {
    .page-nav { padding: 0 16px; }
    .blog-page-header.page-nav { padding-inline: 16px; }
    .blog-page-header .blog-header-inner { height: 44px; }
    .blog-page-header .blog-title { font-size: 16px; }
}

/* Content container */
.page-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 28px 80px;
}
.html-title-header {
    padding: 36px 28px 16px;
}
.page-content h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 10px;
}
.page-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--divider);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}
.page-body {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text);
}
.page-body p { margin-bottom: 16px; }
.page-body h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 34px 0 12px;
    scroll-margin-top: 64px;
}
.page-body h3 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 24px 0 8px;
    scroll-margin-top: 64px;
}
.page-body h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 6px;
    scroll-margin-top: 64px;
}
.page-body ul, .page-body ol { padding-left: 20px; margin-bottom: 16px; }
.page-body li { margin-bottom: 6px; }
.page-body code {
    font-family: var(--font-mono);
    font-size: 14px;
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
}
.page-body pre {
    background: var(--code-bg);
    padding: 16px 20px;
    border-radius: var(--radius-sm, 8px);
    overflow-x: auto;
    margin-bottom: 16px;
}
.page-body pre code { background: none; padding: 0; }
.page-body blockquote {
    border-left: 3px solid var(--border);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--text-secondary);
}
.page-body img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}
.page-body img.is-zoomable { cursor: zoom-in; }

/* Code block wrapper & copy */
.code-block-wrap {
    position: relative;
    margin-bottom: 16px;
}
.page-body .code-block-wrap > pre,
.code-block-wrap > pre {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 38px;
}
.code-block-toolbar {
    position: absolute;
    top: 8px;
    left: 12px;
    right: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    gap: 8px;
}
.code-lang-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    opacity: 0.85;
}
.code-copy-btn {
    pointer-events: auto;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--border, rgba(128, 128, 128, 0.25));
    background: var(--bg-card, rgba(255, 255, 255, 0.88));
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.code-copy-btn:hover {
    color: var(--accent, #0070f3);
    border-color: var(--accent, #0070f3);
}
.code-copy-btn.is-copied {
    color: var(--success, #10b981);
    border-color: var(--success, #10b981);
}

/* Heading anchor button */
.heading-anchor-btn {
    margin-left: 8px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.78em;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.25;
    vertical-align: middle;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.page-body h2:hover .heading-anchor-btn,
.page-body h3:hover .heading-anchor-btn,
.page-body h4:hover .heading-anchor-btn,
.heading-anchor-btn:focus-visible,
.heading-anchor-btn.is-copied {
    opacity: 1;
    color: var(--accent, #0070f3);
    background: color-mix(in srgb, var(--accent, #0070f3) 12%, transparent);
}

/* Extended Markdown & Semantic HTML Elements */
.page-body a:not(.heading-anchor-btn) {
    color: var(--accent, #0070f3);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}
.page-body hr {
    border: none;
    border-top: 1px solid var(--divider, #e0e0e0);
    margin: 32px 0;
}
.page-body ins {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--accent, #0070f3);
    background: color-mix(in srgb, var(--accent, #0070f3) 8%, transparent);
    padding: 0 2px;
    border-radius: 3px;
}
.page-body mark {
    background: color-mix(in srgb, #f59e0b 28%, transparent);
    color: inherit;
    padding: 1px 5px;
    border-radius: 4px;
}
.page-body kbd {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid var(--border, #d1d5db);
    border-bottom-width: 2px;
    background: var(--bg-secondary, #f5f5f7);
    color: var(--text);
    vertical-align: baseline;
}
.page-body details {
    margin: 16px 0;
    padding: 12px 16px;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: var(--radius-sm, 8px);
    background: var(--bg-secondary, #f5f5f7);
}
.page-body details > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    user-select: none;
}
.page-body details[open] > summary {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--divider, #e0e0e0);
}
.page-body details > :last-child {
    margin-bottom: 0;
}
.page-body figure {
    margin: 20px 0;
    text-align: center;
}
.page-body figure img {
    margin-inline: auto;
}
.page-body figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Accessible scrolling table wrapper (preserves table layout & semantics) */
.table-scroll-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
}
.page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}
.table-scroll-wrap > table {
    margin: 0;
}
.page-body th, .page-body td {
    border: 1px solid var(--divider, #e0e0e0);
    padding: 10px 14px;
    text-align: left;
}
.page-body th {
    background: var(--bg-elevated, #f5f5f5);
    font-weight: 600;
}
.page-body tr:nth-child(even) {
    background: var(--bg-elevated, #fafafa);
}

.page-body .task-list-item,
.page-body li:has(> input[type="checkbox"]) {
    list-style: none;
    margin-left: -20px;
}
.page-body .task-list-item input[type="checkbox"],
.page-body li > input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
    accent-color: var(--accent, #6366f1);
}
.page-body del { opacity: 0.6; }
.page-body .footnotes {
    font-size: 13px;
    color: var(--text-secondary);
    border-top: 1px solid var(--divider, #e0e0e0);
    margin-top: 32px;
    padding-top: 16px;
}

.page-footer {
    text-align: center;
    padding: 32px 28px;
    font-size: 12px;
    color: var(--text-tertiary);
    border-top: 1px solid var(--divider);
}

/* ===== TOC Sidebar ===== */
.toc-sidebar {
    position: fixed;
    top: 80px;
    right: max(16px, calc((100% - 820px) / 2 - 224px));
    width: 204px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: none;
    z-index: 50;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.toc-sidebar::-webkit-scrollbar { display: none; }
.toc-sidebar .toc-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding-left: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.toc-sidebar a {
    display: block;
    padding: 5px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
}
.toc-sidebar a:hover { color: var(--accent); }
.toc-sidebar a.active {
    color: var(--accent);
    font-weight: 500;
    border-left-color: var(--accent);
}
.toc-sidebar a.toc-h3 { padding-left: 24px; font-size: 12px; }

.toc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.toc-toggle-btn {
    display: none;
    position: fixed;
    bottom: 84px;
    right: 24px;
    z-index: 98;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    background: var(--bg-card, #fff);
    color: var(--text, #111);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.toc-toggle-btn:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
.toc-close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    margin: -4px;
}
.toc-close-btn:hover { color: var(--text); }

[data-theme="dark"] .toc-toggle-btn {
    background: var(--bg-secondary, #1f2430);
    color: #fff;
}
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] .toc-toggle-btn {
        background: var(--bg-secondary, #1f2430);
        color: #fff;
    }
}

@media (max-width: 1240px) {
    .toc-overlay.drawer-open { display: block; opacity: 1; }
    .toc-sidebar {
        top: 0;
        right: 0;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        width: 260px;
        padding: 24px 16px;
        background: var(--bg-card, #fff);
        border-left: 1px solid var(--border, #e0e0e0);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
        transform: translateX(100%);
        opacity: 0;
        pointer-events: none;
        z-index: 100;
    }
    html[data-theme="dark"] .toc-sidebar {
        background: var(--bg-card, #141720);
    }
    .toc-sidebar.drawer-open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }
    .toc-toggle-btn.has-toc { display: flex; }
    .toc-close-btn { display: block; }
}
@media (max-width: 1240px) and (prefers-color-scheme: dark) {
    html[data-theme="auto"] .toc-sidebar {
        background: var(--bg-card, #141720);
    }
}

/* ===== Subscribe & Related & Prev/Next ===== */
.subscribe-section {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 28px 0;
}
.subscribe-card {
    background: var(--bg-secondary, #f5f5f7);
    border: 1px solid var(--border, #e0e0e0);
    border-radius: var(--radius-lg, 16px);
    padding: 28px 24px;
    text-align: center;
}
.subscribe-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.subscribe-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.subscribe-form { display: flex; gap: 8px; max-width: 400px; margin: 0 auto; }
.subscribe-input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 8px;
    font-size: 13px;
    background: var(--bg-card, #fff);
    color: var(--text);
    outline: none;
}
.subscribe-btn {
    height: 38px;
    padding: 0 18px;
    border: none;
    border-radius: 8px;
    background: var(--accent, #0070f3);
    color: var(--on-accent, #ffffff);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.subscribe-msg { font-size: 12px; margin-top: 8px; color: var(--text-tertiary); display: none; }

.related-section {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 28px 0;
}
.related-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    min-width: 0;
}
.related-card {
    display: block;
    padding: 16px 20px;
    background: var(--bg-secondary, #f5f5f7);
    border: 1px solid var(--border, #e0e0e0);
    border-radius: var(--radius, 12px);
    text-decoration: none;
    color: var(--text);
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    transition: all 0.2s ease;
}
.related-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.related-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.related-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.related-card-tag {
    font-size: 11px;
    padding: 1px 8px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);
    border-radius: 10px;
}
@media (max-width: 640px) {
    .related-grid { grid-template-columns: 1fr; }
    .page-content, .related-section, .post-nav, .subscribe-section { padding-left: 18px; padding-right: 18px; }
}

.post-nav {
    max-width: 820px;
    margin: 0 auto;
    padding: 24px 28px 0;
    display: flex;
    gap: 16px;
}
.post-nav-item {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: block;
    padding: 16px 20px;
    background: var(--bg-secondary, #f5f5f7);
    border: 1px solid var(--border, #e0e0e0);
    border-radius: var(--radius, 12px);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}
.post-nav-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.post-nav-item.next { text-align: right; }
.post-nav-label { font-size: 12px; color: var(--text-tertiary); margin-bottom: 4px; }
.post-nav-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}
@media (max-width: 640px) {
    .post-nav { flex-direction: column; }
}

/* ===== Link Warn Modal ===== */
.link-warn-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.link-warn-modal {
    background: var(--bg-card, #fff);
    border-radius: var(--radius-xl, 24px);
    max-width: 420px;
    width: 90%;
    padding: 32px 28px;
    box-shadow: var(--shadow-xl, 0 20px 50px rgba(0, 0, 0, 0.16));
    border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
    text-align: center;
}

/* ===== Native Dialog Image Lightbox ===== */
.lp-lightbox {
    margin: auto;
    padding: 0;
    border: none;
    background: transparent;
    max-width: min(94%, 1180px);
    max-height: 92dvh;
    overflow: visible;
    color: #fff;
}
.lp-lightbox::backdrop {
    background: rgba(9, 10, 15, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lp-lightbox-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.lp-lightbox-inner img {
    max-width: 100%;
    max-height: 84dvh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    object-fit: contain;
}
.lp-lightbox-caption {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}
.lp-lightbox-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lp-lightbox-close:hover { background: rgba(15, 23, 42, 0.92); }

/* ===== Feedback & Report Floating Widget ===== */
.fb-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--accent, #1a73e8);
    color: var(--on-accent, #ffffff);
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fb-btn:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
.fb-panel {
    position: fixed;
    bottom: 84px;
    right: 24px;
    z-index: 9999;
    box-sizing: border-box;
    width: 320px;
    max-width: calc(100% - 32px);
    max-height: calc(100dvh - 108px);
    overflow-y: auto;
    background: var(--bg-card, #fff);
    color: var(--text);
    border: 1px solid var(--border, transparent);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 20px;
    display: none;
    animation: fbSlideUp 0.25s ease;
}
@keyframes fbSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.fb-tabs { display: flex; gap: 0; margin-bottom: 14px; border-bottom: 1px solid var(--border, #e5e7eb); }
.fb-tab {
    flex: 1;
    padding: 8px 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #6e6e73);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.fb-tab.active { color: var(--accent, #1a73e8); border-bottom-color: var(--accent, #1a73e8); }
.fb-stars { display: flex; gap: 6px; margin: 10px 0 14px; }
.fb-star {
    cursor: pointer;
    color: var(--border, #d1d5db);
    transition: color 0.15s, transform 0.15s;
    background: none;
    border: none;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.fb-star svg { width: 26px; height: 26px; }
.fb-star.active, .fb-star:hover { color: #f59e0b; transform: scale(1.12); }
.fb-ta {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    resize: none;
    background: var(--bg-secondary, #f5f5f7);
    color: var(--text, #111);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.fb-ta:focus { border-color: var(--accent, #0070f3); }
.fb-select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    padding: 10px 34px 10px 12px;
    font-size: 13px;
    background-color: var(--bg-secondary, #f5f5f7);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 13px 13px;
    color: var(--text, #111);
    font-family: inherit;
    outline: none;
    margin-bottom: 10px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.fb-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    background: var(--bg-secondary, #f5f5f7);
    color: var(--text, #111);
    font-family: inherit;
    outline: none;
    margin-top: 10px;
    transition: border-color 0.2s;
}
.fb-input:focus { border-color: var(--accent, #0070f3); }
.fb-submit, .fb-report-submit {
    width: 100%;
    margin-top: 12px;
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    border: none;
    background: var(--accent, #0070f3);
    color: var(--on-accent, #ffffff);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.fb-submit:hover, .fb-report-submit:hover { opacity: 0.9; }
.fb-submit:disabled, .fb-report-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.fb-done { text-align: center; padding: 20px 0; font-size: 15px; color: var(--text, #111); }
.fb-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
@media (max-width: 480px) {
    .fb-btn { right: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
    .toc-toggle-btn { right: 16px; bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 56px); }
    .fb-panel {
        left: 16px;
        right: 16px;
        bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 60px);
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 92px);
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .skip-link,
    .lp-read-progress,
    .page-nav,
    .toc-sidebar,
    .toc-overlay,
    .toc-toggle-btn,
    .subscribe-section,
    .fb-btn,
    .fb-panel,
    .link-warn-overlay,
    .lp-lightbox,
    .code-copy-btn,
    .heading-anchor-btn {
        display: none !important;
    }
    body {
        background: #fff !important;
        color: #111 !important;
    }
    .page-content {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }
    .page-body pre {
        white-space: pre-wrap !important;
        word-break: break-word !important;
        border: 1px solid #ddd;
    }
}
