/**
 * Web 前台主题变量与基础样式（配合 Bootstrap 5）。
 * 通过 html[data-theme="light|dark"] 切换明暗主题。
 */
:root,
html[data-theme="light"] {
    --web-color-primary: #ff5a5f;
    --web-color-primary-hover: #e84e53;
    --web-color-accent: #667eea;
    --web-color-success: #198754;
    --web-color-success-hover: #146c43;
    --web-color-danger: #dc3545;
    --web-color-danger-hover: #bb2d3b;
    --web-link-button-bg: #0d6efd;
    --web-link-button-bg-hover: #0b5ed7;
    --web-link-button-text: #ffffff;
    --web-video-badge-free-bg: #198754;
    --web-video-badge-author-bg: #0d6efd;
    --web-video-badge-price-bg: #d9901f;
    --web-video-badge-member-bg: #b7791f;
    --web-video-badge-purchased-bg: #6c757d;
    --web-video-badge-promoted-bg: #7c3aed;

    --web-bg-body: #f5f5f5;
    --web-bg-surface: #ffffff;
    --web-bg-muted: #f8f9fa;
    --web-bg-header: #ffffff;
    --web-bg-footer: #ffffff;
    --web-bg-media-stage: #050505;

    --web-text-primary: #212529;
    --web-text-secondary: #6c757d;
    --web-text-muted: #adb5bd;
    --web-text-inverse: #ffffff;
    --web-media-overlay-text: #ffffff;
    --web-media-overlay-outline: rgba(0, 0, 0, 0.92);
    --web-media-overlay-muted: #d8dadd;
    --web-color-gold: #ffd166;
    --web-frame-gold: #f2c94c;
    --web-frame-gold-highlight: #fff1a8;
    --web-frame-gold-deep: #a97812;

    --web-border-color: #dee2e6;
    --web-banner-desc-text: #ffffff;
    --web-banner-desc-overlay-start: rgba(0, 0, 0, 0.46);
    --web-banner-desc-overlay-mid: rgba(0, 0, 0, 0.24);
    --web-banner-desc-overlay-end: rgba(0, 0, 0, 0);
    --web-overlay-backdrop: rgba(18, 18, 18, 0.56);
    --web-overlay-level: 1;
    --web-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --web-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);

    --web-header-height: 56px;
    --web-tabbar-height: 50px;
    --web-content-max-width: 1280px;
    --web-radius: 0.5rem;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --web-color-primary: #ff7a7e;
    --web-color-primary-hover: #ff5a5f;
    --web-color-accent: #8b9cf7;
    --web-color-success: #75b798;
    --web-color-success-hover: #8fd0ad;
    --web-color-danger: #ea868f;
    --web-color-danger-hover: #f0a0a8;
    --web-link-button-bg: #2563eb;
    --web-link-button-bg-hover: #1d4ed8;
    --web-link-button-text: #ffffff;
    --web-video-badge-free-bg: #2f9e63;
    --web-video-badge-author-bg: #5c9cff;
    --web-video-badge-price-bg: #d89b35;
    --web-video-badge-member-bg: #e0a84b;
    --web-video-badge-purchased-bg: #868e96;
    --web-video-badge-promoted-bg: #a78bfa;

    --web-bg-body: #121212;
    --web-bg-surface: #1e1e1e;
    --web-bg-muted: #2a2a2a;
    --web-bg-header: #1a1a1a;
    --web-bg-footer: #1a1a1a;
    --web-bg-media-stage: #050505;

    --web-text-primary: #f1f3f5;
    --web-text-secondary: #adb5bd;
    --web-text-muted: #868e96;
    --web-text-inverse: #121212;
    --web-media-overlay-text: #ffffff;
    --web-media-overlay-outline: rgba(0, 0, 0, 0.94);
    --web-media-overlay-muted: #c9ccd1;
    --web-color-gold: #ffdc7d;
    --web-frame-gold: #ffd75a;
    --web-frame-gold-highlight: #fff4b8;
    --web-frame-gold-deep: #b98517;

    --web-border-color: #343a40;
    --web-banner-desc-text: #ffffff;
    --web-banner-desc-overlay-start: rgba(0, 0, 0, 0.5);
    --web-banner-desc-overlay-mid: rgba(0, 0, 0, 0.26);
    --web-banner-desc-overlay-end: rgba(0, 0, 0, 0);
    --web-overlay-backdrop: rgba(0, 0, 0, 0.78);
    --web-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.35);
    --web-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
}

