/* ==========================================================
   汉字字源 · 样式（朱红金褐，纸白底，与平台视觉一致）
   数据来源：skishore/makemeahanzi dictionary.txt（LGPL/Arphic 双许可）
   ========================================================== */
.zy-container { box-sizing: border-box; width: min(var(--brand-content-width), calc(100% - 32px)); margin: 0 auto; padding: 0 0 60px; }

.zy-panel {
    position: relative; padding: 22px 24px 20px; margin: 0 0 20px; border-radius: 12px;
    background: radial-gradient(ellipse 80% 100% at 12% 0%, rgba(184,58,43,.045), transparent 60%), linear-gradient(168deg,#fbf6ec,#f4e9d6);
    border: 1px solid rgba(139,105,20,.22); box-shadow: 0 8px 26px rgba(60,50,35,.06);
}
.zy-sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; flex-wrap: wrap; }
.zy-sectitle { font-family: var(--brand-title-font); font-size: 22px; font-weight: 400; letter-spacing: 4px; color: #5b4c37; position: relative; padding-left: 14px; margin: 0; }
.zy-sectitle::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 20px; border-radius: 2px; background: linear-gradient(180deg, #b83a2b, #8b6914); }
.zy-secsub { font-size: 13px; color: var(--text-muted); letter-spacing: 1px; }

.zy-searchrow { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.zy-input {
    flex: 1; min-width: 220px; padding: 12px 16px; font-family: inherit; font-size: 17px; letter-spacing: 2px;
    color: var(--text-primary); background: #fffdf8;
    border: 1.5px solid rgba(139,105,20,.25); border-radius: 10px; outline: none;
    transition: border-color .25s, box-shadow .25s;
}
.zy-input:focus { border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(139,105,20,.08); }
.zy-btn {
    font-family: var(--brand-title-font); font-size: 16px; letter-spacing: 3px; cursor: pointer;
    padding: 11px 30px; border: none; border-radius: 10px; color: #fff;
    background: linear-gradient(135deg,#b83a2b,#922c21); box-shadow: 0 5px 16px rgba(184,58,43,.24);
    transition: transform .2s, box-shadow .2s;
}
.zy-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(184,58,43,.3); }
.zy-lexicon { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.zy-lex-label { font-size: 12.5px; color: var(--text-muted); letter-spacing: 1px; }
.zy-lex-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.zy-chip { font-size: 15px; padding: 5px 12px; border-radius: 8px; cursor: pointer; color: #6b5a42; background: #fffdf8; border: 1px solid rgba(139,105,20,.24); transition: all .2s; }
.zy-chip:hover { color: #fff; background: linear-gradient(135deg,#b83a2b,#922c21); border-color: transparent; }

/* ---------- 字卡 ---------- */
.zy-card {
    display: grid; grid-template-columns: 190px 1fr; gap: 20px;
    padding: 20px 22px; margin: 0 0 18px; border-radius: 12px;
    background: linear-gradient(168deg,#fbf6ec,#f4e9d6);
    border: 1px solid rgba(139,105,20,.22); box-shadow: 0 8px 26px rgba(60,50,35,.06);
}
.zy-left { text-align: center; }
.zy-glyph { font-family: var(--brand-title-font); font-size: 92px; line-height: 1.1; color: #3a3025; }
.zy-py { font-size: 15px; color: #8b6914; letter-spacing: 1.5px; margin-top: 2px; }
.zy-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.zy-badge { font-size: 12px; padding: 3px 10px; border-radius: 20px; letter-spacing: .5px; color: #fff; background: #8b6914; }
.zy-badge.b-shape { background: #2c4a6e; }
.zy-badge.b-mean { background: #b83a2b; }
.zy-badge.b-sound { background: #3d6b4f; }
.zy-badge.b-pic { background: #7a5c9e; }
.zy-badge.b-rad { background: #6b5a42; }

.zy-right { min-width: 0; }
.zy-block { margin: 0 0 14px; }
.zy-block:last-child { margin-bottom: 0; }
.zy-block h4 { font-family: var(--brand-title-font); font-size: 15px; font-weight: 400; letter-spacing: 2px; color: #8b6914; margin: 0 0 6px; }
.zy-block p { font-size: 14.5px; line-height: 2; color: var(--text-secondary); margin: 0; }
.zy-block p b { color: #b83a2b; font-weight: 400; }

.zy-parts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zy-part {
    display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 12px; border-radius: 9px; background: #fffdf8; border: 1px solid rgba(139,105,20,.24);
}
.zy-part .ch { font-family: var(--brand-title-font); font-size: 26px; color: #3a3025; line-height: 1.1; }
.zy-part .nm { font-size: 11px; color: var(--text-muted); letter-spacing: .5px; }
.zy-part.op { background: rgba(139,105,20,.08); }
.zy-part.op .ch { font-size: 20px; color: #8b6914; }
.zy-arrow { color: rgba(139,105,20,.55); font-size: 16px; }

.zy-tree { font-size: 13.5px; line-height: 2.1; color: var(--text-secondary); font-family: ui-monospace, Consolas, monospace; }
.zy-tree .ids { color: #8b6914; }
.zy-tree .unk { color: rgba(139,105,20,.5); }

.zy-writer { width: 160px; height: 160px; margin: 10px auto 0; position: relative; border-radius: 8px; background: #fffdf8; border: 1px dashed rgba(139,105,20,.3); }
.zy-writer::before, .zy-writer::after { content: ''; position: absolute; pointer-events: none; background: rgba(139,105,20,.16); }
.zy-writer::before { left: 0; right: 0; top: 50%; height: 1px; }
.zy-writer::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.zy-wbtns { display: flex; gap: 6px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.zy-wbtn { font-size: 12px; padding: 4px 10px; border-radius: 6px; cursor: pointer; color: #6b5a42; background: #fffdf8; border: 1px solid rgba(139,105,20,.28); }
.zy-wbtn:hover { color: #fff; background: linear-gradient(135deg,#b83a2b,#922c21); border-color: transparent; }

.zy-radchars { display: flex; flex-wrap: wrap; gap: 8px; }
.zy-radchar {
    font-family: var(--brand-title-font); font-size: 22px; width: 44px; height: 44px; line-height: 44px; text-align: center;
    border-radius: 9px; cursor: pointer; color: #3a3025; background: #fffdf8; border: 1px solid rgba(139,105,20,.24);
    transition: all .2s;
}
.zy-radchar:hover { color: #fff; background: linear-gradient(135deg,#b83a2b,#922c21); border-color: transparent; transform: translateY(-2px); }
.zy-empty { padding: 26px; text-align: center; font-size: 14px; color: var(--text-muted); letter-spacing: 1px; }

@media (max-width: 720px) {
    .zy-panel { padding: 18px 16px 16px; }
    .zy-card { grid-template-columns: 1fr; }
    .zy-left { display: flex; align-items: center; gap: 18px; text-align: left; }
    .zy-glyph { font-size: 72px; }
    .zy-badges { justify-content: flex-start; margin-top: 0; }
    .zy-writer { width: 132px; height: 132px; }
}
