html,
html[data-theme=dark] {
    --a-hover-color: var(--red);
    --btn-color: var(--a-color);
    --btn-hover-color: #f00;
    --btn-active-color: #f00;
    --search-error-border-color: #f00;
    --popup-bg: rgb(22 25 37);
    --overlay-bg: rgba(36, 39, 59, 0.3)
}

html {
    --hanzi-background: url("/assets/images/mi_bg.svg") center no-repeat;
    --font-family-songit: "Songti", "Songti SC", "宋体", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif;
    --header-bg-image: "/assets/images/tiles/endless-clouds.svg";
    --header-bg-color: #68ab15;
    --body-bg-color: #f6f6f6;
    --body-secondary-bg-color: #f3f3f3;
    --body-color: #212112;
    --body-secondary-color: #444;
    --body-info-color: #666;
    --theme-bg-color: #fff;
    --theme-bg-color-rgb: 255, 255, 255;
    --theme-secondary-bg-color: #f9f9f9;
    --theme-third-bg-color: #f0f0f0;
    --border-color: #f0f0f0;
    --border-secondary-color: rgba(200, 200, 200, 0.4);
    --text-color-gray: rgba(0, 0, 0, 0.5);
    --a-color: #3E7B0A;
    --search-bg-color: #ecfff7;
    --search-border-color: rgba(0, 0, 0, 0.2);
    --search-focus-border-color: #52930F;
    --btn-bg-color: var(--theme-bg-color);
    --btn-hover-bg-color: #f8f9fa;
    --btn-hover-border-color: #dee2e6;
    --btn-border-color: #e9ecef;
    --shadow-color: rgba(200, 200, 200, 0.3);
    --highlight-bg-color: #fdfbbc;
    --mi-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='%23fff' stroke='%23ccc'%3E%3Cpath d='M96 0L0 96zM0 0l96 96z' stroke-dasharray='1,2'/%3E%3Cpath d='M0 48h96zM48 0v96z' stroke-dasharray='1,3'/%3E%3C/svg%3E") center no-repeat;
    --mi-bg-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='%23fff' fill-opacity='.5' stroke='red'%3E%3Cpath d='M96 0L0 96zM0 0l96 96z' stroke-dasharray='1,2'/%3E%3Cpath d='M0 48h96zM48 0v96z' stroke-dasharray='1,3'/%3E%3C/svg%3E") center no-repeat;
    --nav-scrollbar-thumb-bg: #ccc;
    --scrollbar-bg: rgba(66, 66, 66, 0.4);
    font-family: sans-serif;
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent
}

html[data-theme=dark] {
    --header-bg-color: #222;
    --body-bg-color: #000;
    --body-secondary-bg-color: #303030;
    --body-info-color: #999;
    --body-color: #eee;
    --body-secondary-color: #aaa;
    --theme-bg-color: #222;
    --theme-bg-color-rgb: 34, 34, 34;
    --theme-secondary-bg-color: #2a2a2a;
    --theme-third-bg-color: #3a3a3a;
    --border-color: #333;
    --border-secondary-color: rgba(99, 99, 99, 0.6);
    --a-color: #EFFACE;
    --btn-bg-color: #444;
    --btn-hover-bg-color: #343a40;
    --btn-hover-border-color: #495057;
    --btn-border-color: #444;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --highlight-bg-color: rgba(255, 0, 0, 0.2);
    --search-bg-color: #222;
    --search-border-color: rgba(255, 255, 255, 0.2);
    --search-focus-border-color: #666;
    --scrollbar-bg: rgb(255 253 253 / 57%);
    --text-color-gray: rgba(255, 255, 255, 0.5);
    --mi-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='%23fff' stroke='%23555'%3E%3Cpath d='M96 0L0 96zM0 0l96 96z' stroke-dasharray='1,2'/%3E%3Cpath d='M0 48h96zM48 0v96z' stroke-dasharray='1,3'/%3E%3C/svg%3E") center no-repeat;
    --nav-scrollbar-thumb-bg: #303030;
    --ci-card-border-color: #333;
    --ci-card-hover-border-color: #000;
    --ci-card-box-shadow: unset;
    --ci-card-hover-box-shadow: 0 2px 6px 0 #111;
    --ci-card-summary-color: #888;
    --ci-card-more-bg: #000
}