html {
    scroll-behavior: smooth;
}

.web-detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin: 1rem 0;
}

.web-detail-link-item {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    max-width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid var(--web-link-button-bg);
    border-radius: var(--web-radius);
    background: var(--web-link-button-bg);
    color: var(--web-link-button-text);
    box-shadow: var(--web-shadow-sm);
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.web-detail-link-item:visited {
    color: var(--web-link-button-text);
}

.web-detail-link-item:hover,
.web-detail-link-item:focus-visible {
    border-color: var(--web-link-button-bg-hover);
    background: var(--web-link-button-bg-hover);
    color: var(--web-link-button-text);
    box-shadow: var(--web-shadow-md);
    transform: translateY(-1px);
}

.web-detail-link-item:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--web-link-button-bg) 35%, transparent);
    outline-offset: 2px;
}

.web-detail-link-item:active {
    transform: translateY(0);
}

.web-detail-link-item .bi {
    flex: 0 0 auto;
}

.web-detail-link-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

body.web-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--web-bg-body);
    color: var(--web-text-primary);
}

body.web-body:has(> .web-header-root) {
    --web-header-height: 0px;
}

.web-community-page,
.web-community-modal {
    --web-radius: 0.375rem;
}

.web-page-gallery {
    --web-gallery-space: clamp(1.75rem, 4vw, 3.25rem);
    --web-gallery-rule: color-mix(in srgb, var(--web-border-color) 72%, transparent);
}

.web-page-gallery .web-banner-list-wrap {
    margin-bottom: var(--web-gallery-space);
}

.web-page-gallery .web-banner-item {
    border: 0;
    border-radius: calc(var(--web-radius) * 1.5);
    box-shadow: none;
}

.web-page-gallery .web-route-detail-content {
    margin-bottom: var(--web-gallery-space);
    padding: 0 0 1.2rem;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--web-gallery-rule);
    border-radius: 0;
    box-shadow: none;
}

.web-gallery-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.web-gallery-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--web-gallery-rule);
}

.web-gallery-heading > * {
    margin: 0;
    color: var(--web-text-primary);
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    font-weight: 750;
    letter-spacing: -0.02em;
}

.web-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--web-header-height);
    background-color: var(--web-bg-header);
    border-bottom: 1px solid var(--web-border-color);
    box-shadow: var(--web-shadow-sm);
}

.web-header-root {
    display: none;
}

.web-header .container-fluid {
    height: 100%;
}

.web-navbar-subpage {
    display: grid;
    grid-template-columns: 2.25rem 1fr 2.25rem;
    align-items: center;
    gap: 0.5rem;
}

.web-navbar-actions-2 {
    grid-template-columns: 2.25rem minmax(0, 1fr) 5rem;
}

.web-navbar-subpage-start,
.web-navbar-subpage-end {
    display: flex;
    align-items: center;
}

.web-navbar-subpage-end {
    justify-content: flex-end;
}

.web-navbar-actions-spaced {
    gap: 0.45rem;
    min-width: 5rem;
}

.web-navbar-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--web-text-primary);
    text-decoration: none;
    border-radius: 50%;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.web-navbar-back:hover {
    color: var(--web-color-primary);
    background-color: var(--web-bg-muted);
}

