/* 电脑怎样认识中文？ */

.chinese-story {
    color: var(--article-text-color);
    font-size: 14px;
    line-height: 1.6;
}

.chinese-story * { box-sizing: border-box; }
.chinese-story img { display: block; max-width: 100%; }
.chinese-story p { margin: 0 0 12px; }
.chinese-story strong { color: var(--article-heading-color); }
.chinese-story code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.chinese-section {
    margin-top: 22px;
    scroll-margin-top: 110px;
}

.chinese-story .chinese-section > h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 8px;
    color: var(--article-heading-color);
    font-size: 20px;
    line-height: 1.35;
    font-weight: 900;
}

.chinese-number {
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0752ff;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.chinese-key,
.chinese-note,
.chinese-warning {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
}

.chinese-key { background: #eaf5ff; }
.chinese-note { background: #fff8e5; }
.chinese-warning {
    border: 1px solid #ffd0dc;
    background: #fff2f6;
}

.chinese-key img,
.chinese-warning img {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    object-fit: contain;
}

.chinese-note__icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.chinese-story .chinese-key h3,
.chinese-story .chinese-note h3,
.chinese-story .chinese-warning h3 {
    margin: 0 0 4px;
    font-size: 15px;
}

.chinese-story .chinese-key h3 { color: #0752ff; }
.chinese-story .chinese-note h3 { color: #9a6800; }
.chinese-story .chinese-warning h3 { color: #d83265; }

.chinese-key p,
.chinese-note p,
.chinese-warning p { margin: 0; }

/* 字符 -> 码点 -> 字节 */

.chinese-flow {
    display: grid;
    grid-template-columns: 1fr 30px 1.2fr 30px 1.2fr;
    gap: 7px;
    align-items: center;
    margin-top: 14px;
}

.chinese-flow > div:not(.chinese-flow__arrow) {
    display: flex;
    min-height: 170px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 13px;
    border-radius: 15px;
    text-align: center;
}

.chinese-flow__char { background: #eef5ff; }
.chinese-flow__codepoint { background: #fff6df; }
.chinese-flow__bytes { background: #eef9f0; }

.chinese-flow__char > span {
    color: #0752ff;
    font-size: 46px;
    font-weight: 900;
}

.chinese-flow__codepoint strong {
    color: #d58d00;
    font-size: 22px;
}

.chinese-flow__bytes code {
    padding: 8px 10px;
    border-radius: 9px;
    background: #fff;
    color: #2a9b55;
    font-size: 16px;
    font-weight: 900;
}

.chinese-story .chinese-flow h3 {
    margin: 7px 0 4px;
    color: var(--article-heading-color);
    font-size: 14px;
}

.chinese-flow p {
    margin: 0;
    color: #617296;
    font-size: 10px;
}

.chinese-flow__arrow,
.chinese-utf8__arrow,
.chinese-input__arrow,
.chinese-render__arrow,
.chinese-garbled__arrow {
    color: #4f82ff;
    font-size: 23px;
    font-weight: 900;
    text-align: center;
}

/* Unicode */

.chinese-unicode {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
    margin-top: 14px;
}

.chinese-unicode article {
    min-width: 0;
    padding: 14px 9px;
    border: 1px solid #e1ebff;
    border-radius: 14px;
    background: #f9fbff;
    text-align: center;
}

.chinese-unicode article > span {
    display: inline-flex;
    min-width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 19px;
    background: #f3efff;
    color: #7654d6;
    font-size: 28px;
    font-weight: 900;
}

.chinese-unicode strong {
    display: block;
    margin: 7px 0 4px;
    color: #6049b8;
    font-size: 13px;
}

.chinese-unicode p {
    margin: 0;
    color: #617296;
    font-size: 10px;
}

/* UTF-8 */

.chinese-utf8 {
    display: grid;
    grid-template-columns: 1fr 45px 1.4fr;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.chinese-utf8__char,
.chinese-utf8__bytes {
    display: flex;
    min-height: 155px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 14px;
    border-radius: 15px;
    text-align: center;
}

.chinese-utf8__char { background: #eef5ff; }
.chinese-utf8__bytes { background: #eef9f0; }

.chinese-utf8__char > span {
    color: #0752ff;
    font-size: 44px;
    font-weight: 900;
}

.chinese-utf8__char strong {
    margin-top: 5px;
    color: #0752ff;
    font-size: 13px;
}

.chinese-utf8__bytes > span {
    color: #2a9b55;
    font-size: 12px;
    font-weight: 900;
}

.chinese-utf8__bytes code {
    margin-top: 6px;
    padding: 7px 9px;
    border-radius: 8px;
    background: #fff;
    color: #2a9b55;
    font-size: 15px;
    font-weight: 900;
}

.chinese-utf8__bytes small {
    margin-top: 5px;
    color: #8692a8;
    font-size: 10px;
}

.chinese-bytes-detail {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 7px;
    margin-top: 12px;
}

.chinese-bytes-detail > div {
    display: flex;
    min-height: 86px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 12px;
    background: #f7f8fc;
}

.chinese-bytes-detail strong {
    color: #0752ff;
    font-size: 18px;
}

.chinese-bytes-detail span {
    margin-top: 4px;
    color: #617296;
    font-size: 10px;
}

/* 输入法 */

.chinese-input {
    display: grid;
    grid-template-columns: 1.3fr 30px 1fr 30px 1.2fr;
    gap: 7px;
    align-items: center;
    margin-top: 14px;
}

.chinese-input__keys,
.chinese-input__ime,
.chinese-input__candidates {
    min-height: 175px;
    padding: 14px;
    border-radius: 15px;
    text-align: center;
}

.chinese-input__keys { background: #eef5ff; }
.chinese-input__ime { background: #fff6df; }
.chinese-input__candidates { background: #eef9f0; }

.chinese-input__keys {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.chinese-input__keys > span {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    color: #0752ff;
    font-weight: 900;
}

.chinese-input__keys h3,
.chinese-input__candidates h3 {
    width: 100%;
}

.chinese-input__ime {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.chinese-input__ime > span {
    color: #d58d00;
    font-size: 50px;
}

.chinese-input__candidates {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.chinese-input__candidates > span {
    display: inline-flex;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    color: #2a9b55;
    font-size: 20px;
    font-weight: 900;
}

.chinese-story .chinese-input h3 {
    margin: 7px 0 4px;
    color: var(--article-heading-color);
    font-size: 14px;
}

.chinese-input p {
    margin: 0;
    color: #617296;
    font-size: 10px;
}

/* 字体与字形 */

.chinese-render {
    display: grid;
    grid-template-columns: 1fr 30px 1fr 30px 1fr;
    gap: 7px;
    align-items: center;
    margin-top: 14px;
}

.chinese-render > div:not(.chinese-render__arrow) {
    display: flex;
    min-height: 165px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 14px;
    border-radius: 15px;
    text-align: center;
}

.chinese-render__codepoint { background: #eef5ff; }
.chinese-render__font { background: #fff6df; }
.chinese-render__screen { background: #eef9f0; }

.chinese-render__codepoint strong {
    color: #0752ff;
    font-size: 20px;
}

.chinese-render__codepoint span {
    margin-top: 5px;
    color: #617296;
    font-size: 10px;
}

.chinese-render__font > span {
    color: #d58d00;
    font-size: 50px;
}

.chinese-render__screen > span {
    color: #2a9b55;
    font-size: 50px;
    font-weight: 900;
}

.chinese-story .chinese-render h3 {
    margin: 7px 0 4px;
    color: var(--article-heading-color);
    font-size: 14px;
}

.chinese-render p {
    margin: 0;
    color: #617296;
    font-size: 10px;
}

/* 不同字体 */

.chinese-fonts {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px;
    margin-top: 14px;
}

.chinese-fonts article {
    min-width: 0;
    padding: 14px 10px;
    border: 1px solid #e1ebff;
    border-radius: 14px;
    background: #f9fbff;
    text-align: center;
}

.chinese-fonts__sample {
    display: inline-flex;
    width: 82px;
    height: 82px;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #fff;
    color: #0752ff;
    font-size: 42px;
}

.chinese-fonts__sample--serif {
    font-family: serif;
}

.chinese-fonts__sample--sans {
    font-family: sans-serif;
}

.chinese-fonts__sample--mono {
    font-family: monospace;
}

.chinese-story .chinese-fonts h3 {
    margin: 8px 0 4px;
    color: var(--article-heading-color);
    font-size: 14px;
}

.chinese-fonts p {
    margin: 0;
    color: #617296;
    font-size: 10px;
}

.chinese-same-character {
    margin-top: 12px;
    padding: 13px 15px;
    border-radius: 14px;
    background: #f3efff;
    text-align: center;
}

.chinese-same-character strong {
    color: #6049b8;
}

/* 乱码 */

.chinese-garbled {
    display: grid;
    grid-template-columns: 1.2fr 30px 1fr 50px 1fr;
    gap: 7px;
    align-items: center;
    margin-top: 14px;
}

.chinese-garbled > div:not(.chinese-garbled__arrow):not(.chinese-garbled__or) {
    display: flex;
    min-height: 155px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 13px;
    border-radius: 15px;
    text-align: center;
}

.chinese-garbled__save { background: #f7f8fc; }
.chinese-garbled__right { background: #eef9f0; }
.chinese-garbled__wrong { background: #fff2f5; }

.chinese-garbled span {
    color: #617296;
    font-size: 10px;
}

.chinese-garbled strong {
    margin-top: 5px;
    font-size: 20px;
}

.chinese-garbled__save strong { color: #0752ff; }
.chinese-garbled__right strong { color: #2a9b55; }
.chinese-garbled__wrong strong { color: #df4d74; }

.chinese-garbled code {
    margin-top: 7px;
    padding: 7px 9px;
    border-radius: 8px;
    background: #fff;
    color: #1d3d75;
    font-size: 12px;
    font-weight: 900;
}

.chinese-garbled__or {
    color: #7485a3;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

/* 总结 */

.chinese-summary {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    padding: 18px;
    border-radius: 16px;
    background: #e9f3ff;
    scroll-margin-top: 110px;
}

.chinese-summary__icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    object-fit: contain;
}

.chinese-story .chinese-summary h2 {
    margin: 0 0 7px;
    color: #0752ff;
    font-size: 19px;
}

.chinese-summary ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.75;
}

.chinese-summary__next {
    margin: 10px 0 0 !important;
    padding-top: 10px;
    border-top: 1px dashed #b8d3f6;
}

.chinese-summary__next em {
    color: #0752ff;
    font-style: normal;
    font-weight: 800;
}

/* 翻页 */

.chinese-pagination {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
}

.chinese-pagination a {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 49%;
    padding: 10px 13px;
    border: 1px solid #d9e7ff;
    border-radius: 12px;
    background: #ffffffb3;
    text-decoration: none;
    box-shadow: 0 3px 10px #c5dbff30;
}

.chinese-pagination a:last-child { text-align: right; }

.chinese-pagination strong {
    display: block;
    color: #0752ff;
    font-size: 16px;
}

.chinese-pagination small {
    display: block;
    color: #576b9f;
    font-size: 12px;
}

.chinese-pagination__arrow {
    display: inline-flex;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9e7ff;
    border-radius: 7px;
    color: #0752ff;
    font-size: 22px;
}

.chinese-pagination a:hover { background: #edf4ff; }

.chinese-pagination a:focus-visible {
    outline: 3px solid #0752ff;
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .chinese-unicode {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 640px) {
    .chinese-story {
        font-size: 12px;
        line-height: 1.6;
    }

    .chinese-section { margin-top: 18px; }

    .chinese-story .chinese-section > h2 {
        gap: 9px;
        margin-bottom: 6px;
        font-size: 16px;
    }

    .chinese-number {
        flex-basis: 31px;
        height: 31px;
        font-size: 14px;
    }

    .chinese-flow,
    .chinese-utf8,
    .chinese-input,
    .chinese-render,
    .chinese-garbled {
        grid-template-columns: minmax(0,1fr);
        gap: 7px;
    }

    .chinese-flow__arrow,
    .chinese-utf8__arrow,
    .chinese-input__arrow,
    .chinese-render__arrow,
    .chinese-garbled__arrow {
        transform: rotate(90deg);
        line-height: 1;
    }

    .chinese-key,
    .chinese-note,
    .chinese-warning {
        gap: 9px;
        padding: 11px 12px;
    }

    .chinese-key img,
    .chinese-warning img,
    .chinese-note__icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .chinese-unicode {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 8px;
    }

    .chinese-bytes-detail,
    .chinese-fonts {
        grid-template-columns: minmax(0,1fr);
        gap: 8px;
    }

    .chinese-summary {
        gap: 8px;
        padding: 14px;
    }

    .chinese-summary__icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .chinese-story .chinese-summary h2 { font-size: 17px; }

    .chinese-pagination { gap: 9px; }

    .chinese-pagination a {
        flex: 1;
        min-width: 0;
        gap: 5px;
        padding: 8px 6px;
    }

    .chinese-pagination strong { font-size: 13px; }

    .chinese-pagination small {
        font-size: 10px;
        line-height: 1.35;
    }

    .chinese-pagination__arrow {
        width: 26px;
        height: 27px;
        flex-basis: 26px;
        font-size: 18px;
    }
}