html[data-theme=dark] .form-control {
    background-color: #111;
    color: #ccc;
    border-color: #444
}

html {
    --ci-card-border-color: #e6e6e6;
    --ci-card-hover-border-color: #52930F;
    --ci-card-box-shadow: 0 2px 4px 0 #eee;
    --ci-card-hover-box-shadow: 0 2px 10px 0 #ccc;
    --ci-card-summary-color: #666;
    --ci-card-more-bg: #52930F
}

:root {
    --blue: #007bff;
    --indigo: #6610f2;
    --purple: #6f42c1;
    --pink: #e83e8c;
    --red: #dc3545;
    --orange: #fd7e14;
    --yellow: #ffc107;
    --green: #28a745;
    --teal: #20c997;
    --cyan: #17a2b8;
    --white: #fff;
    --gray: #6c757d;
    --gray-dark: #343a40;
    --primary: #68ab15;
    --secondary: #6c757d;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1420px;
    --font-family-sans-serif: "PingFang SC", Microsoft YaHei, Helvetica, Hiragino Sans GB, WenQuanYi Micro Hei, sans-serif;
    --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace
}

a:not([href]):not([class]),
a:not([href]):not([class]):hover {
    color: inherit;
    text-decoration: none
}

.category-nav-list .list {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.category-nav-list .list::-webkit-scrollbar {
    display: block;
}

.category-nav-list .list::-webkit-scrollbar {
    background-color: var(--body-bg-color)
}

.category-nav-list .list::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 4px var(--border-secondary-color);
    border-radius: 10px;
    margin-block: 15px
}

.category-nav-list .list::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 4px var(--border-secondary-color);
    background-color: var(--nav-scrollbar-thumb-bg)
}

.category-nav-list .list::-webkit-scrollbar-button {
    display: none
}

.category-nav-list .list a {
    flex-grow: 1;
    white-space: nowrap;
    text-align: center;
    border: 1px solid var(--color-border-tertiary);
    background-color: var(--color-bg-quaternary);
    border-radius: 5px;
    font-size: 15px;
    padding: 4px 15px;
    margin: 5px 4px;
    scroll-snap-align: start;
}

.category-nav-list .list a:hover {
    background-color: #fff;
}

.category-nav-list .list a.active {
    position: relative;
    background-color: red;
    font-weight: 700;
    color: #fff
}

.category-nav-list .list a.active:hover {
    color: #fff !important;
}

.category-nav-list .list a.active::after,
.category-nav-list .list a.active::before {
    position: absolute;
    content: " ";
    width: 0;
    height: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid transparent
}

.category-nav-list .list a.active::after {
    bottom: -6px;
    border-top-color: red
}

.category-nav-list .list a.active::before {
    bottom: -7px
}


.ci-list-card {
    margin-left: -15px;
    display: flex;
    flex-wrap: wrap
}

.ci-list-card.ci-list-row .section {
    width: calc(100% - 15px)
}

.ci-list-card.ci-list-row .section:nth-child(4n+1),
.ci-list-card.ci-list-row .section:nth-child(4n+2) {
    background-color: unset
}

.ci-list-card.ci-list-row .section:nth-child(2n) {
    background-color: var(--color-bg-quaternary);
}

.ci-list-card .section:nth-child(4n+1),
.ci-list-card .section:nth-child(4n+2),
.ci-list-card.ci-list-row .section:nth-child(2n+1) {
    background-color: #fff;
}