.web-navbar-action {
    display: inline-flex;
    flex: 0 0 2.25rem;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    color: var(--web-text-primary);
    text-decoration: none;
    border: 1px solid var(--web-border-color);
    border-radius: 50%;
    background: var(--web-bg-muted);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.web-navbar-action:hover {
    color: var(--web-color-primary);
    border-color: var(--web-color-primary);
    background: var(--web-bg-surface);
}

.web-navbar-back .bi {
    font-size: 1.375rem;
    line-height: 1;
}

.web-navbar-action .bi {
    font-size: 1rem;
    line-height: 1;
}

.web-navbar-title {
    min-width: 0;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--web-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.web-navbar-title-link {
    display: block;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.web-navbar-title-link:hover,
.web-navbar-title-link:focus-visible {
    color: var(--web-color-primary);
}

.web-navbar-title-link:focus-visible {
    outline: 2px solid var(--web-color-primary);
    outline-offset: 2px;
}

.web-result-page {
    width: 100%;
    max-width: 42rem;
    margin: 0 auto;
    padding: 2rem .75rem 5rem;
}

.web-result-panel {
    --web-result-color: var(--web-color-primary);
    --web-result-color-hover: var(--web-color-primary-hover);

    display: grid;
    justify-items: center;
    gap: 1.1rem;
    padding: 2rem 1rem;
    border: 1px solid var(--web-border-color);
    border-radius: 8px;
    background: var(--web-bg-surface);
    box-shadow: var(--web-shadow-sm);
    text-align: center;
}

.web-result-success {
    --web-result-color: var(--web-color-success);
    --web-result-color-hover: var(--web-color-success-hover);
}

.web-result-error {
    --web-result-color: var(--web-color-danger);
    --web-result-color-hover: var(--web-color-danger-hover);
}

.web-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--web-result-color) 12%, var(--web-bg-muted));
    color: var(--web-result-color);
    font-size: 2rem;
}

.web-result-copy {
    display: grid;
    gap: .45rem;
}

.web-result-title {
    margin: 0;
    color: var(--web-text-primary);
    font-size: 1.35rem;
    font-weight: 800;
}

.web-result-message {
    margin: 0;
    color: var(--web-text-secondary);
    line-height: 1.7;
}

.web-result-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 44px;
    padding: .7rem 1.25rem;
    border-radius: 8px;
    background: var(--web-result-color);
    color: var(--web-text-inverse);
    font-weight: 800;
    text-decoration: none;
}

.web-result-action:hover,
.web-result-action:focus {
    background: var(--web-result-color-hover);
    color: var(--web-text-inverse);
}

.web-brand {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--web-text-primary);
    text-decoration: none;
}

.web-brand:hover {
    color: var(--web-color-primary);
}

.web-nav-link {
    color: var(--web-text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--web-radius);
    transition: color 0.15s ease, background-color 0.15s ease;
}

.web-nav-link:hover,
.web-nav-link.active {
    color: var(--web-color-primary);
    background-color: var(--web-bg-muted);
}

.web-main {
    flex: 1;
    width: 100%;
    max-width: var(--web-content-max-width);
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
}

.web-breadcrumb {
    width: 100%;
    min-width: 0;
    margin: 0 0 1rem;
}

.web-breadcrumb-list {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    margin: 0;
    padding: 0 0.25rem;
    overflow: hidden;
    list-style: none;
    border: 1px solid var(--web-border-color);
    border-radius: var(--web-radius);
    background: var(--web-bg-surface);
    box-shadow: var(--web-shadow-sm);
}

.web-breadcrumb-item {
    display: flex;
    align-items: center;
    min-width: 0;
    color: var(--web-text-secondary);
    font-size: 0.6875rem;
}

.web-breadcrumb-item + .web-breadcrumb-item::before {
    flex: 0 0 auto;
    margin: 0;
    color: var(--web-text-muted);
    content: "›";
}

.web-breadcrumb-item:not(.active) {
    flex: 0 0 auto;
}

.web-breadcrumb-item a,
.web-breadcrumb-current {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    min-width: 0;
    min-height: 2.75rem;
    color: inherit;
    text-decoration: none;
}

.web-breadcrumb-item a:hover,
.web-breadcrumb-item a:focus-visible {
    color: var(--web-color-primary);
}

.web-breadcrumb-item a:focus-visible {
    outline: 2px solid var(--web-color-primary);
    outline-offset: -2px;
    border-radius: calc(var(--web-radius) * 0.5);
}

.web-breadcrumb-item.active {
    flex: 1 1 0;
    overflow: hidden;
    color: var(--web-text-primary);
    font-weight: 600;
}

.web-breadcrumb-item.active .web-breadcrumb-current {
    width: 100%;
}

.web-breadcrumb-item span,
.web-breadcrumb-current > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .web-breadcrumb-list {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .web-breadcrumb-item + .web-breadcrumb-item::before {
        margin-right: 0.5rem;
        margin-left: 0.5rem;
    }

    .web-breadcrumb-item {
        font-size: 0.875rem;
    }

    .web-breadcrumb-item a,
    .web-breadcrumb-current {
        gap: 0.4rem;
    }
}

