/* Hallmark · v2.0.0 · UI UX Pro Max · desktop toolbar and handheld navigation */
/* Critique: Navigation should explain location without buying a whole column of the page. Only the active icon needs the full accent. */

/* A renamed web subset of LXGW WenKai Medium v1.521. See fonts/OFL-WenKai.txt. */
@font-face {
    font-family: "Zhujiu Hand";
    src: url("/static/library/fonts/zhujiu-hand.v1.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

:root {
    --z-canvas: #f4f7fb;
    --z-surface: #fff;
    --z-ink: #172135;
    --z-muted: #546278;
    --z-border: #e0e7f0;
    --z-border-strong: #9ca9ba;
    --z-control-border: #8190a7;
    --z-rule: #d8e1ef;
    --z-accent: #1e55ca;
    --z-accent-strong: #1745a9;
    --z-soft: #eaf1ff;
    --z-on-accent: #fff;
    --z-dark: #202b4c;
    --z-dark-raised: #2d3f67;
    --z-dark-rule: #65759a;
    --z-on-dark: #f8f9ff;
    --z-on-dark-muted: #cdd7f4;
    --z-gold: #cbdafc;
    --z-focus: #1e55ca;
    --z-error: #a72d45;
    --z-tint-blue: #eaf3ff;
    --z-tint-pink: #fff0f4;
    --z-tint-mint: #e9f7f2;
    --z-tint-violet: #f0edff;
    --z-tint-peach: #fff0e8;
    --z-green-ink: #155f4e;
    --z-violet-ink: #593bab;
    --z-peach-ink: #8e462c;
    --z-chrome: rgb(255 255 255 / 92%);
    --z-hairline: rgb(32 43 85 / 10%);
    --z-shadow: 0 8px 26px rgb(32 57 105 / 8%), 0 2px 5px rgb(32 57 105 / 4%);
    --z-shadow-raised: 0 16px 45px rgb(33 64 130 / 14%), 0 4px 11px rgb(33 64 130 / 7%);
    --z-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
    --z-display: var(--z-font);
    --z-hand: "Zhujiu Hand", "Kaiti SC", STKaiti, KaiTi, var(--z-font);
    --z-type-hero: clamp(2.125rem, 4.05vw, 3.5rem);
    --z-type-title: clamp(2rem, 3.65vw, 3.25rem);
    --z-type-section: clamp(1.375rem, 2.2vw, 1.75rem);
    --z-type-copy: 1rem;
    --z-type-summary: .9375rem;
    --z-type-reading: 1.0625rem;
    --z-leading-title: 1.2;
    --z-leading-copy: 1.65;
    --z-leading-reading: 1.75;
    --z-radius: 20px;
    --z-radius-large: 28px;
    --z-control-radius: 13px;
    --z-pill: 999px;
    --z-width: 1196px;
    --z-gutter: 32px;
    --z-nav-mobile: 64px;
    --z-duration: 170ms;
    --z-ease: cubic-bezier(.2, .7, .2, 1);
    --z-spring: cubic-bezier(.2, .78, .28, 1.24);
}

html:has(body.library-front),
body.library-front { overflow-x: clip; }
html:has(body.library-front) { scroll-padding-block-start: 84px; }

body.library-front {
    color-scheme: light;
    --accent: var(--z-accent);
    --ink: var(--z-ink);
    --muted: var(--z-muted);
    --catalog-bg: var(--z-canvas);
    --catalog-surface: var(--z-surface);
    --catalog-ink: var(--z-ink);
    --catalog-muted: var(--z-muted);
    --catalog-line: var(--z-border);
    --catalog-accent: var(--z-accent);
    --catalog-tint: var(--z-soft);
    --catalog-radius: var(--z-radius);
    --catalog-header: 68px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
    color: var(--z-ink);
    background: var(--z-canvas);
    font: var(--z-type-copy)/var(--z-leading-copy) var(--z-font);
}

.library-front > main { flex: 1 0 auto; min-width: 0; }
.library-front .catalog-wrap,
.library-front .z-shell-topbar-inner {
    width: min(var(--z-width), calc(100% - 2 * var(--z-gutter)));
    margin-inline: auto;
}

.library-front :is(h1, h2, h3) { min-width: 0; overflow-wrap: break-word; }
.library-front main h1 { letter-spacing: normal; text-wrap: balance; }
.library-front :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid var(--z-focus);
    outline-offset: 3px;
}
.library-front :is(button:not(:disabled), summary) { cursor: pointer; }
.library-front .catalog-skip:focus-visible { z-index: 100; }

.z-promo {
    position: relative;
    display: grid;
    min-width: 0;
    margin-block: 16px 20px;
}

.z-promo-slide {
    --z-promo-bg: var(--z-tint-blue);
    position: relative;
    isolation: isolate;
    display: grid;
    grid-area: 1 / 1;
    align-items: center;
    min-width: 0;
    min-height: 136px;
    overflow: hidden;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius);
    background: var(--z-promo-bg);
}

