/* =====================================================================
 * 37 婚帖称谓核对 · VERTICAL INVITE
 * 独立设计：墨黑 + 烫金；首屏右半是一张竖排请柬（writing-mode: vertical-rl），
 * 抬头、敬语、落款逐列呈现；左侧为暗色速录台，结果为结构清单。
 * ===================================================================== */
.wit {
    --ag-bg: #f5f3ee;
    --ag-bg2: #eae6dc;
    --ag-surface: #fffdf7;
    --ag-surface2: #faf7ef;
    --ag-ink: #26231f;
    --ag-ink2: #5b544a;
    --ag-muted: #938b7c;
    --ag-line: #e4dfd2;
    --ag-line2: #d0c6af;
    --ag-accent: #8a6a24;
    --ag-accent2: #9c3a34;
    --ag-on: #ffffff;
    --ag-ok: #2a7357;
    --ag-okbg: #e4f2ea;
    --ag-warn: #9a6416;
    --ag-warnbg: #fbefd6;
    --ag-bad: #b34b48;
    --ag-badbg: #fbe9e6;
    --ag-info: #8a6a24;
    --ag-infobg: #f7f0dc;
    --ag-r: 3px;
    --ag-shadow: 0 3px 0 rgba(38, 35, 31, .05), 0 14px 32px rgba(38, 35, 31, .1);
    --ag-h: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
    --ag-b: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --ag-m: "JetBrains Mono", Consolas, monospace;
}
:root[data-theme="dark"] .wit {
    --ag-bg: #161411;
    --ag-bg2: #201d17;
    --ag-surface: #1f1c17;
    --ag-surface2: #28241c;
    --ag-ink: #f2ecdf;
    --ag-ink2: #c9bfab;
    --ag-muted: #948a76;
    --ag-line: #343026;
    --ag-line2: #463f30;
    --ag-accent: #dfbd70;
    --ag-accent2: #e89186;
    --ag-on: #14120e;
    --ag-ok: #7fd0a7;
    --ag-okbg: #173529;
    --ag-warn: #e5bd73;
    --ag-warnbg: #382c17;
    --ag-bad: #ef9a90;
    --ag-badbg: #3a2220;
    --ag-info: #dfbd70;
    --ag-infobg: #2c2718;
    --ag-shadow: 0 12px 34px rgba(0, 0, 0, .44);
}
.wit { background: var(--ag-bg) radial-gradient(700px 300px at 88% -2%, rgba(138, 106, 36, .08), transparent 70%) no-repeat; }
.wit h1, .wit h2, .wit h3 { font-family: var(--ag-h); letter-spacing: .03em; }
.wit input, .wit select, .wit textarea {
    width: 100%; background: var(--ag-surface2); color: var(--ag-ink);
    border: 1px solid var(--ag-line2); border-radius: 2px; padding: 8px 10px;
    font-size: 13px; line-height: 1.65; outline: none;
}
.wit input:focus, .wit select:focus, .wit textarea:focus { border-color: var(--ag-accent); box-shadow: inset 0 -2px 0 var(--ag-accent); }
.wit textarea { resize: vertical; font-family: var(--ag-m); font-size: 12.5px; }
.wit label { display: block; font-size: 11.5px; font-weight: 650; color: var(--ag-ink2); margin-bottom: 4px; }
.wit code { background: var(--ag-bg2); color: var(--ag-accent); }

