:root {
    --cy-accent: #ff5a1f;
    --cy-accent-strong: #e64910;
    --cy-accent-soft: #fff1ea;
    --cy-bg: #f6f6f4;
    --cy-surface: #ffffff;
    --cy-surface-soft: #faf8f6;
    --cy-border: #ebe5df;
    --cy-text: #1f1a17;
    --cy-soft: #5e5650;
    --cy-muted: #92877d;
    --cy-shadow: 0 10px 24px rgba(31, 26, 23, 0.06);
    --cy-title-font: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--cy-bg);
    color: var(--cy-text);
    font: 14px/1.75 -apple-system, BlinkMacSystemFont, "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.zd-main {
    padding: 14px 0 28px;
}

.zd-home-top {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.zd-panel,
.page-header,
.index-nav,
.stroke-section,
.letter-section,
.related-section,
.detail-header,
.stroke-overview-section,
.dyz-section {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 16px 0;
    border-top: 1px dashed var(--cy-border);
}

.page-header {
    border-top: 0;
}

.detail-header {
    border-top: 0;
}

.zd-home-top > .zd-panel,
.zd-home-grid .zd-panel {
    background: var(--cy-surface);
    border: 1px solid var(--cy-border);
    border-radius: 16px;
    box-shadow: var(--cy-shadow);
    padding: 16px 18px;
}

.zd-home-lead {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.zd-page-kicker,
.zd-section-kicker,
.section-heading,
.index-nav-label {
    color: var(--cy-accent);
}

.zd-page-kicker,
.zd-section-kicker {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.zd-page-title,
.zd-section-head h2,
.zd-panel-head h2,
.page-header h1,
.detail-meta h1,
.section-heading,
.detail-char-big {
    margin: 0;
    color: var(--cy-text);
    font-family: var(--cy-title-font);
}

.zd-page-title {
    font-size: 38px;
    line-height: 1.15;
}

.zd-page-summary,
.subtitle,
.about-text,
.intro-box {
    margin: 0;
    color: var(--cy-soft);
    font-size: 14px;
    line-height: 1.8;
}

.zd-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 6px 6px 6px 14px;
    border: 2px solid rgba(255, 90, 31, 0.95);
    border-radius: 999px;
    background: #fff8f5;
}

.zd-search-box i {
    color: var(--cy-muted);
}

.zd-search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--cy-text);
    font-size: 15px;
}

.zd-search-box button {
    flex-shrink: 0;
    height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff6d39, #ff4f14);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.zd-entry-row,
.zd-alpha-grid,
.zd-stroke-grid,
.zd-tag-grid,
.zd-site-links,
.related-list,
.bushou-list,
.pinyin-list,
.stroke-extra-links,
.seo-links,
.hot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.zd-entry-row a,
.zd-alpha-grid a,
.zd-stroke-grid a,
.zd-tag-grid a,
.stroke-tag,
.extra-link-btn,
.seo-tag,
.alpha-item,
.pinyin-item,
.related-tag,
.bushou-item,
.hot-hz {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--cy-surface-soft);
    color: var(--cy-soft);
    font-size: 13px;
}

.zd-entry-row a:hover,
.zd-alpha-grid a:hover,
.zd-stroke-grid a:hover,
.zd-tag-grid a:hover,
.zd-site-links a:hover,
.stroke-tag:hover,
.extra-link-btn:hover,
.seo-tag:hover,
.alpha-item:hover,
.pinyin-item:hover,
.related-tag:hover,
.related-tag.current,
.bushou-item:hover,
.hot-hz:hover,
.index-nav-link:hover,
.index-nav-link.active,
.stroke-item:hover,
.dyz-card:hover {
    background: var(--cy-accent-soft);
    color: var(--cy-accent-strong);
}

.zd-daily-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zd-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.zd-panel-head h2 {
    font-size: 20px;
    line-height: 1.2;
}

.zd-panel-head span,
.count-badge,
.detail-stats,
.related-title,
.tone-title,
.dyz-py {
    color: var(--cy-muted);
    font-size: 12px;
}

.zd-daily-char {
    display: block;
    font-family: var(--cy-title-font);
    font-size: 72px;
    line-height: 1;
}

.zd-daily-char-link {
    display: inline-flex;
    width: fit-content;
}

.zd-daily-char-link:hover .zd-daily-char {
    color: var(--cy-accent-strong);
}

.zd-daily-pinyin {
    margin: 0;
    color: var(--cy-accent-strong);
    font-size: 14px;
    font-weight: 700;
}

.zd-daily-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.zd-daily-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--cy-surface-soft);
    color: var(--cy-soft);
    font-size: 12px;
}

.zd-daily-desc,
.zd-panel-text {
    margin: 0;
    color: var(--cy-soft);
    font-size: 14px;
    line-height: 1.8;
}

.zd-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.zd-section-head h2 {
    margin-top: 6px;
    font-size: 28px;
    line-height: 1.2;
}

.zd-section-more {
    color: var(--cy-accent-strong);
    font-size: 13px;
    font-weight: 600;
}

.zd-hanzi-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.stroke-extra-links {
    padding-top: 14px;
    border-top: 1px dashed var(--cy-border);
}

