.dict-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
    padding: 30px;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e8ebef;
    border-radius: 14px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, .04);
}
#character-target svg{
    margin-bottom:3px;
}
#characterGrid svg{
    z-index:9999;
}



.dict-character-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* 米字格 */

.character-grid {
    position: relative;
    width: 230px;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;

    border: 1px solid #d9d9d9;

    overflow: hidden;
}


/* 米字格的線 */

.grid-line {
    position: absolute;
    pointer-events: none;
}


/* 橫線 */

.grid-h {
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #ddd;
}


/* 直線 */

.grid-v {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: #ddd;
}


/* 左上 → 右下 */

.grid-x1 {
    width: 141%;
    height: 1px;
    top: 50%;
    left: -20.5%;
    background: #ddd;
    transform: rotate(45deg);
}


/* 右上 → 左下 */

.grid-x2 {
    width: 141%;
    height: 1px;
    top: 50%;
    left: -20.5%;
    background: #ddd;
    transform: rotate(-45deg);
}


/* 漢字 */

.dict-character {
    position: relative;
    z-index: 5;

    font-size: 170px;
    line-height: 1;
    font-weight: 500;

    color: #222;
}




.character-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}


.copy-character-btn,
.stroke-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    height: 38px;
    padding: 0 16px;

    border: 1px solid #ddd;
    border-radius: 8px;

    background: #fff;
    color: #555;

    font-size: 14px;

    cursor: pointer;

    transition: all .2s ease;
}


.copy-character-btn:hover,
.stroke-play-btn:hover {
    border-color: #aaa;
    background: #f7f7f7;
}


/* 播放筆順按鈕 */

.stroke-play-btn {
    color: #333;
}




.dict-character-info {
    min-width: 0;
}


.character-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;
}


.character-name {
    font-size: 30px;
    font-weight: 700;
    color: #222;
}


.character-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;

    margin-top: 8px;

    color: #000;
    font-size: 14px;
}
.character-meta a{
    color:#086144;
}


.pronunciation-section {
    padding: 18px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}


.section-label {
    margin-bottom: 12px;

    color: #555;
    font-size: 14px;
    font-weight: 600;
}


.section-label i {
    margin-right: 6px;
}


/* 多音字列表 */

.pronunciation-list {
    display: flex;
    flex-wrap:wrap;
    gap: 10px;
}


/* 每一個讀音 */

.pronunciation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 6px 12px;

    border: 1px solid #e8e8e8;
    border-radius: 9px;

    background: #fafafa;
}

.cns_tips{
    width: 100%;display: block;padding: 5px;font-size: 12px;color: #666;
}

.pronunciation-main {
    display: flex;
    align-items: center;
    gap: 18px;
}


/* 拼音 */

.pinyin-link {
    color: #222;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}


.pinyin-link:hover {
    text-decoration: underline;
}


/* 注音 */

.zhuyin {
    color: #777;
    font-size: 14px;
}




.character-no-stroke {
    width: 230px;
    height: 230px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 180px;
    line-height: 1;
    color: #000;
    font-family: inherit;

    
    background-color: #fff;
    background-image:
        linear-gradient(to right, transparent calc(50% - 0.5px), #ddd 50%, transparent calc(50% + 0.5px)),
        linear-gradient(to bottom, transparent calc(50% - 0.5px), #ddd 50%, transparent calc(50% + 0.5px)),
        linear-gradient(45deg, transparent calc(50% - 0.5px), #ddd 50%, transparent calc(50% + 0.5px)),
        linear-gradient(-45deg, transparent calc(50% - 0.5px), #ddd 50%, transparent calc(50% + 0.5px));

   
    box-sizing: border-box;
}

.character-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 18px;
}


.character-badge {
    padding: 5px 10px;

    border-radius: 5px;

    background: #f4f5f6;
    color: #666;

    font-size: 12px;
}


.zhuyin {
    color: #6c757d;
    font-size: 18px;
}


.sound-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #086144;
    color: #fff;
    cursor: pointer;
    transition: all .2s;
    margin-left:10px;
}


.sound-btn:hover {
    background: #06432e;
    transform: scale(1.05);
}


.sound-btn.playing {
    background: #28a745;
}


.character-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}


.character-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f1f3f5;
    color: #6c757d;
    font-size: 13px;
}




.dict-card {
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
    overflow: hidden;
}


.dict-card-title {
    min-height: 58px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #edf0f2;
}


.title-left {
    display: flex;
    align-items: center;
    gap: 10px;
}


.title-left i {
    color: #086144;
    font-size: 17px;
}


.title-left h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    color: #212529;
}


.title-right {
    color: #868e96;
    font-size: 14px;
}


