/* ==========================================================
   汉字工具箱 · 样式（水墨古韵，与平台视觉一致）
   朱红 #b83a2b / 金褐 #8b6914 #8b7355 / 纸白 #fffdf8
   ========================================================== */
.hz-container { box-sizing: border-box; width: min(var(--brand-content-width), calc(100% - 32px)); margin: 0 auto; padding: 0 0 60px; }

/* 区块标题 */
.hz-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 18px; flex-wrap: wrap; }
.hz-section-title { font-family: var(--brand-title-font); font-size: 22px; font-weight: 400; letter-spacing: 4px; color: #5b4c37; position: relative; padding-left: 14px; }
.hz-section-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 20px; border-radius: 2px; background: linear-gradient(180deg, #b83a2b, #8b6914); }
.hz-section-sub { font-size: 13px; color: var(--text-muted); letter-spacing: 1px; }

/* 查询面板 */
.hz-panel {
    padding: 22px 22px 18px; border-radius: 12px; margin: 6px 0 4px;
    border: 1px solid rgba(139,105,20,.22);
    background: radial-gradient(ellipse 70% 120% at 10% 0%, rgba(184,58,43,.05), transparent 60%), linear-gradient(168deg,#fbf6ec,#f4e9d6);
    box-shadow: 0 6px 20px rgba(60,50,35,.06);
}
.hz-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hz-panel-title { font-family: var(--brand-title-font); font-size: 21px; font-weight: 400; letter-spacing: 3px; color: #3a3025; margin: 0; }
.hz-panel-sub { font-size: 12.5px; color: var(--text-muted); letter-spacing: .5px; }

.hz-searchbar { display: flex; gap: 10px; flex-wrap: wrap; }
.hz-input {
    flex: 1; min-width: 220px; padding: 11px 16px; font-family: inherit; font-size: 15px;
    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;
}
.hz-input:focus { border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(139,105,20,.08); }
.hz-input-sm { font-size: 14px; padding: 9px 12px; min-width: 96px; flex: 1; }

.hz-btn {
    padding: 11px 24px; font-family: inherit; font-size: 14.5px; letter-spacing: 1px; cursor: pointer;
    color: #fff; border: none; border-radius: 10px;
    background: linear-gradient(135deg,#b83a2b,#922c21); box-shadow: 0 4px 12px rgba(184,58,43,.26);
    transition: transform .25s, box-shadow .25s, opacity .25s;
}
.hz-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(184,58,43,.32); }
.hz-btn:active { transform: translateY(0); }

.hz-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hz-chips-label { font-size: 12.5px; color: var(--text-muted); }
.hz-chip {
    padding: 4px 14px; font-family: inherit; font-size: 13px; cursor: pointer;
    color: #6b5a42; background: #fffdf8; border: 1px solid rgba(139,105,20,.22); border-radius: 20px;
    transition: all .2s;
}
.hz-chip:hover { background: rgba(139,105,20,.08); border-color: rgba(139,105,20,.42); transform: translateY(-1px); }

/* 字形概览 */
.hz-tiles { display: flex; gap: 14px; flex-wrap: wrap; margin: 22px 0 4px; }
.hz-tile {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    min-width: 92px; padding: 16px 12px 12px; border-radius: 12px;
    background: #fffdf8; border: 1px solid rgba(139,105,20,.2); box-shadow: 0 4px 14px rgba(60,50,35,.05);
}
.hz-tile-char { font-family: 'Noto Serif SC','STSong','SimSun',serif; font-size: 46px; line-height: 1; color: #3a3025; }
.hz-tile-spell { font-size: 12.5px; color: var(--accent-gold); letter-spacing: .5px; text-align: center; }

/* 卡片网格 */
.hz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 18px; }
.hz-card {
    padding: 18px 18px 16px; border-radius: 12px; background: #fffdf8;
    border: 1px solid rgba(139,105,20,.18); box-shadow: 0 6px 18px rgba(60,50,35,.05);
}
.hz-card-title {
    font-family: var(--brand-title-font); font-size: 17px; font-weight: 400; letter-spacing: 2px;
    color: #3a3025; margin: 0 0 12px; padding-left: 12px; position: relative;
}
.hz-card-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 15px; border-radius: 2px; background: linear-gradient(180deg,#b83a2b,#8b6914); }
.hz-card-body { font-size: 13.5px; color: var(--text-secondary); line-height: 1.85; }

/* 行 */
.hz-row { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; border-bottom: 1px dashed rgba(139,105,20,.14); }
.hz-row:last-child { border-bottom: none; }
.hz-row-ch { flex: 0 0 auto; font-family: 'Noto Serif SC','STSong','SimSun',serif; font-size: 20px; color: #b83a2b; min-width: 1.2em; text-align: center; }
.hz-row-val { flex: 1; min-width: 0; color: #33302a; word-break: break-word; }
.hz-row-val b { color: #8b6914; font-weight: 700; }

/* 标签 */
.hz-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hz-tag {
    display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12.5px; letter-spacing: .5px;
    color: #6b5a42; background: rgba(139,105,20,.09); border: 1px solid rgba(139,105,20,.16);
}
.hz-tag-red { color: #922c21; background: rgba(184,58,43,.08); border-color: rgba(184,58,43,.18); }

/* 笔顺演示 */
.hz-draw-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hz-draw-box { min-width: 120px; min-height: 120px; }
.hz-draw-box svg { display: block; }

/* 状态 */
.hz-empty, .hz-err { padding: 40px 20px; text-align: center; font-size: 14px; color: var(--text-muted); }
.hz-err { color: #922c21; }
.hz-loading { padding: 30px 20px; text-align: center; font-size: 13.5px; color: var(--text-muted); }
.hz-muted { color: var(--text-muted); font-size: 12.5px; }

/* 小工具 */
.hz-tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.hz-tool-card .hz-card-body { font-size: 14px; }
.hz-name-form { display: flex; gap: 8px; flex-wrap: wrap; }
.hz-tip { font-size: 12.5px; color: var(--text-muted); margin: 10px 0 12px; }
.hz-tip b { color: #b83a2b; }
.hz-name-out, .hz-random-out { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; }
.hz-name-item {
    padding: 5px 14px; border-radius: 8px; font-family: var(--brand-title-font); font-size: 16px; letter-spacing: 2px;
    color: #3a3025; background: linear-gradient(160deg,#fbf6ec,#f4e9d6); border: 1px solid rgba(139,105,20,.2);
}
.hz-random-item {
    font-family: 'Noto Serif SC','STSong','SimSun',serif; font-size: 26px; cursor: pointer; line-height: 1;
    padding: 8px 12px; border-radius: 10px; color: #3a3025; background: #fffdf8;
    border: 1px solid rgba(139,105,20,.2); transition: all .2s;
}
.hz-random-item:hover { color: #b83a2b; border-color: rgba(184,58,43,.4); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(60,50,35,.1); }

@media (max-width: 640px) {
    .hz-grid { grid-template-columns: 1fr; }
    .hz-tile-char { font-size: 38px; }
    .hz-btn { padding: 10px 18px; }
}