.web-detail-floating-contacts {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: calc(var(--web-tabbar-height) + env(safe-area-inset-bottom, 0px) + 1rem);
    z-index: 1020;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.web-detail-floating-contacts .web-detail-floating-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    min-height: 3.25rem;
    padding: 0;
    overflow: visible;
    border: 1px solid color-mix(in srgb, var(--web-color-primary) 70%, var(--web-border-color));
    border-radius: 50%;
    background: var(--web-color-primary);
    color: var(--web-text-inverse);
    box-shadow: var(--web-shadow-md);
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.web-detail-floating-contacts .web-detail-floating-contact.is-telegram {
    border-color: color-mix(in srgb, var(--web-color-accent) 70%, var(--web-border-color));
    background: var(--web-color-accent);
}

.web-detail-floating-contacts .web-detail-floating-contact:hover,
.web-detail-floating-contacts .web-detail-floating-contact:focus-visible {
    border-color: var(--web-color-primary-hover);
    background: var(--web-color-primary-hover);
    color: var(--web-text-inverse);
    transform: translateY(-2px);
}

.web-detail-floating-contacts .web-detail-floating-contact.is-telegram:hover,
.web-detail-floating-contacts .web-detail-floating-contact.is-telegram:focus-visible {
    border-color: var(--web-color-accent);
    background: color-mix(in srgb, var(--web-color-accent) 82%, var(--web-text-primary));
}

.web-detail-floating-contacts .web-detail-floating-contact:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--web-color-primary) 40%, transparent);
    outline-offset: 3px;
}

.web-detail-floating-contacts .web-detail-floating-contact i {
    color: currentColor;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .web-detail-floating-contacts {
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

.web-toast-root {
    position: fixed;
    left: 50%;
    bottom: calc(var(--web-tabbar-height) + env(safe-area-inset-bottom, 0px) + 10rem);
    z-index: 1600;
    display: grid;
    gap: 0.5rem;
    width: min(calc(100vw - 2rem), 24rem);
    pointer-events: none;
    transform: translateX(-50%);
}

.web-toast {
    justify-self: center;
    max-width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--web-border-color);
    border-radius: var(--web-radius);
    background: var(--web-bg-surface);
    box-shadow: var(--web-shadow-md);
    color: var(--web-text-primary);
    font-size: 0.9375rem;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.web-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.web-overlay-root {
    position: static;
}

.web-overlay-backdrop {
    position: fixed;
    inset: 0;
    z-index: calc(1080 + var(--web-overlay-level, 1) * 20);
    background: var(--web-overlay-backdrop);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.web-overlay-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.web-overlay-sheet[hidden],
.web-overlay-modal[hidden],
.web-overlay-panel:not(.web-overlay-visible) {
    display: none !important;
}

.web-overlay-panel.web-overlay-visible {
    display: flex;
}

.web-overlay-sheet:not([hidden]),
.web-overlay-modal:not([hidden]) {
    display: flex;
}

.web-overlay-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: calc(1090 + var(--web-overlay-level, 1) * 20);
    width: 100vw;
    max-width: 100vw;
    max-height: min(72vh, calc(100vh - var(--web-header-height)));
    flex-direction: column;
    background: var(--web-bg-surface);
    color: var(--web-text-primary);
    border-top: 1px solid var(--web-border-color);
    border-top-left-radius: var(--web-radius);
    border-top-right-radius: var(--web-radius);
    box-shadow: var(--web-shadow-md);
    overflow: hidden;
}

.web-overlay-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: calc(1090 + var(--web-overlay-level, 1) * 20);
    width: min(calc(100vw - 2rem), 34rem);
    max-height: calc(100vh - 2rem);
    flex-direction: column;
    background: var(--web-bg-surface);
    color: var(--web-text-primary);
    border: 1px solid var(--web-border-color);
    border-radius: var(--web-radius);
    box-shadow: var(--web-shadow-md);
    overflow: hidden;
    transform: translate(-50%, -50%);
}

.web-overlay-modal .modal-header,
.web-overlay-modal .modal-footer,
.web-overlay-sheet .offcanvas-header,
.web-overlay-sheet .modal-header,
.web-overlay-sheet .modal-footer {
    flex-shrink: 0;
    padding: 0.875rem 1rem;
}

.web-overlay-modal .modal-body,
.web-overlay-sheet .offcanvas-body,
.web-overlay-sheet .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.web-overlay-modal .modal-footer {
    gap: 0.75rem;
}

.web-overlay-modal .btn-close:focus:not(:focus-visible),
.web-overlay-sheet .btn-close:focus:not(:focus-visible) {
    outline: 0;
    box-shadow: none;
}

.web-overlay-modal .btn-close:focus-visible,
.web-overlay-sheet .btn-close:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--web-color-primary) 24%, transparent);
}