.z-promo-slide[hidden] { display: none; }
.z-promo-slide[data-tone="violet"] { --z-promo-bg: var(--z-tint-violet); }
.z-promo-slide[data-tone="peach"] { --z-promo-bg: var(--z-tint-peach); }

.z-promo-image {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    display: block;
    width: min(68%, 49rem);
    height: 100%;
    object-fit: cover;
    object-position: 88% center;
}

.z-promo-slide:has(.z-promo-image):not(.z-promo-artwork)::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--z-promo-bg) 38%, color-mix(in srgb, var(--z-promo-bg) 83%, transparent) 50%, transparent 68%);
    content: "";
    pointer-events: none;
}

.z-promo-artwork .z-promo-image { width: 100%; object-fit: contain; object-position: center; }

.z-promo-copy {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: start;
    gap: 4px;
    width: min(58%, 37rem);
    padding: 16px 0;
    margin-inline-start: clamp(16px, 2.4vw, 32px);
    color: var(--z-ink);
    overflow-wrap: anywhere;
}

.z-promo-copy strong {
    font-size: clamp(1.125rem, 2.05vw, 1.75rem);
    font-weight: 750;
    line-height: 1.25;
}

.z-promo .z-promo-copy p {
    margin: 0;
    color: var(--z-muted);
    font-size: .875rem;
    line-height: 1.5;
}

.z-promo-link {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    gap: 5px;
    color: var(--z-accent-strong);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    touch-action: manipulation;
}

.z-promo-link:hover { text-decoration: underline; }
.z-promo-link svg { flex: 0 0 16px; width: 16px; height: 16px; }

.z-promo-actions {
    z-index: 2;
    display: flex;
    grid-area: 1 / 1;
    place-self: end;
    margin: 0 8px 8px 0;
    padding: 0 2px;
    border: 1px solid var(--z-hairline);
    border-radius: var(--z-pill);
    background: var(--z-chrome);
    box-shadow: var(--z-shadow);
}

.z-promo-actions button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: var(--z-pill);
    padding: 0;
    background: transparent;
    color: var(--z-ink);
    font: 700 14px/1 var(--z-font);
    touch-action: manipulation;
}

.z-promo-actions button svg { width: 20px; height: 20px; }
.z-promo-actions button:hover { background: var(--z-soft); color: var(--z-accent-strong); }

.z-promo-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.z-promo-tiles {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: 12px;
}

.z-promo-tiles .z-promo-slide { grid-area: auto; }

@media (max-width: 680px) {
    .z-promo { margin-block: 12px 15px; }
    .z-promo-slide { min-height: 126px; }
    .z-promo-image { width: 86%; object-position: 86% center; }
    .z-promo-slide:has(.z-promo-image):not(.z-promo-artwork)::after {
        background: linear-gradient(90deg, var(--z-promo-bg) 29%, color-mix(in srgb, var(--z-promo-bg) 90%, transparent) 56%, transparent 81%);
    }
    .z-promo-copy { width: 62%; margin-inline-start: 14px; padding-block: 12px; }
    .z-promo .z-promo-copy p { font-size: .8125rem; }
    .z-promo[data-z-carousel] .z-promo-copy { padding-block-end: 51px; }
    .z-promo[data-z-carousel] .z-promo-copy:has(.z-promo-link) { padding-block-end: 6px; }
    .z-promo[data-z-carousel] .z-promo-link { max-width: min(100%, 8.5rem); }
    .z-promo-actions { margin: 0 6px 6px 0; }
}

.library-front .z-shell-topbar {
    position: sticky;
    inset-block-start: 0;
    z-index: 56;
    flex: 0 0 auto;
    border: 0;
    border-block-end: 1px solid var(--z-border);
    background: var(--z-surface);
    color: var(--z-ink);
}

.z-shell-topbar-inner {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) auto minmax(108px, 1fr);
    align-items: center;
    gap: 20px;
    min-height: var(--catalog-header);
}