.card-more {
    color: #6c757d;
    font-size: 14px;
    text-decoration: none;
}


.card-more:hover {
    color: #086144;
}




.basic-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


.info-item {
    display: flex;
    min-height: 54px;
    border-bottom: 1px solid #ddd;
}


.info-item:nth-last-child(-n+2) {
    border-bottom: 0;
}


.info-label {
    width: 120px;
    flex: 0 0 120px;
    padding: 16px 20px;
    color: #000;
    background: #efefef;
    font-size: 14px;
}


.info-value {
    flex: 1;
    padding: 16px 20px;
    color: #343a40;
    font-size: 15px;
}


.info-value a {
    color: #086144;
    text-decoration: none;
}


.info-extra {
    margin-left: 5px;
    color: #000;
    font-size: 13px;
}


.code-value {
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
}


.stroke-text {
    line-height: 1.6;
}




.stroke-player {
    padding: 25px;
}


.stroke-display {
    width: 260px;
    height: 260px;
    margin: 0 auto;
    border: 1px solid #edf0f2;
    border-radius: 10px;
    background:
        linear-gradient(
            90deg,
            transparent 49.7%,
            #f1f3f5 49.7%,
            #f1f3f5 50.3%,
            transparent 50.3%
        ),
        linear-gradient(
            transparent 49.7%,
            #f1f3f5 49.7%,
            #f1f3f5 50.3%,
            transparent 50.3%
        );
    position: relative;
}


.stroke-display:before,
.stroke-display:after {
    content: "";
    position: absolute;
    background: #f1f3f5;
    z-index: 0;
}


.stroke-display:before {
    left: 0;
    right: 0;
    top: 25%;
    height: 1px;
}


.stroke-display:after {
    top: 0;
    bottom: 0;
    left: 25%;
    width: 1px;
}


.character-target {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
}


.stroke-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}


.stroke-control-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    color: #495057;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}


.stroke-control-btn:hover {
    border-color: #086144;
    color: #086144;
}


.stroke-control-btn.primary {
    background: #086144;
    border-color: #086144;
    color: #fff;
}


.stroke-control-btn.primary:hover {
    background: #0069d9;
}


.stroke-progress {
    margin-top: 16px;
    text-align: center;
}


.stroke-progress-text {
    color: #868e96;
    font-size: 14px;
}


.stroke-progress-text strong {
    color: #343a40;
    margin: 0 3px;
}


.stroke-order-list {
    padding: 14px 20px;
    border-top: 1px solid #edf0f2;
    color: #6c757d;
    text-align: center;
    font-size: 18px;
}


.stroke-order-list span {
    margin: 0 5px;
}




.meaning-block {
    padding: 20px;
}


.meaning-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 5px;
    margin-bottom: 5px;
    border-bottom: 1px solid #f1f3f5;
}


.meaning-pinyin {
    color: #000;
    font-size: 24px;
    font-weight: 600;
    text-decoration: none;
}





.meaning-zhuyin {
    color: #666;
    font-size: 16px;
}


.meaning-item {
    display: flex;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px dashed #e9ecef;
}


.meaning-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}


.meaning-number {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f3f5;
    color: #495057;
    font-size: 13px;
}


.meaning-content {
    flex: 1;
}


.meaning-title {
    color: #343a40;
    font-size: 16px;
    line-height: 1.7;
}


.meaning-example {
    margin-top: 5px;
    color: #000;
    font-size: 16px;
    line-height: 2;
}

.meaning-example a{
    color:#086144;
}
.meaning-example a:hover{
    text-decoration: underline;
}
.example-label {
    color: #adb5bd;
}




.word-group {
    padding: 20px;
    border-bottom: 1px solid #f1f3f5;
}


.word-group:last-child {
    border-bottom: 0;
}


.word-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}


.word-group-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #086144;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
}


.word-group-title h3 {
    flex: 1;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #343a40;
}


.word-group-title a {
    color: #868e96;
    text-decoration: none;
    font-size: 13px;
}


.word-group-title a:hover {
    color: #086144;
}


.word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}


.word-item {
    display: inline-block;
    padding: 7px 13px;
    background: #f8f9fa;
    border: 1px solid #edf0f2;
    border-radius: 5px;
    color: #000;
    font-size: 16px;
    text-decoration: none;
    transition: all .2s;
}


.word-item:hover {
    color: #fff;
    background: #086144;
    border-color: #086144;
}




.idiom-list {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}


.idiom-item {
    padding: 10px 12px;
    border: 1px solid #edf0f2;
    border-radius: 5px;
    color: #000;
    background: #fff;
    text-decoration: none;
    transition: all .2s;
    text-align: center;
    font-size: 16px;
}


