/* ========================================================================
   全站浏览器兼容：IE7+ / Firefox / Chrome / Edge / 360 / QQ / 搜狗
   ======================================================================== */

article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section {
    display: block;
}

audio, canvas, progress, video {
    display: inline-block;
    *display: inline;
    *zoom: 1;
}

template {
    display: none;
}

[hidden],
.is-hidden {
    display: none !important;
    visibility: hidden;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html,
body {
    min-height: 100%;
}

body {
    background-color: #f5f7fa;
    color: #333333;
}

html[data-theme="dark"] body {
    background-color: #14161a;
    color: #e6e8eb;
}

a img {
    border: 0;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    -ms-interpolation-mode: bicubic;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    vertical-align: middle;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="search"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    overflow: visible;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

a,
button,
label,
.btn,
.portal-nav-item,
.portal-foot-btn,
.theme-toggle {
    -webkit-tap-highlight-color: transparent;
}

.portal-main,
.portal-hero-left,
.portal-tool-body,
.portal-nav-label,
.admin-topbar-left {
    min-width: 0;
}

.portal-sidebar,
.site-header,
.news-site-header {
    position: -webkit-sticky;
    position: sticky;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header,
    .news-site-header {
        background: #ffffff;
    }

    html[data-theme="dark"] .site-header,
    html[data-theme="dark"] .news-site-header {
        background: #14161a;
    }
}

@media (max-width: 767px) {
    input,
    select,
    textarea,
    .form-control {
        font-size: 16px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@supports (-webkit-touch-callout: none) {
    .portal-shell,
    .portal-sidebar,
    .frontend-body,
    .portal-body,
    .admin-login-body,
    .install-wrap {
        min-height: -webkit-fill-available;
    }
}

.portal-sidebar-foot,
.portal-footer-bottom,
.install-footer {
    padding-bottom: 14px;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
}

.portal-body,
.install-wrap {
    padding-left: 0;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: 0;
    padding-right: env(safe-area-inset-right, 0px);
}

@supports not (display: grid) {
    .portal-grid,
    .home-site-grid,
    .site-dir-grid,
    .admin-stats-grid,
    .admin-info-grid,
    .sponsor-layout,
    .news-grid,
    .site-footer-grid,
    .site-footer-links-grid {
        display: block;
        zoom: 1;
    }

    .portal-grid .portal-tool-card,
    .home-site-grid .home-site-card,
    .site-dir-grid .home-site-card,
    .news-grid .news-grid-item {
        display: inline-block;
        *display: inline;
        *zoom: 1;
        vertical-align: top;
        width: 23%;
        margin: 0 1% 12px 0;
    }
}

/* IE7 / IE8：无 flex/grid 时用浮动保底 */
.lt-ie9 .news-site-header-inner,
.lt-ie9 .header-inner,
.lt-ie9 .site-footer-grid,
.ie7 .news-site-header-inner,
.ie8 .news-site-header-inner {
    zoom: 1;
}

.lt-ie9 .news-site-brand,
.lt-ie9 .news-site-nav,
.lt-ie9 .news-site-nav-link,
.lt-ie9 .site-nav-ico,
.lt-ie9 .home-side-icon,
.lt-ie9 .site-nav-drop-icon {
    display: inline;
    zoom: 1;
    vertical-align: middle;
}

.lt-ie9 .portal-grid,
.lt-ie9 .home-site-grid,
.lt-ie9 .site-dir-grid,
.lt-ie9 .news-grid {
    zoom: 1;
}

.lt-ie9 .portal-grid .portal-tool-card,
.lt-ie9 .home-site-grid .home-site-card,
.lt-ie9 .site-dir-grid .home-site-card,
.lt-ie9 .news-grid .news-grid-item {
    float: left;
    display: inline;
    width: 23%;
    margin: 0 1% 12px 0;
    vertical-align: top;
}

.lt-ie9 .home-side-link,
.lt-ie9 .site-nav-drop-item {
    zoom: 1;
}

.lt-ie9 .home-site-icon,
.lt-ie9 .portal-tool-icon {
    display: inline;
    zoom: 1;
    vertical-align: middle;
}

.lt-ie9 .news-site-header {
    background: #ffffff;
}

.lt-ie9 .frontend-body,
.lt-ie9 .portal-body {
    background: #f3eee6;
    color: #142029;
}

.lt-ie9 .home-site-card,
.lt-ie9 .portal-tool-card {
    background: #ffffff;
    border: 1px solid #e0e6e6;
}

.lt-ie9 .btn,
.lt-ie9 .form-control {
    display: inline;
    zoom: 1;
}

.lt-ie9 .site-tabbar {
    display: none !important;
}

@media print {
    .portal-sidebar,
    .portal-sidebar-foot,
    .back-top,
    .theme-toggle,
    .admin-topbar-right,
    .install-steps,
    .site-tabbar {
        display: none !important;
    }

    .portal-shell {
        display: block;
    }

    .portal-main {
        width: 100%;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }
}