.z-shell-brand {
    display: inline-flex;
    justify-self: start;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 44px;
    color: var(--z-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.z-shell-brand img,
.z-shell-member img {
    display: block;
    flex: none;
    object-fit: contain;
}
.z-shell-brand img { width: 37px; height: 37px; border-radius: 11px; }

.z-shell-nav {
    display: flex;
    align-self: stretch;
    align-items: stretch;
    gap: 8px;
}

.z-shell-destination {
    --z-destination-fill: var(--z-soft);
    --z-destination-ink: var(--z-accent-strong);
}

.z-shell-destination-source { --z-destination-fill: var(--z-tint-mint); --z-destination-ink: var(--z-green-ink); }
.z-shell-destination-ai { --z-destination-fill: var(--z-tint-violet); --z-destination-ink: var(--z-violet-ink); }
.z-shell-destination-articles { --z-destination-fill: var(--z-tint-peach); --z-destination-ink: var(--z-peach-ink); }

.z-shell-nav > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding-inline: 6px;
    color: var(--z-muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
}

.z-shell-nav > a:focus-visible { outline-offset: -3px; border-radius: 10px; }

.z-shell-glyph {
    display: grid;
    flex: 0 0 29px;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 10px;
    background: var(--z-destination-fill);
    color: var(--z-destination-ink);
}

.z-shell-nav > a:hover { color: var(--z-ink); }

.z-shell-nav > [aria-current="page"] {
    color: var(--z-accent-strong);
    font-weight: 700;
}

.z-shell-nav > [aria-current="page"]::after {
    position: absolute;
    inset: auto 7px 0;
    height: 2px;
    border-radius: var(--z-pill);
    background: var(--z-accent);
    content: "";
}

.z-shell-destination[aria-current="page"] .z-shell-glyph {
    background: var(--z-accent);
    color: var(--z-on-accent);
}

.z-shell-tools,
.z-shell-account {
    display: flex;
    align-items: center;
    gap: 5px;
}

.z-shell-tools { justify-content: end; }
.z-shell-search {
    display: grid;
    flex: 0 0 44px;
    height: 44px;
    place-items: center;
    border-radius: var(--z-control-radius);
    color: var(--z-muted);
}
.z-shell-search:is(:hover, [aria-current="page"]) { background: var(--z-soft); color: var(--z-accent-strong); }

.z-shell-account :is(a, button) {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding-inline: 8px;
    border-radius: 11px;
    color: var(--z-accent-strong);
    font: 550 13px/1.25 var(--z-font);
    white-space: nowrap;
}

.z-shell-account button { border: 0; background: transparent; }
.z-shell-account :is(a, button):hover { background: var(--z-soft); }
.z-shell-account .z-shell-register { background: var(--z-soft); }
.z-shell-account .z-shell-member { min-width: 44px; justify-content: center; padding-inline: 5px; }
.z-shell-member img { border-radius: 50%; }
.z-shell-member > span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--z-soft);
}

.library-front > .mobile-bottom-nav { display: none; }

.z-shell-footer {
    margin-block-start: 10px;
    border-block-start: 1px solid var(--z-border);
    background: var(--z-surface);
}

.z-shell-footer-content {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr);
    align-items: start;
    gap: 16px 28px;
    padding-block: 22px;
}

.z-shell-footer-brand { color: var(--z-ink); font-size: 18px; font-weight: 700; }
.z-shell-footer p { max-width: 70ch; margin: 6px 0 0; color: var(--z-muted); font-size: 13px; }
.z-shell-footer nav { display: flex; justify-content: end; flex-wrap: wrap; gap: 0 14px; }
.z-shell-footer nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.z-shell-footer a:hover { color: var(--z-accent-strong); text-decoration: underline; }
.z-shell-footer-contact { grid-column: 1 / -1; }
.z-shell-license {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding-block-start: 12px;
    border-block-start: 1px solid var(--z-border);
    color: var(--z-muted);
    font-size: 12px;
}

.library-front .toast { border-radius: var(--z-pill); background: var(--z-dark); color: var(--z-on-dark); }
.library-front :is(.z-shell-search, .z-shell-destination, .z-tap, main button:not(:disabled)) {
    transition: scale 230ms var(--z-spring), background-color var(--z-duration) var(--z-ease), color var(--z-duration) var(--z-ease);
}
.library-front :is(.z-shell-search, .z-shell-destination, .z-tap, main button:not(:disabled)):active {
    scale: .965;
    transition-duration: 90ms;
    transition-timing-function: var(--z-ease);
}