.zd-hanzi-card,
.char-card,
.char-grid-item,
.stroke-item,
.dyz-card {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--cy-surface);
    border: 1px solid var(--cy-border);
}

.zd-hanzi-card {
    min-height: 54px;
    font-family: var(--cy-title-font);
    font-size: 26px;
}

.zd-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.zd-site-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--cy-surface-soft);
    color: var(--cy-soft);
    font-size: 13px;
}

.breadcrumb-wrap {
    max-width: 1200px;
    margin: 10px auto 0;
    padding: 0 16px;
}

.breadcrumb-wrap .breadcrumb {
    margin-bottom: 0;
}

.container {
    max-width: 1200px;
    margin: 10px auto 0;
    padding: 14px 16px 28px;
    background: var(--cy-surface);
    border-radius: 8px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--cy-muted);
    font-size: 12px;
}

.breadcrumb a {
    color: var(--cy-soft);
}

.page-header h1 {
    font-size: 28px;
    line-height: 1.2;
}

.page-header h1 i {
    color: var(--cy-accent-strong);
}

.page-header .subtitle {
    margin-top: 8px;
}

.index-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 0;
}

.index-nav-label {
    font-size: 12px;
    font-weight: 700;
}

.index-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--cy-surface-soft);
    color: var(--cy-soft);
    font-size: 13px;
    font-weight: 600;
}

.stroke-section,
.letter-section,
.related-section,
.detail-header,
.stroke-overview-section,
.dyz-section {
    margin-bottom: 0;
}

.section-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.3;
}

.section-heading-link {
    color: inherit;
    text-decoration: none;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--cy-surface-soft);
}

.bushou-item {
    gap: 6px;
}

.bushou-char {
    color: var(--cy-text);
    font-family: var(--cy-title-font);
    font-size: 18px;
}

.bushou-count,
.char-card .py,
.detail-stats span,
.related-text,
.dyz-py {
    color: var(--cy-muted);
    font-size: 12px;
}

.pinyin-item {
    font-weight: 600;
}

.char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
}

.char-card {
    flex-direction: column;
    gap: 4px;
    min-height: 84px;
    padding: 10px 6px;
}

.char-card .ch {
    color: var(--cy-text);
    font-family: var(--cy-title-font);
    font-size: 24px;
    line-height: 1;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.detail-char-big {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 92px;
    padding: 0 12px;
    border-radius: 14px;
    background: var(--cy-surface-soft);
    font-size: 42px;
    line-height: 1;
}

.detail-meta h1 {
    font-size: 28px;
    line-height: 1.2;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 8px;
}

.related-list {
    margin-top: 8px;
}

.tone-mark {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--cy-accent-soft);
    color: var(--cy-accent-strong);
    font-size: 12px;
    font-weight: 700;
}

.no-data {
    padding: 32px 12px;
    text-align: center;
    color: var(--cy-muted);
}

.intro-box {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--cy-surface-soft);
}

.stroke-grid,
.dyz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
}

.stroke-item,
.dyz-card {
    min-height: 72px;
    padding: 10px 8px;
    font-size: 14px;
    line-height: 1.5;
}

.dyz-card {
    flex-direction: column;
    gap: 4px;
}

.dyz-hanzi {
    color: var(--cy-text);
    font-family: var(--cy-title-font);
    font-size: 24px;
    line-height: 1;
}

@media (max-width: 960px) {
    .zd-home-top,
    .zd-home-grid {
        grid-template-columns: 1fr;
    }

    .zd-hanzi-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .zd-main,
    .container {
        padding-top: 10px;
    }

    .cy-container,
    .breadcrumb-wrap,
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .container--edge-mobile {
        padding-left: 0;
        padding-right: 0;
        border-radius: 0;
    }

    .container--edge-mobile .detail-header,
    .container--edge-mobile .stroke-section,
    .container--edge-mobile .related-section {
        padding-left: 12px;
        padding-right: 12px;
    }

    .zd-panel,
    .page-header,
    .index-nav,
    .stroke-section,
    .letter-section,
    .related-section,
    .detail-header,
    .stroke-overview-section,
    .dyz-section {
        padding: 14px 0;
    }

    .zd-home-top > .zd-panel,
    .zd-home-grid .zd-panel {
        padding: 14px 12px;
        border-radius: 14px;
    }

    .zd-page-title,
    .page-header h1,
    .detail-meta h1 {
        font-size: 26px;
    }

    .zd-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .zd-section-head h2 {
        font-size: 22px;
    }

    .zd-search-box {
        min-height: 44px;
        padding-left: 12px;
    }

    .zd-search-box button {
        height: 34px;
        padding: 0 15px;
    }

    .zd-hanzi-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
    }

    .detail-header {
        align-items: flex-start;
    }

    .detail-char-big {
        min-width: 76px;
        min-height: 76px;
        font-size: 34px;
    }

    .char-grid,
    .stroke-grid,
    .dyz-grid {
        grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
        gap: 8px;
    }

    .char-card,
    .stroke-item,
    .dyz-card {
        min-height: 64px;
    }

    .stroke-extra-links {
        padding-top: 12px;
    }
}
