/* ===== hanzi.php 页面专属补充样式（在 style.css 基础上微调） ===== */
.detail-hero {
    margin-top: 15px;
    background: #fff;
    border: 1px solid #ebe7e0;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(74, 58, 45, .04);
}
.detail-top {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
}
.char-preview {
    min-height: 300px;
    border-radius: 17px;
    background: #f8f7f4;
    border: 1px solid #ebe7e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.char-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
}
.detail-info h1 {
    margin: 0 0 12px;
    font-size: 29px;
    font-family: "Noto Serif TC", "PMingLiU", "MingLiU", serif;
    color: #292725;
}
.subtitle {
    color: #858079;
    font-size: 15px;
    margin-bottom: 22px;
}
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}
.data-item {
    background: #faf8f5;
    border-radius: 11px;
    padding: 12px 14px;
    border: 1px solid #eee9e3;
    min-width: 0;
}
.data-label {
    display: block;
    font-size: 12px;
    color: #8a847d;
}
.data-value {
    display: block;
    font-size: 15px;
    margin-top: 2px;
    color: #302d2a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 17px;
    border-radius: 10px;
    border: 1px solid #ddd7cf;
    background: #fff;
    font-size: 14px;
    color: #292725;
    transition: .2s ease;
    cursor: pointer;
}
.btn:hover {
    background: #faf8f5;
    border-color: #cda29c;
}
.btn-primary {
    background: #a33a32;
    border-color: #a33a32;
    color: #fff;
}
.btn-primary:hover {
    background: #8e302a;
}
.main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 20px;
    margin-top: 20px;
}
.card {
    background: #fff;
    border: 1px solid #ebe7e0;
    border-radius: 17px;
    padding: 27px;
}
.card + .card {
    margin-top: 20px;
}
.card h2 {
    margin: 0 0 17px;
    font-size: 21px;
    font-family: "Noto Serif TC", "PMingLiU", "MingLiU", serif;
    color: #302d2a;
}
.card h3 {
    font-size: 16px;
    margin: 23px 0 9px;
    color: #36322f;
}
.card p {
    color: #77716b;
    font-size: 14px;
    margin: 0 0 12px;
}
.stroke-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 9px;
}
.stroke-step {
    min-height: 96px;
    background: #faf8f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 10px 4px;
    gap: 5px;
    border: 1px solid #eee9e3;
}
.stroke-step img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
}
.stroke-step strong {
    font-size: 13px;
    color: #302d2a;
}
.stroke-step span {
    color: #aaa39b;
    font-size: 11px;
}
.steps-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    background: #faf8f5;
    border: 1px solid #eee9e3;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table th,