.web-overlay-sheet .offcanvas-header,
.web-overlay-sheet .offcanvas-body,
.web-overlay-sheet .modal-header,
.web-overlay-sheet .modal-body,
.web-overlay-sheet .modal-footer {
    width: 100%;
    margin-inline: auto;
}

@media (max-width: 768px) {
    .web-body:has(.web-tabbar) .web-main {
        padding-bottom: calc(var(--web-tabbar-height) + env(safe-area-inset-bottom, 0px) + 1.25rem);
    }
}

@media (min-width: 768px) {
    body.web-body:has(> .web-header-root) {
        --web-header-height: 56px;
    }

    .web-header-root {
        display: block;
    }

    .web-overlay-sheet .offcanvas-header,
    .web-overlay-sheet .offcanvas-body,
    .web-overlay-sheet .modal-header,
    .web-overlay-sheet .modal-body,
    .web-overlay-sheet .modal-footer {
        width: min(calc(100vw - 2rem), var(--web-content-max-width));
        max-width: none;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .web-toast-root {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 1.25rem);
    }
}

.web-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: calc(var(--web-tabbar-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background-color: var(--web-bg-header);
    border-top: 1px solid var(--web-border-color);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] .web-tabbar {
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

.web-tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    min-width: 0;
    padding: 0.25rem 0.125rem;
    color: var(--web-text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.web-tabbar-item .bi {
    font-size: 1.375rem;
    line-height: 1;
}

.web-tabbar-icon-wrap {
    position: relative;
    display: inline-grid;
    place-items: center;
}

.web-tabbar-label {
    font-size: 0.625rem;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.web-tabbar-item:hover,
.web-tabbar-item.active {
    color: var(--web-color-primary);
}

.web-nav-link[data-web-unread-badge-target],
.web-tabbar-item[data-web-unread-badge-target] {
    position: relative;
}

.web-unread-badge {
    position: absolute;
    top: -0.35rem;
    right: -0.55rem;
    display: inline-grid;
    min-width: 1rem;
    height: 1rem;
    place-items: center;
    padding: 0 0.25rem;
    border: 1px solid var(--web-bg-surface);
    border-radius: 999px;
    background: var(--web-color-danger);
    color: var(--web-text-inverse);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.web-nav-link .web-unread-badge {
    top: 0.15rem;
    right: 0.2rem;
}

.web-unread-badge.is-hidden {
    display: none;
}

.web-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--web-border-color);
    border-radius: 50%;
    background-color: var(--web-bg-muted);
    color: var(--web-text-primary);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.web-theme-toggle:hover {
    background-color: var(--web-bg-surface);
    border-color: var(--web-color-primary);
}

.web-card {
    background-color: var(--web-bg-surface);
    border: 1px solid var(--web-border-color);
    border-radius: var(--web-radius);
    box-shadow: var(--web-shadow-sm);
}

.web-detail-comment-item {
    scroll-margin-top: 5rem;
    transition: background-color .2s ease, box-shadow .2s ease;
}

.web-detail-comment-item.web-detail-comment-focus {
    border-radius: 8px;
    background: color-mix(in srgb, var(--web-color-primary) 10%, var(--web-bg-surface));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--web-color-primary) 55%, transparent);
}

.web-video-uploader {
    width: 100%;
}

.web-post-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr));
    gap: 0.5rem;
    align-items: start;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-top: 0.75rem;
}

.web-post-video-item {
    position: relative;
    min-width: 0;
}

.web-post-video-player {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--web-border-color);
    border-radius: calc(var(--web-radius) - 0.125rem);
    background-color: var(--web-bg-muted);
}