/* ---------- 首屏 ---------- */
.wit-hero { display: grid; grid-template-columns: 1.02fr .98fr; background: var(--ag-surface); border: 1px solid var(--ag-line2); box-shadow: var(--ag-shadow); }
.wit-desk { padding: 30px 28px 24px; background: #1f1d1a; color: #f4eddd; }
:root[data-theme="dark"] .wit-desk { background: #141210; }
.wit-kicker { display: inline-block; font-family: var(--ag-m); font-size: 10px; letter-spacing: .18em; color: #dfbd70; border-bottom: 1px solid #dfbd70; padding-bottom: 4px; margin-bottom: 16px; }
/* 显式覆盖站内全局 h1 颜色，墨黑速录台上必须保持浅色字 */
.wit-desk h1, .wit-desk h2, .wit-desk h3 { color: #f4eddd; }
.wit-hero h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.28; margin-bottom: 12px; color: #f4eddd; }
.wit-lede { font-size: 13.5px; line-height: 2; color: #cfc5b0; }
.wit-lede b { color: #dfbd70; font-weight: 750; }
.wit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.wit-fields label { color: #bdb29a; }
.wit-fields input, .wit-fields select { background: rgba(255, 255, 255, .07); border-color: rgba(223, 189, 112, .3); color: #f7f1e3; }
.wit-fields input:focus, .wit-fields select:focus { border-color: #dfbd70; box-shadow: inset 0 -2px 0 #dfbd70; }
.wit-fields input::placeholder { color: #8c826d; }
.wit-switches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.wit-switches .ag-check { background: transparent; border-color: rgba(223, 189, 112, .35); color: #cfc5b0; }
.wit-switches .ag-check.is-on { background: rgba(223, 189, 112, .16); border-color: #dfbd70; color: #f7f1e3; }
.wit-quick-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.wit-desk-note { font-size: 11.5px; line-height: 1.8; color: #a79c85; margin: 14px 0 0; padding-top: 11px; border-top: 1px dashed rgba(223, 189, 112, .3); }

.wit-invite { padding: 24px 24px 18px; background: #f7f2e5; border-left: 5px solid #b8994c; }
:root[data-theme="dark"] .wit-invite { background: #221f18; }
.wit-invite-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--ag-line2); padding-bottom: 9px; }
.wit-invite-hd b { font-size: 16px; }
.wit-invite-hd span { font-family: var(--ag-m); font-size: 11px; color: var(--ag-accent2); font-weight: 700; }
.wit-paper { position: relative; display: flex; flex-direction: row-reverse; justify-content: center; gap: 18px; min-height: 232px; margin: 16px 0 12px; padding: 20px 18px; background: var(--ag-surface); border: 1px solid #c9b579; outline: 1px solid #c9b579; outline-offset: 5px; }
.wit-col { writing-mode: vertical-rl; text-orientation: upright; font-family: var(--ag-h); font-size: 15px; line-height: 2.1; letter-spacing: .16em; color: #2b2720; white-space: nowrap; }
:root[data-theme="dark"] .wit-col { color: #eee5d2; }
.wit-col.main { font-size: 18px; color: #8a6a24; }
:root[data-theme="dark"] .wit-col.main { color: #dfbd70; }
.wit-col.small { font-size: 12px; color: #7c7362; }
.wit-seal { position: absolute; right: 14px; bottom: 12px; width: 38px; height: 38px; border: 2px solid var(--ag-accent2); color: var(--ag-accent2); border-radius: 3px; display: grid; place-items: center; font-family: var(--ag-h); font-size: 14px; transform: rotate(-6deg); opacity: .82; }
.wit-invite-foot { font-size: 11px; line-height: 1.8; color: var(--ag-muted); }
.wit-art { display: block; width: 100%; max-width: 230px; height: auto; margin: 8px auto 0; opacity: .8; }

/* ---------- 按钮 ---------- */
.wit-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border: 1px solid transparent; border-radius: 2px; font-size: 13px; font-weight: 750; transition: transform .13s, box-shadow .13s, background .13s; }
.wit-btn:hover { transform: translateY(-1px); }
.wit-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.wit-btn-main { background: #dfbd70; color: #1f1d1a; box-shadow: 0 5px 14px rgba(184, 153, 76, .26); }
.wit-btn-ghost { background: transparent; border-color: rgba(223, 189, 112, .5); color: #f4eddd; }
.wit-btn-soft { background: var(--ag-infobg); color: var(--ag-accent); border-color: var(--ag-line2); }
.wit-btn-line { background: transparent; color: var(--ag-ink2); border-color: var(--ag-line2); }
.wit-btn-line:hover { border-color: var(--ag-accent); color: var(--ag-accent); }
.wit-btn-mini { padding: 4px 10px; font-size: 11.5px; }

/* ---------- 核对项 / 区块 ---------- */
.wit-sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 42px 0 16px; }
.wit-sec-hd h2 { font-size: 21px; display: flex; align-items: center; gap: 11px; }
.wit-sec-hd h2 i { font-family: var(--ag-m); font-style: normal; font-size: 10.5px; color: #fff; background: var(--ag-accent); padding: 3px 8px; border-radius: 2px; }
.wit-sec-hd span { font-size: 12px; color: var(--ag-muted); }
.wit-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.wit-check { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; background: var(--ag-surface); border: 1px solid var(--ag-line); border-left: 3px solid var(--ag-line2); cursor: pointer; }
.wit-check input { width: 15px; height: 15px; flex: none; margin-top: 3px; accent-color: var(--ag-accent); }
.wit-check b { display: block; font-size: 13px; }
.wit-check small { display: block; font-size: 11px; color: var(--ag-muted); line-height: 1.65; margin-top: 2px; }
.wit-check.is-on { border-left-color: var(--ag-ok); background: var(--ag-okbg); }
.wit-err { margin-top: 12px; padding: 10px 13px; background: var(--ag-badbg); color: var(--ag-bad); font-size: 12.5px; }
.wit-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }

/* ---------- 结果 ---------- */
.wit-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.wit-stat { background: var(--ag-surface); border: 1px solid var(--ag-line2); border-bottom: 3px solid var(--ag-accent); padding: 12px 15px; }
.wit-stat small { display: block; font-size: 11px; color: var(--ag-muted); }
.wit-stat b { display: block; font-family: var(--ag-m); font-size: 18px; line-height: 1.55; }
.wit-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wit-panel { background: var(--ag-surface); border: 1px solid var(--ag-line); padding: 18px 20px; min-width: 0; }
.wit-panel-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--ag-line); padding-bottom: 9px; margin-bottom: 12px; }
.wit-panel-hd h3 { font-size: 16px; }
.wit-panel-hd span { font-size: 11px; color: var(--ag-muted); }
.wit-structure { display: grid; gap: 9px; }
.wit-line { padding: 10px 12px; border-left: 3px solid var(--ag-line2); background: var(--ag-surface2); font-size: 12.8px; line-height: 1.9; }
.wit-line b { color: var(--ag-accent); }
.wit-line.title { border-left-color: var(--ag-accent); font-family: var(--ag-h); font-size: 15px; letter-spacing: .06em; }
.wit-notes { display: grid; gap: 8px; font-size: 12.5px; line-height: 1.85; color: var(--ag-ink2); }
.wit-notes > div { padding: 9px 11px; border-left: 3px solid var(--ag-line2); background: var(--ag-surface2); }
.wit-notes > div.ok { border-left-color: var(--ag-ok); background: var(--ag-okbg); }
.wit-notes > div.no { border-left-color: var(--ag-bad); background: var(--ag-badbg); }
.wit-scroll { overflow-x: auto; margin-top: 16px; }
.wit-table { width: 100%; min-width: 720px; font-size: 12.5px; }
.wit-table th { text-align: left; background: var(--ag-bg2); color: var(--ag-ink2); font-size: 11px; padding: 8px 10px; border-bottom: 2px solid var(--ag-line2); white-space: nowrap; }
.wit-table td { padding: 8px 10px; border-bottom: 1px dotted var(--ag-line); line-height: 1.7; }
.wit-clean { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; font-size: 11.5px; }
.wit-clean > b { color: var(--ag-ink2); }
.wit-clean #witPreview { flex: 1 1 100%; font-family: var(--ag-m); font-size: 11px; color: var(--ag-muted); background: var(--ag-surface2); border-left: 2px solid var(--ag-accent2); padding: 6px 9px; overflow-wrap: anywhere; white-space: normal; }
.wit-panel > label { font-size: 12px; margin-bottom: 8px; line-height: 1.8; }
.wg4-read { margin-top: 46px; padding: 26px 28px; background: var(--ag-surface); border: 1px solid var(--ag-line2); border-top: 4px solid var(--ag-accent); }
.wg4-read h2 { font-size: 21px; margin-bottom: 16px; }
.wg4-read p { font-size: 14px; line-height: 2.05; color: var(--ag-ink2); margin-bottom: 14px; }
.wg4-read p:last-child { margin-bottom: 0; }
.wg4-read b { color: var(--ag-accent); }

@media (max-width: 1080px) {
    .wit-hero { grid-template-columns: 1fr; }
    .wit-invite { border-left: 0; border-top: 5px solid #b8994c; }
    .wit-art { display: none; }
    .wit-checks { grid-template-columns: repeat(2, 1fr); }
    .wit-result-grid { grid-template-columns: 1fr; }
    .wit-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .wit-desk, .wit-invite { padding: 22px 16px; }
    .wit-fields { grid-template-columns: 1fr; }
    .wit-checks { grid-template-columns: 1fr; }
    .wit-paper { gap: 10px; padding: 16px 10px; }
    .wit-col { font-size: 13px; }
    .wit-col.main { font-size: 15px; }
    .wg4-read { padding: 20px 18px; }
}