.table td {
    padding: 11px 10px;
    border-bottom: 1px solid #eee9e3;
    text-align: left;
}
.table th {
    width: 120px;
    color: #858079;
    font-weight: 500;
}
.calligraphy {
    background: #faf8f5;
    border-radius: 13px;
    overflow: hidden;
    text-align: center;
    border: 1px solid #eee9e3;
}
.calligraphy img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: auto;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.related {
    background: #faf8f5;
    border-radius: 10px;
    padding: 12px 5px;
    text-align: center;
    font-size: 24px;
    border: 1px solid #eee9e3;
    color: #302d2a;
    transition: .2s ease;
    font-family: "Noto Serif TC", "PMingLiU", "MingLiU", serif;
}
.related:hover {
    background: #f5e9e6;
    border-color: #cda29c;
    color: #a33a32;
}
.side-card {
    background: #fff;
    border: 1px solid #ebe7e0;
    border-radius: 17px;
    padding: 22px;
}
.side-card + .side-card {
    margin-top: 20px;
}
.side-card h2 {
    margin: 0 0 15px;
    font-size: 18px;
    font-family: "Noto Serif TC", "PMingLiU", "MingLiU", serif;
    color: #302d2a;
}
.side-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.side-links a {
    padding: 7px 11px;
    border-radius: 8px;
    background: #faf8f5;
    font-size: 13px;
    border: 1px solid #eee9e3;
    transition: .2s ease;
}
.side-links a:hover {
    background: #f5e9e6;
    border-color: #cda29c;
    color: #a33a32;
}
.prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.prev-next a {
    padding: 13px;
    background: #faf8f5;
    border-radius: 10px;
    border: 1px solid #eee9e3;
    transition: .2s ease;
}
.prev-next a:hover {
    background: #f5e9e6;
    border-color: #cda29c;
}
.prev-next small {
    display: block;
    color: #aaa39b;
    font-size: 11px;
}
.prev-next strong {
    font-size: 20px;
    color: #302d2a;
}
.breadcrumb {
    padding: 18px 0 0;
    color: #aaa39b;
    font-size: 13px;
}
.breadcrumb a:hover {
    color: #a33a32;
}
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active {
    display: flex;
}
.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    background: #fff;
}
.modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.click-hint {
    font-size: 12px;
    color: #aaa39b;
    text-align: center;
    margin-top: 6px;
}
.speak-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.audio-btn {
    border: 1px solid #ddd7cf;
    background: #fff;
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 13px;
    transition: .2s ease;
}
.audio-btn:hover {
    background: #faf8f5;
}
.rate-select {
    border: 1px solid #ddd7cf;
    border-radius: 8px;
    padding: 4px 6px;
    font-size: 13px;
    background: #fff;
}
#backToTop {
    display: none;
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: #a33a32;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(163,58,50,.25);
    z-index: 200;
}
.ad-box {
    margin: 20px 0;
    background: #fff;
    border: 1px solid #ebe7e0;
    border-radius: 17px;
    padding: 16px;
    text-align: center;
    overflow: hidden;
}
.ad-box-inline {
    margin: 20px 0 0;
}
.side-ad {
    margin-top: 20px;
    background: #fff;
    border: 1px solid #ebe7e0;
    border-radius: 17px;
    padding: 16px;
    text-align: center;
    overflow: hidden;
}
.words-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 4px;
}
.bishun-words-item {
    background: #fff;
    border: 1px solid #ebe7e0;
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.85;
    color: #706a64;
    box-shadow: 0 1px 3px rgba(74, 58, 45, .04);
    transition: all .22s ease;
    word-break: break-word;
}
.bishun-words-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 58, 45, .08);
    border-color: #cda29c;
}
.word-title {
    font-size: 15px;
    font-weight: 700;
    color: #302d2a;
    margin-right: 2px;
}
.word-pinyin {
    display: inline-block;
    background: #f5e9e6;
    color: #914039;
    font-size: 12px;
    padding: 1px 7px;
    border-radius: 10px;
    margin-right: 4px;
    font-weight: 500;
    letter-spacing: .2px;
}
.word-colon {
    color: #aaa39b;
    margin-right: 4px;
}
.dict-section dd {
    margin: 0;
}
.dict-section p {
    font-size: 0.95rem;
    line-height: 1.9;
    color: #706a64;
    margin: 0 0 10px 0;
    padding-left: 0;
}
.dict-section .dangqianhanzi {
    color: #a33a32;
    font-weight: 600;
}
.dict-section span {
    color: #77716b;
}
.swjz-section .hr2 {
    border-top: 1px solid #eee9e3;
    margin: 12px 0;
}
.swjz-section .info {
    font-size: 0.9rem;
    color: #858079;
    margin: 4px 0;
}
.swjz-section .info span {
    display: inline-block;
    background: #faf8f5;
    color: #914039;
    border-radius: 4px;
    padding: 1px 7px;
    margin-right: 6px;
    font-size: 0.8rem;
    border: 1px solid #eee9e3;
}
.swjz-section .explain,
.swjz-section .note {
    font-size: 0.95rem;
    color: #706a64;
}
.swjz-section .zicover img {
    vertical-align: middle;
}
.zoomable {
    cursor: zoom-in;
    transition: transform .2s ease, box-shadow .2s ease;
}
.zoomable:hover {
    box-shadow: 0 8px 24px rgba(74, 58, 45, .12);
}

@media (max-width: 850px) {
    .detail-top { grid-template-columns: 230px 1fr; gap: 25px; }
    .char-preview { min-height: 240px; }
    .main-grid { grid-template-columns: 1fr; }
    .side-card { margin-top: 20px; }
}
@media (max-width: 650px) {
    .detail-hero { padding: 17px; margin-top: 10px; }
    .detail-top { grid-template-columns: 1fr; gap: 20px; }
    .char-preview { min-height: 230px; }
    .detail-info h1 { font-size: 24px; }
    .data-grid { grid-template-columns: 1fr 1fr; }
    .card { padding: 20px; }
    .stroke-list { grid-template-columns: repeat(4, 1fr); }
    .stroke-step { min-height: 80px; padding: 8px 3px; }
    .stroke-step img { width: 36px; height: 36px; }
    .related-grid { grid-template-columns: repeat(5, 1fr); }
    .words-section { grid-template-columns: 1fr; gap: 10px; }
    .bishun-words-item { padding: 14px 15px; font-size: 13.5px; }
}






/* ===== 討論摘要 ===== */
.discuss-summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.discuss-summary-item {
    background: #faf7f2;
    border: 1px solid #eee7de;
    border-radius: 10px;
    padding: 12px 14px;
}
.discuss-summary-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.discuss-summary-nick {
    font-size: 13px;
    font-weight: 600;
    color: #4a453f;
}
.discuss-summary-time {
    font-size: 12px;
    color: #aaa39b;
}
.discuss-summary-content {
    font-size: 14px;
    color: #2f2b27;
    line-height: 1.7;
    word-break: break-word;
}
.discuss-summary-foot {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}






.feedback-box {
    max-width: 480px;
    width: 92%;
    background: #fff;
    border-radius: 12px;
    padding: 20px 22px;
    text-align: left;
}
.feedback-box h3 {
    margin: 0 0 14px;
    font-size: 17px;
    color: #2f2b27;
}
.feedback-box form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.feedback-box label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #6b6560;
}
.feedback-box select,
.feedback-box input[type="text"],
.feedback-box textarea {
    padding: 9px 10px;
    border: 1px solid #ddd7cf;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: #fff;
}
.feedback-box select:focus,
.feedback-box input[type="text"]:focus,
.feedback-box textarea:focus {
    border-color: #a33a32;
}
.feedback-msg {
    font-size: 13px;
    margin: 0;
    color: #666;
}