.idiom-item:hover {
    color: #fff;
    background: #086144;
    border-color: #086144;
}



.evolution-intro {
    padding: 20px;
    color: #6c757d;
    font-size: 15px;
    line-height: 1.8;
}


.evolution-timeline {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 0 20px 25px;
}


.evolution-item {
    text-align: center;
}


.evolution-period {
    margin-bottom: 10px;
    color: #868e96;
    font-size: 13px;
}


.evolution-image {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #edf0f2;
    border-radius: 8px;
    background: #fafbfc;
}


.ancient-character {
    font-family: serif;
    font-size: 65px;
    color: #495057;
}


.ancient-character.seal {
    font-family: "STKaiti", "KaiTi", serif;
    transform: scaleX(.8);
}


.ancient-character.clerical {
    font-family: "STLiti", "LiSu", serif;
}


.ancient-character.regular {
    font-family: "Noto Serif TC", serif;
}




.related-block {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f5;
}


.related-block:last-child {
    border-bottom: 0;
}


.related-title {
    margin-bottom: 10px;
    color: #000;
    font-size: 14px;
}


.related-character-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


.related-character-list a {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #edf0f2;
    border-radius: 6px;
    background: #fff;
    color: #000;
    font-size: 18px;
    text-decoration: none;
    transition: all .2s;
}


.related-character-list a:hover {
    color: #fff;
    border-color: #086144;
    background: #086144;
}




.seo-dict-content {
    padding: 20px;
}


.seo-dict-content h2 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 600;
}


.seo-dict-content p {
    margin: 0 0 10px;
    color: #333;
    font-size: 14px;
    line-height: 1.9;
}


.seo-dict-content p:last-child {
    margin-bottom: 0;
}




@media (max-width: 991.98px) 
{

    .pronunciation-section
    {
        text-align:left;
    }
   .dict-hero {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 24px;
    }

    .character-grid {
        width: 200px;
        height: 200px;
    }

    .dict-character {
        font-size: 145px;
    }

    .dict-character-wrap {
        width: 150px;
        flex-basis: 150px;
    }


   


    .basic-info-grid {
        grid-template-columns: 1fr;
    }


    .info-item:nth-last-child(-n+2) {
        border-bottom: 1px solid #f1f3f5;
    }


    .info-item:last-child {
        border-bottom: 0;
    }


    .idiom-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    .evolution-timeline {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 767.98px) 
{

    .dict-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 22px 16px;
    }


    .dict-character-wrap {
        width: 100%;
    }


    .dict-pronunciation {
        width: 100%;
    }


    .pronunciation-list {
        justify-content: center;
    }


    .character-badges {
        justify-content: center;
    }


    .dict-card-title {
        padding: 14px 15px;
    }


    .title-left h2 {
        font-size: 17px;
    }


    .basic-info-grid {
        display: block;
    }


    .info-item {
        display: block;
    }


    .info-label {
        width: auto;
        padding: 10px 15px 4px;
        background: #fff;
        color: #868e96;
    }


    .info-value {
        padding: 3px 15px 12px;
    }


    .stroke-display {
        width: 220px;
        height: 220px;
    }


    .stroke-player {
        padding: 20px 15px;
    }


    .stroke-controls {
        gap: 6px;
    }


    .stroke-control-btn {
        padding: 7px 11px;
        font-size: 13px;
    }


    .word-group {
        padding: 16px 15px;
    }


    .word-group-title {
        align-items: flex-start;
    }


    .word-group-title h3 {
        line-height: 1.5;
    }


    .idiom-list {
        padding: 15px;
        grid-template-columns: 1fr;
    }


    .evolution-timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 15px 20px;
    }


    .evolution-image {
        height: 110px;
    }


    .ancient-character {
        font-size: 52px;
    }


    .related-block {
        padding: 14px 15px;
    }

    .dict-hero {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 20px;
    }


    .dict-character-panel {
        width: 100%;
    }


    .character-grid {
        width: 210px;
        height: 210px;
    }


    .dict-character {
        font-size: 155px;
    }


    .dict-character-info {
        width: 100%;
    }


    .character-name {
        font-size: 26px;
    }


    .pronunciation-item {
        padding: 10px 12px;
    }



}


@media (max-width: 400px) 
{

    .dict-character {
            font-size: 88px;
        }


        .pronunciation-item {
            padding: 8px 10px;
        }


        .pinyin-link {
            font-size: 15px;
        }


        .zhuyin {
            font-size: 13px;
        }


        .stroke-display {
            width: 190px;
            height: 190px;
        }

}