.ci-list-card .section {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    width: calc(50% - 15px);
    border: 1px solid var(--color-border-tertiary);
    border-radius: 4px;
    margin: 0 0 15px 15px;
    padding: 15px 15px 0;
    overflow: hidden;
    box-shadow: 0 2px 4px 0 #eee;
    transition: all .2s ease-in;
    background-color: var(--color-bg-quaternary);
}

.ci-list-card .section:hover {
    border-color: var(--color-button-border);
    box-shadow: 0 2px 10px 0 #ccc;
    z-index: 10;
    transform: translateY(-2px)
}

.ci-list-card .title {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center
}

.ci-list-card .title h3 {
    font-size: 16px;
}

.ci-list-card .title a {
    margin-right: 15px
}

.ci-list-card .title a i {
    position: relative;
    text-indent: 0;
    font-style: normal;
    color: red
}

.ci-list-card .title a i::after {
    position: absolute;
    top: .75em;
    left: 0;
    width: 100%;
    color: red;
    overflow: hidden;
    white-space: nowrap;
    content: "・・・・"
}

.ci-list-card .title em {
    color: red;
    font-style: unset
}

.ci-list-card .title .blue::after {
    color: #00f
}

.ci-list-card .pinyin {
    font-size: 18px;
    margin-bottom: 10px
}

.ci-list-card .summary {
    font-size: 14px;
    color: var(--ci-card-summary-color);
    margin-bottom: 10px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ci-list-card .summary em {
    color: red;
    font-style: normal;
}

.ci-list-card .more {
    display: flex;
    align-content: center;
    justify-content: space-between;
    margin: auto -15px;
    height: 40px;
    line-height: 40px;
    font-size: 15px;
    overflow: hidden;
    z-index: 2;
    color: red;
    padding: 0 15px;
    border-top: 1px solid rgba(100, 100, 100, .1);
    transition: color .2s ease-in-out, border-top-color .3s ease-in-out
}

.ci-list-card .more::before {
    position: absolute;
    content: "";
    left: 0;
    right: 0;
    bottom: 0;
    height: 40px;
    z-index: -1;
    background-color: #555;
    transform: translateY(100%);
    transition: transform .2s ease-in-out
}

.ci-list-card .more::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.ci-list-card .more i {
    font-size: 12px;
    transition: all .2s ease-in-out
}

.ci-list-card .more:hover {
    color: #fff
}

.ci-list-card .more:hover::before {
    transform: translateY(0);
    background-color: var(--color-button-border-bottom);
}

.ci-list-card .more:hover i {
    color: #fff;
    transform: translateX(4px)
}

.ci-quick-links ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px
}

.ci-quick-links li {
    color: var(--color-button-text);
    text-align: center;
    border: 1px solid var(--color-button-border);
    border-bottom: 2px solid var(--color-button-border-bottom);
    background: var(--color-button-bg);
    font-size: 15px;
    transition: all .2s ease;
    margin: 5px;
    width: calc(50% - 10px);
    border-radius: 6px
}

.ci-quick-links li:hover {
    color: var(--color-button-text-hover);
    background: var(--color-button-bg-hover);
    border-color: var(--color-button-border-hover);
}

.ci-quick-links li a {
    display: block;
    padding: 5px 0;
    text-align: center;
    color: var(--color-primary);
}

.pagination {
    display: flex;
    border-radius: .25rem;
    --page-link-color: #52930F;
}

.pager {
    justify-content: center;
    align-items: center;
}

.pager .page-item {
    margin-left: 10px;
}

.page-item:first-child {
    margin-left: 0 !important;
}

@media screen and (max-width: 768px) {
    .ci-list-card .section {
        width: calc((100% - 15px) / 1);
    }

    .ci-list-card .section:nth-child(4n+1),
    .ci-list-card .section:nth-child(4n+2),
    .ci-list-card.ci-list-row .section:nth-child(2n+1) {
        background-color: var(--theme-secondary-bg-color);
    }

    .ci-list-card .section:nth-child(2n+1) {
        background-color: var(--theme-bg-color);
    }
}