.library-front .z-shell-brand > span,
.library-front .z-shell-footer-brand,
.library-front :is(.z-shell-nav, .mobile-bottom-nav) .z-shell-destination > span:last-child,
.library-front :is(.z-home-lookup, .ziyuan-index-titling, .news-edition-mast, .z-account, .z-auth, .z-submit, .z-status) h1,
.library-front :is(.z-home-stream, .z-home-feature, .ziyuan-index-results-title, .news-ledger-title, .news-readout-mast, .news-ranking-mast, .news-index, .z-account-panel) > h2,
.library-front .z-home-channel-copy > strong,
.library-front .z-account-dialog > header h2 {
    font-family: var(--z-hand);
    font-weight: 500;
    font-synthesis: none;
    letter-spacing: normal;
}

.library-front .z-shell-brand > span { font-size: 20px; }

.library-front .z-shell-nav .z-shell-destination > span:last-child {
    font-size: 16px;
    line-height: 1.25;
}

.library-front .mobile-bottom-nav .z-shell-destination > span:last-child {
    font-size: 13px;
    line-height: 1.2;
}

.library-front :is(.z-home-lookup, .ziyuan-index-titling, .news-edition-mast, .z-account, .z-auth, .z-submit, .z-status) h1 {
    line-height: 1.24;
}

@media (max-width: 860px) {
    .library-front .z-shell-brand > span { font-size: 18px; }
}

@media (max-width: 1080px) {
    body.library-front { --z-gutter: 23px; }
    .z-shell-topbar-inner { gap: 10px; }
    .z-shell-nav { gap: 3px; }
}

@media (max-width: 860px) {
    html:has(body.library-front) { scroll-padding-block: 74px calc(82px + env(safe-area-inset-bottom, 0px)); }

    body.library-front {
        --z-gutter: 15px;
        --z-type-hero: clamp(1.9rem, 8.5vw, 2.125rem);
        --catalog-header: 58px;
        min-height: 100dvh;
        padding-block-end: calc(79px + env(safe-area-inset-bottom, 0px));
    }

    .z-shell-topbar-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: calc(var(--catalog-header) + env(safe-area-inset-top, 0px));
        padding-block-start: env(safe-area-inset-top, 0px);
    }

    .z-shell-topbar .z-shell-nav,
    .z-shell-topbar .z-shell-account { display: none; }
    .z-shell-topbar .z-shell-brand { font-size: 16px; }
    .z-shell-topbar .z-shell-brand img { width: 33px; height: 33px; border-radius: 10px; }

    .library-front > .mobile-bottom-nav {
        position: fixed;
        inset: auto 10px calc(7px + env(safe-area-inset-bottom, 0px));
        z-index: 65;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: var(--z-nav-mobile);
        padding: 3px 4px;
        border: 1px solid var(--z-border);
        border-radius: 21px;
        background: var(--z-surface);
        box-shadow: var(--z-shadow);
    }

    .library-front .mobile-bottom-nav .mobile-tab {
        display: flex;
        min-width: 0;
        min-height: 49px;
        flex-direction: column;
        gap: 2px;
        align-items: center;
        justify-content: center;
        color: var(--z-muted);
        font-size: 12px;
        line-height: 1.15;
    }

    .library-front .mobile-bottom-nav .z-shell-glyph {
        flex: 0 0 28px;
        width: 34px;
        height: 28px;
        border-radius: 10px;
    }

    .library-front .mobile-bottom-nav [aria-current="page"] { color: var(--z-accent-strong); font-weight: 700; }
    .library-front .mobile-bottom-nav .mobile-tab:focus-visible { outline-offset: -2px; border-radius: 13px; }
    .library-front .toast { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
    .z-shell-footer-content { grid-template-columns: minmax(0, 1fr); gap: 9px; }
    .z-shell-footer nav { justify-content: start; }
}

@supports (backdrop-filter: blur(14px)) {
    @media not (prefers-reduced-transparency: reduce) {
        .library-front :is(.z-shell-topbar, .mobile-bottom-nav) {
            background: var(--z-chrome);
            backdrop-filter: blur(14px) saturate(116%);
        }
    }
}

@media (prefers-contrast: more) {
    .library-front :is(.z-shell-topbar, .mobile-bottom-nav) {
        background: var(--z-surface);
        backdrop-filter: none;
        border-color: var(--z-control-border);
    }
}

@media (prefers-reduced-motion: reduce) {
    .library-front :is(.z-shell-search, .z-shell-destination, .z-tap, main button:not(:disabled)),
    .library-front :is(.z-shell-search, .z-shell-destination, .z-tap, main button:not(:disabled)):active,
    .library-front .toast {
        scale: none;
        transition: none;
        animation: none;
    }
}