.web-post-video-item video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: color-mix(in srgb, var(--web-text-primary) 92%, transparent);
}

.web-post-media-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--web-text-inverse) 20%, transparent);
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--web-text-primary) 62%, transparent);
    color: var(--web-text-inverse);
    line-height: 1;
    cursor: pointer;
}

.web-post-upload-status {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--web-border-color);
    border-radius: calc(var(--web-radius) - 0.125rem);
    background-color: var(--web-bg-muted);
}

.web-post-upload-spinner {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.1rem;
    border: 2px solid color-mix(in srgb, var(--web-color-primary) 20%, transparent);
    border-top-color: var(--web-color-primary);
    border-radius: 50%;
    animation: web-spin 0.75s linear infinite;
}

.web-post-upload-status-body {
    flex: 1;
    min-width: 0;
}

.web-post-upload-text {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--web-text-secondary);
    font-size: 0.875rem;
}

.web-post-progress {
    height: 0.35rem;
    overflow: hidden;
    border-radius: 999px;
    background-color: color-mix(in srgb, var(--web-text-primary) 8%, var(--web-bg-muted));
}

.web-post-progress-bar {
    height: 100%;
    width: 0;
    background-color: var(--web-color-primary);
    transition: width 0.2s ease;
}

.web-video-cover-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--web-border-color);
    border-radius: var(--web-radius);
    box-sizing: border-box;
    background-color: var(--web-bg-muted);
}

.web-post-video-item .web-video-cover-panel {
    margin-top: 0.5rem !important;
}

.web-video-cover-title {
    margin-bottom: 0.25rem;
    color: var(--web-text-primary);
    font-weight: 600;
}

.web-video-cover-sub {
    margin-bottom: 0.75rem;
    color: var(--web-text-secondary);
    font-size: 0.875rem;
}

.web-video-cover-frames {
    display: flex;
    gap: 0.5rem;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.web-video-cover-frame {
    flex: 0 0 auto;
    width: 7.5rem;
    height: 4.25rem;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: calc(var(--web-radius) - 0.125rem);
    background-color: var(--web-bg-surface);
    cursor: pointer;
}

.web-video-cover-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.web-video-cover-frame.active {
    border-color: var(--web-color-primary);
}

.web-video-cover-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@keyframes web-spin {
    to {
        transform: rotate(360deg);
    }
}

.web-empty-placeholder {
    min-height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--web-text-muted);
}

[data-theme="dark"] .text-bg-light {
    background-color: var(--web-bg-muted) !important;
    color: var(--web-text-primary) !important;
}

.web-banner-list-wrap {
    margin: 0 0 0.875rem;
}

.web-banner-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
}

.web-banner-item {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--web-border-color);
    border-radius: var(--web-radius);
    background-color: var(--web-bg-muted);
    aspect-ratio: 320 / 100;
}

.web-banner-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.web-banner-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.web-banner-desc {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding: 1rem 0.75rem 0.5rem;
    overflow: hidden;
    color: var(--web-banner-desc-text);
    background: linear-gradient(
        to top,
        var(--web-banner-desc-overlay-start) 0%,
        var(--web-banner-desc-overlay-mid) 54%,
        var(--web-banner-desc-overlay-end) 100%
    );
    font-size: 0.875rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

@media (min-width: 768px) {
    .web-banner-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: var(--web-content-max-width);
        margin-right: auto;
        margin-left: auto;
    }

    .web-banner-item {
        max-width: 635px;
    }
}

.web-home-ranking {
    margin: 0 0 0.875rem;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.web-home-ranking-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0.7rem;
    border-bottom: 1px solid var(--web-gallery-rule);
}

.web-home-ranking-title {
    margin: 0;
    color: var(--web-text-primary);
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    font-weight: 750;
    line-height: 1.35;
}

.web-home-link-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0 0 0.875rem;
}

