.hidden { display: none; }

/* 五行颜色 */
.e-mu   { color: #2d8a2d; }
.e-huo  { color: var(--color-fire); }
.e-tu   { color: #8B4513; }
.e-jin  { color: #b8860b; }
.e-shui { color: #1a6fb5; }

/* 表单卡片 */
.card { background: var(--color-pan); border: 1px solid var(--color-brand); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.08); max-width: 720px; margin-left: 10px; }
.form-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; font-size: 13px; }
.form-row:last-child { margin-bottom: 0; }
.mob-row { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.mobile-actions-outside { display: none; }
.lbl { color: var(--color-brand); font-weight: 600; white-space: nowrap; min-width: 60px; }
.lbl-group { color: var(--color-brand); font-weight: 600; white-space: nowrap; }
.lbl-inline { min-width: auto; margin-left: 8px; }
.seeker-input { padding: 4px 8px; border: 1px solid var(--color-border); border-radius: 4px; font-size: 13px; }
.date-input { padding: 4px 6px; border: 1px solid var(--color-border); border-radius: 4px; font-size: 13px; text-align: center; }
.date-input.year { }
.date-input.dlr-birth-year { width: 90px; }

/* 表单专用 class */
.dlr-topic-input { width: 140px; }
.dlr-radio { font-size: 13px; }
.dlr-radio-gap { font-size: 13px; margin-left: 4px; }
.dlr-radio-rgap { margin-right: 2px; }
.dlr-group-gap { margin-left: 19px; }

.dlr-select { font-size: 13px; padding: 2px 6px; border: 1px solid var(--color-border); border-radius: 4px; }
.dlr-zty-label { font-size: 12px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.dlr-zty-select { display: none; font-size: 12px; padding: 2px 4px; border: 1px solid var(--color-border); border-radius: 4px; max-width: 150px; white-space: nowrap; }
.dlr-zty-select.visible { display: inline-block; }
.dlr-paipan-btn { background: var(--color-brand); color: #fff; border: none; }
.dlr-action-row { justify-content: space-between; }
.dlr-left-actions { display: inline-flex; align-items: center; gap: 6px; }
.dlr-right-actions { display: inline-flex; align-items: center; gap: 6px; }
.dlr-reset-mob { display: none; }
.dlr-info-row { font-size: 11px; }
.dlr-topic-muted { color: var(--color-text-muted); }
.dlr-keshi-gap { margin-left: 15px; }
.dlr-nav-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; justify-content: center; }

/* 结果卡片 */
.result-card { background: var(--color-pan); border: 1px solid var(--color-gold); border-radius: 8px; padding: 12px 16px; margin-top: 10px; margin-bottom: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.08); max-width: 720px; margin-left: 10px; }
#dlrNoteWrap { max-width: 720px; margin-left: 10px; }

/* 返回行（桌面隐藏，mob 显示） */
.dlr-back-row { display: none; padding: 0 0 8px; }
.dlr-back-actions { display: none; }

/* 桌面：结果始终可见 */
#daliurenResult.hidden { display: none; }

/* 信息表格 */
.qm-result-table { width: 100%; max-width: 620px; margin: 0 auto 8px; border-collapse: collapse; font-size: 13px; color: var(--color-text); border: 1px solid var(--color-border-warm); table-layout: fixed; background: #fff; }
.qm-result-table tr { border-bottom: none; }
.qm-result-table tr:last-child { border-bottom: none; }
.qm-result-table td, .qm-result-table th { padding: 2px 8px; vertical-align: middle; border-right: 1px solid var(--color-border-warm); border-bottom: 1px solid var(--color-border-warm); }
.qm-result-table td:last-child, .qm-result-table th:last-child { border-right: none; }
.qm-result-table tr:last-child td { border-bottom: none; }
.qm-result-table .qm-label { width: 50px; color: var(--color-gold); font-weight: 500; text-align: center; background: var(--color-parchment); white-space: nowrap; border-right: 1px solid var(--color-border-warm); }
.qm-result-table .qm-value { text-align: center; font-weight: 300; color: var(--color-text); }
.qm-result-table .qm-sublabel { background: transparent; font-weight: 500; color: var(--color-text-muted); text-align: center; font-size: 11px; }
.qm-result-table col.col-label { width: 50px; }


/* 干支双行 */
.gz-cell { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 0; }
.gz-cell .gan, .gz-cell .zhi { font-size: 13px; font-weight: 300; line-height: 1.2; }

/* 三传/四课/天地盘 */
.dlr-pan-border { position: relative; max-width: 620px; margin: 8px auto 0; border: 1px solid var(--color-border-warm); border-radius: 4px; background: #fff; padding: 14px 0 8px; height: var(--pan-height, auto); --s: 1; }
.dlr-shensha-wrap { display: none; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin: 3px 0; font-size: 13px; color: var(--color-text); line-height: 1.4; }
.dlr-shensha-wrap.visible { display: flex; }
.dlr-shensha-wrap .ss-item { white-space: nowrap; }
.dlr-shensha-wrap .ss-cat { flex-basis: 100%; margin-bottom: 2px; }
.dlr-shensha-wrap .ss-cat-label { font-weight: 700; color: var(--color-gold); margin-right: 4px; }
.dlr-keti-row { font-size: 11px; color: #777; padding-top: 2px; margin-top: 10px; text-align: center; }

/* ── 六亲标注 ── */
.dlr-tp-liuqin { width: calc(18px * var(--s, 1)); height: calc(14px * var(--s, 1)); font-size: calc(10px * var(--s, 1)); font-weight: 700; }
.dlr-lq-父 { color: #1a6fb5; }
.dlr-lq-兄 { color: #8B4513; }
.dlr-lq-子 { color: #2d8a2d; }
.dlr-lq-财 { color: #b8860b; }
.dlr-lq-官 { color: #cc0000; }

/* ── 长生标注 ── */
.dlr-tp-changsheng { width: calc(28px * var(--s, 1)); height: calc(14px * var(--s, 1)); font-size: calc(9px * var(--s, 1)); color: var(--color-text-muted); }

/* ── 开关按钮激活态 ── */
.dlr-nav-bar .btn.active { background: var(--color-gold); color: #fff; }

/* 盘面渲染颜色 class */
.dlr-rigan { color: #cc0000; }
.dlr-normal { color: var(--color-dark); }
.dlr-kong { color: var(--color-text-faint); }
.dlr-muted { color: var(--color-text); }
.dlr-green { color: green; }

/* 盘面绝对定位基类（天地盘专用） */
.dlr-abs { position: absolute; text-align: center; white-space: nowrap; left: var(--x); top: var(--y); }

/* ── 三传 flex 布局 ── */
.dlr-sc-rows { display: flex; flex-direction: column; gap: calc(8px * var(--s, 1)); }
.dlr-sc-row  { display: flex; align-items: center; justify-content: flex-start; gap: calc(4px * var(--s, 1)); }
.dlr-sc-row > span { flex-shrink: 0; text-align: center; }

.dlr-sc-liuqin    { height: calc(22px * var(--s, 1)); font-size: calc(14px * var(--s, 1) + var(--fs-boost, 0px)); font-weight: 300; white-space: nowrap; }
.dlr-sc-ganzhi    { height: calc(22px * var(--s, 1)); font-size: calc(16px * var(--s, 1) + var(--fs-boost, 0px)); white-space: nowrap; }
.dlr-sc-ganzhi .gan { font-weight: 300; }
.dlr-sc-ganzhi .zhi { font-weight: 700; }
.dlr-sc-tianjiang { height: calc(22px * var(--s, 1)); font-size: calc(16px * var(--s, 1) + var(--fs-boost, 0px)); font-weight: 300; white-space: nowrap; }
.dlr-sc-name      { height: calc(22px * var(--s, 1)); font-size: calc(12px * var(--s, 1) + var(--fs-boost, 0px)); font-weight: 300; white-space: nowrap; transform: translateY(2px); }

/* ── 四课 flex 布局 ── */
.dlr-sk-cols { display: flex; gap: calc(15px * var(--s, 1)); }
.dlr-sk-col  { display: flex; flex-direction: column; align-items: center; gap: 0; }
.dlr-sk-col > .dlr-sk-tianjiang { height: calc(22px * var(--s, 1)); font-size: calc(16px * var(--s, 1) + var(--fs-boost, 0px)); font-weight: 300; }
.dlr-sk-col > .dlr-sk-branch    { height: calc(22px * var(--s, 1)); font-size: calc(16px * var(--s, 1) + var(--fs-boost, 0px)); font-weight: 400; }
.dlr-sk-col > .dlr-sk-label     { height: calc(16px * var(--s, 1)); font-size: calc(10px * var(--s, 1) + var(--fs-boost, 0px)); font-weight: 300; }

/* ── 位置微调基础：transform 由 heng/shu 文件设变量 ── */
#dlrSike    { transform: translate(var(--sike-dx, 0px), var(--sike-dy, 0px)); }
#dlrSanchuan { transform: translate(var(--sc-dx, 0px), var(--sc-dy, 0px)); }
#dlrTiandi  { height: calc(194px * var(--s)); transform: translate(var(--tp-dx, 0px), var(--tp-dy, 0px)); }

/* ── 天地盘（保留绝对定位） ── */
.dlr-tp-dungan    { width: calc(28px * var(--s, 1)); height: calc(22px * var(--s, 1)); font-size: calc(14px * var(--s, 1) + var(--fs-boost, 0px)); font-weight: 300; }
.dlr-tp-tianjiang { width: calc(28px * var(--s, 1)); height: calc(22px * var(--s, 1)); font-size: calc(16px * var(--s, 1) + var(--fs-boost, 0px)); font-weight: 300; }
.dlr-tp-tianzhi   { width: calc(28px * var(--s, 1)); height: calc(22px * var(--s, 1)); font-size: calc(18px * var(--s, 1) + var(--fs-boost, 0px)); font-weight: 400; }


/* 登录弹窗（与 auth.css 保持一致） */
#auth-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 10000; align-items: center; justify-content: center; }
#auth-modal.active { display: flex; }
.auth-box { background: #fff; border-radius: 12px; max-width: calc(100vw - 32px); padding: 28px 28px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); position: relative; }
.auth-close { position: absolute; top: 14px; right: 16px; font-size: 22px; cursor: pointer; color: var(--color-text-faint); border: none; background: none; padding: 0; }
.auth-close:hover { color: var(--color-text); }
.auth-tabs { display: flex; border-bottom: 2px solid var(--color-border-light); margin-bottom: 20px; }
.auth-tab { flex: 1; text-align: center; padding: 8px 0; font-size: 14px; font-family: "MiSans", sans-serif; font-weight: 300; cursor: pointer; color: #bbb; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.auth-tab.active { color: #8B4513; border-bottom-color: #8B4513; }
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-sub-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-sub-tab { padding: 4px 14px; border-radius: 20px; font-size: 12px; font-family: "MiSans", sans-serif; font-weight: 300; cursor: pointer; color: var(--color-star-sub); border: 1px solid var(--color-border); background: none; transition: all .2s; }
.auth-sub-tab.active { background: #8B4513; color: #fff; border-color: #8B4513; }
.auth-form-group { margin-bottom: 12px; }
.auth-form-group input { width: 100%; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 6px; font-size: 14px; font-family: "MiSans", sans-serif; outline: none; box-sizing: border-box; }
.auth-form-group input:focus { border-color: #8B4513; }
.auth-code-row { display: flex; gap: 8px; align-items: center; }
.auth-code-row input { flex: 1; }
.auth-btn-code { flex-shrink: 0; white-space: nowrap; padding: 10px; background: #8B4513; color: #fff; border: none; border-radius: 6px; font-size: 12px; font-family: "MiSans", sans-serif; font-weight: 300; cursor: pointer; }
.auth-btn-code:disabled { opacity: .5; cursor: default; }
.auth-btn-submit { width: 100%; padding: 12px; background: linear-gradient(135deg,#8B4513,#8B4513); color: #fff; border: none; border-radius: 6px; font-size: 15px; font-family: "MiSans", sans-serif; font-weight: 300; cursor: pointer; margin-top: 4px; }
.auth-divider { text-align: center; color: var(--color-text-faint); font-size: 12px; margin: 14px 0 12px; }
.auth-btn-wechat { width: 100%; padding: 10px; background: var(--color-subtle); color: var(--color-text-faint); border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px; font-family: "MiSans", sans-serif; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* VIP 徽章按钮已统一到 common.css */

/* VIP 弹窗 */
/* ================================================================
   daliuren web 横版 — .dlr-pan-horizontal 激活
   ================================================================ */

.dlr-pan-horizontal { overflow: visible; --fs-boost: 2px; --pan-height: calc(247px * var(--s)); }

/* ── 三段统一 top:50% + translateY(-50%) 垂直居中 ── */
.dlr-pan-horizontal #dlrTiandi  { position: absolute; left: calc(-65px * var(--s)); top: 50%; --tp-dx: 68px; --tp-dy: -50%; }
.dlr-pan-horizontal #dlrSike    { position: absolute; left: calc(254px * var(--s) + var(--sike-offx, 0px)); top: 50%; --sike-dy: calc(-50% + 5px); }
.dlr-pan-horizontal #dlrSanchuan { position: absolute; left: calc(414px * var(--s) + var(--sc-offx, 0px)); top: 50%; --sc-dy: -50%; }

/* ── 水平微调 ── */
.dlr-pan-horizontal #dlrSike    { --sike-offx: 43px; }
.dlr-pan-horizontal #dlrSanchuan { --sc-offx: 35px; }
/* ================================================================
   daliuren web 竖版 — .dlr-pan-vertical 激活
   ================================================================ */

.dlr-pan-vertical { overflow: hidden; --fs-boost: 4px; --pan-height: calc(530px * var(--s)); }

/* ── 三段统一左右居中 ── */
.dlr-pan-vertical #dlrSanchuan { position: absolute; left: 50%; top: calc(50% - 210px); --sc-dx: -50%; --sc-dy: 0px; }
.dlr-pan-vertical #dlrSanchuan .dlr-sc-rows { align-items: center; }
.dlr-pan-vertical #dlrSike    { position: absolute; left: 50%; top: calc(50% - 98px);  --sike-dx: -50%; --sike-dy: 0px; }
.dlr-pan-vertical #dlrTiandi  { --tp-dx: 0px; --tp-dy: 90px; }