.web-home-link-item {
    display: flex;
    min-width: 0;
    min-height: 3rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0.875rem;
    color: var(--web-text-primary);
    text-decoration: none;
    background: var(--web-bg-surface);
    border: 1px solid var(--web-border-color);
    border-radius: var(--web-radius);
    box-shadow: var(--web-shadow-sm);
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.web-home-link-item:hover,
.web-home-link-item:focus-visible {
    color: var(--web-color-primary);
    border-color: var(--web-color-primary);
    background: var(--web-bg-muted);
}

.web-home-link-label {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.9375rem;
    font-weight: 650;
    line-height: 1.35;
}

.web-home-link-item .bi {
    flex: 0 0 auto;
    color: var(--web-text-muted);
    font-size: 0.95rem;
    line-height: 1;
}

.web-page-button-item {
    justify-content: flex-start;
    color: var(--web-page-button-text-color, var(--web-text-primary));
    background: transparent;
    border-color: var(--web-page-button-border-color, var(--web-border-color));
    box-shadow: none;
}

.web-page-button-item:hover,
.web-page-button-item:focus-visible {
    color: var(--web-page-button-text-color, var(--web-text-primary));
    background: transparent;
    border-color: var(--web-page-button-border-color, var(--web-border-color));
}

.web-page-button-item .bi {
    color: inherit;
}

.web-page-button-icon {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    object-fit: cover;
    border-radius: calc(var(--web-radius) * 0.7);
}

.web-page-button-item .web-home-link-label {
    flex: 1 1 auto;
}

.web-home-post-rail {
    display: flex;
    gap: 0.75rem;
    padding: 0 0 0.2rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-color: var(--web-border-color) transparent;
    scrollbar-width: thin;
    touch-action: pan-x pan-y;
}

.web-home-post-rail[data-web-auto-rail-ready] {
    scroll-snap-type: none;
}

.web-home-ranking-empty {
    padding: 1.25rem 0;
    color: var(--web-text-muted);
    font-size: 0.875rem;
    text-align: center;
    border-bottom: 1px solid var(--web-gallery-rule);
}

.web-home-banner-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0 0 0.875rem;
}

.web-home-internal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    margin: 0 0 0.875rem;
}

.web-home-internal-links-title {
    margin: 0 0 0.375rem;
    color: var(--web-text-primary);
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.35;
}

.web-home-internal-link {
    display: inline-flex;
    width: auto;
    min-height: 2.75rem;
    align-items: center;
    padding: 0.5rem 0.125rem;
    color: var(--web-text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    background: transparent;
    border: 0;
}

.web-home-internal-link:hover,
.web-home-internal-link:focus-visible {
    color: var(--web-color-primary);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.web-home-internal-link:focus-visible {
    outline: 2px solid var(--web-color-primary);
    outline-offset: 2px;
}

.web-home-banner-grid-item {
    position: relative;
    display: block;
    min-height: 7rem;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    background: var(--web-bg-muted);
    border: 0;
    border-radius: calc(var(--web-radius) * 1.5);
    box-shadow: none;
}

.web-home-banner-grid-item img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.web-home-banner-grid-item:hover img,
.web-home-banner-grid-item:focus-visible img {
    transform: scale(1.025);
}

.web-home-banner-grid-desc {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding: 1.6rem 0.75rem 0.55rem;
    overflow: hidden;
    color: var(--web-banner-desc-text);
    background: linear-gradient(to top, var(--web-banner-desc-overlay-start), var(--web-banner-desc-overlay-end));
    font-size: 0.82rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.web-route-detail-content {
    margin: 0 0 0.875rem;
    padding: 0.875rem 1rem;
    overflow: hidden;
    color: var(--web-text-primary);
    background: var(--web-bg-surface);
    border: 1px solid var(--web-border-color);
    border-radius: var(--web-radius);
    box-shadow: var(--web-shadow-sm);
}

.web-route-detail-content-body {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: inherit;
    font-size: 0.9375rem;
    line-height: 1.72;
}

.web-route-detail-content-body > :first-child {
    margin-top: 0;
}

.web-route-detail-content-body > :last-child {
    margin-bottom: 0;
}

.web-route-detail-content-body img,
.web-route-detail-content-body video,
.web-route-detail-content-body iframe {
    max-width: 100%;
}

.web-route-detail-content-body img,
.web-route-detail-content-body video {
    height: auto;
    border-radius: calc(var(--web-radius) - 0.25rem);
}

.web-route-detail-content-body p img:only-child {
    display: block;
}

.web-route-detail-content-body img[data-w-e-type="emotion"],
.web-route-detail-content-body img[data-w-e-type="emoji"],
.web-route-detail-content-body img.emotion,
.web-route-detail-content-body img.emoji {
    display: inline-block;
    width: 1.35em;
    max-width: 1.35em;
    height: 1.35em;
    margin: 0 0.08em;
    border-radius: 0;
    vertical-align: -0.25em;
}

.web-route-detail-content-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.web-article-page {
    width: 100%;
    max-width: 54rem;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

.web-article-header {
    margin-bottom: 1rem;
}

.web-article-title {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--web-text-primary);
    font-size: 1.5rem;
    line-height: 1.35;
}

.web-article-subtitle {
    margin: 0.5rem 0 0;
    overflow-wrap: anywhere;
    color: var(--web-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.web-article-cover {
    margin: 0 0 1rem;
    overflow: hidden;
    border-radius: var(--web-radius);
    background: var(--web-bg-muted);
}

.web-article-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.web-article-content {
    padding: 0.875rem 0 0;
    border-top: 1px solid var(--web-border-color);
}

@media (max-width: 576px) {
    .web-route-detail-content {
        padding: 0.75rem;
    }
}

/* ---- 页面底部介绍 / 页面底部 ---- */
.web-page-bottom-intro {
    width: 100%;
    max-width: var(--web-content-max-width);
    margin: 0 auto;
    padding: 1rem 1rem 0.875rem;
    color: var(--web-text-primary);
}

.web-page-bottom-intro-body {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: inherit;
    font-size: 0.9375rem;
    line-height: 1.72;
}

.web-page-footer {
    width: 100%;
    margin-top: 1.25rem;
    padding: 1.25rem 1rem;
    color: var(--web-text-secondary);
    background: var(--web-bg-footer);
    border-top: 1px solid var(--web-border-color);
}

.web-page-footer-body {
    max-width: var(--web-content-max-width);
    margin: 0 auto;
    overflow-wrap: anywhere;
    color: inherit;
    font-size: 0.875rem;
    line-height: 1.7;
}

.web-page-bottom-intro-body > :first-child,
.web-page-footer-body > :first-child {
    margin-top: 0;
}

.web-page-bottom-intro-body > :last-child,
.web-page-footer-body > :last-child {
    margin-bottom: 0;
}

.web-page-bottom-intro-body a,
.web-page-footer-body a {
    color: var(--web-color-primary);
}

.web-page-bottom-intro-body img,
.web-page-bottom-intro-body video,
.web-page-bottom-intro-body iframe,
.web-page-footer-body img,
.web-page-footer-body video,
.web-page-footer-body iframe {
    max-width: 100%;
}

.web-page-bottom-intro-body img,
.web-page-bottom-intro-body video,
.web-page-footer-body img,
.web-page-footer-body video {
    height: auto;
    border-radius: calc(var(--web-radius) - 0.25rem);
}

.web-page-bottom-intro-body p img:only-child,
.web-page-footer-body p img:only-child {
    display: block;
}

.web-page-bottom-intro-body img[data-w-e-type="emotion"],
.web-page-bottom-intro-body img[data-w-e-type="emoji"],
.web-page-bottom-intro-body img.emotion,
.web-page-bottom-intro-body img.emoji,
.web-page-footer-body img[data-w-e-type="emotion"],
.web-page-footer-body img[data-w-e-type="emoji"],
.web-page-footer-body img.emotion,
.web-page-footer-body img.emoji {
    display: inline-block;
    width: 1.35em;
    max-width: 1.35em;
    height: 1.35em;
    margin: 0 0.08em;
    border-radius: 0;
    vertical-align: -0.25em;
}

.web-page-bottom-intro-body table,
.web-page-footer-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

@media (max-width: 768px) {
    body.web-body:has(.web-tabbar) .web-page-footer {
        padding-bottom: calc(var(--web-tabbar-height) + env(safe-area-inset-bottom, 0px) + 1.25rem);
    }

    body.web-body:has(.web-tabbar) .web-page-bottom-intro {
        padding-bottom: 0.75rem;
    }
}

.web-checker-avatar {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    line-height: 0;
}

.web-checker-avatar > .web-checker-avatar-badge {
    position: absolute;
    z-index: 2;
    top: -12%;
    right: -18%;
    width: 48%;
    height: 48%;
    object-fit: contain;
}
