/* ===== 风水模块专属样式（geomancy.css） ===== */
/* 全部门派页面统一使用网站主红色，与八字模块保持一致 */
.page-sanhe, .page-tianxing, .page-bazhai, .page-xuanxing, .page-dagua, .page-home {
    --gm-primary: #eb1313; --gm-dark: #c40e0e; --gm-light: #feeeee;
}

/* ===== 风水门派导航（两列网格，与八字侧栏tool-grid一致） ===== */
.gm-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gm-nav a {
    display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px;
    border: 1px solid var(--border-color); background: var(--bg-light);
    text-decoration: none; font-size: 0.78rem; color: var(--text-secondary);
    transition: all .15s;
}
.gm-nav a:hover { border-color: var(--sun-red); color: var(--sun-red); background: #fff; }
.gm-nav a.active {
    background: var(--sun-red); color: #fff;
    font-weight: 600; border-color: var(--sun-red-dark);
}

/* ===== 风水首页（门派卡片） ===== */
.gm-school-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.gm-school-card {
    background: #fff; border-radius: 12px; padding: 20px 24px;
    border: 1px solid #eee; border-left: 4px solid var(--gm-primary, #eb1313);
    box-shadow: 0 1px 3px rgba(0,0,0,.04); transition: all .25s;
    display: flex; gap: 16px; align-items: flex-start;
}
.gm-school-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); border-left-width: 6px; transform: translateY(-1px); }
.gm-school-icon { font-size: 36px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.gm-school-content { flex: 1; min-width: 0; }
.gm-school-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.gm-school-name { font-size: 18px; font-weight: 700; color: #222; }
.gm-school-sub { font-size: 13px; color: #888; background: #f5f5f5; padding: 2px 10px; border-radius: 10px; }
.gm-school-desc { font-size: 14px; color: #555; line-height: 1.8; margin-bottom: 10px; }
.gm-school-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.gm-school-tag { font-size: 12px; padding: 3px 10px; border-radius: 10px; background: #f0f0f0; color: #666; }
.gm-school-tag.gm-ji { background: #e8f5e9; color: #2e7d32; }
.gm-school-tag.gm-info { background: var(--sun-red-light, #feeeee); color: var(--sun-red, #eb1313); }
.gm-school-tag.gm-warn { background: #fff3e0; color: #e65100; }
.gm-school-btn {
    display: inline-block; padding: 7px 20px; border-radius: 8px;
    font-size: 14px; font-weight: 600; text-decoration: none; color: #fff;
    background: var(--sun-red, #eb1313); transition: all .2s;
}
.gm-school-btn:hover { background: var(--sun-red-dark, #c40e0e); transform: translateY(-1px); }
.gm-intro-banner {
    background: #EFE6D6;
    border-radius: 16px; padding: 24px 28px; margin-bottom: 20px; border: none; color: #fff;
    position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(60,26,16,.18);
}
/* 背景底图：与 master / 子页统一，用标准「青阳阁 100px 横幅」铺满（不再用 ge-hero-home 窄切片）。
   banner-qyg-100.jpg 左 40% 深墨远山承托白字、右侧青阳阁主景，cover 任意宽度都铺满不留白。 */
.xb-banner.gm-intro-banner::before {
    background-image: url(/brand/banner-qyg-100.jpg);
    background-size: cover;
    background-position: center center;
}
/* 左侧深色渐变遮罩：承托白色标题/正文（覆盖装饰圆点，保证可读性，对齐全站 .xb-banner::after） */
.gm-intro-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(90deg,
        rgba(70, 26, 16, 0.78) 0%,
        rgba(70, 26, 16, 0.52) 34%,
        rgba(70, 26, 16, 0.16) 58%,
        rgba(70, 26, 16, 0) 78%);
}
.gm-intro-banner h2 { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; position: relative; }
.gm-intro-banner p { font-size: 14px; color: #ffe9e9; line-height: 1.8; margin: 0; position: relative; max-width: 880px; }

/* ===== 砂方位选择网格（三合/天星共用） ===== */
.feng-sand-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.feng-sand-item { text-align: center; padding: 4px 2px; border: 1px solid #e0e0e0; border-radius: 4px; cursor: pointer; font-size: 11px; transition: all .15s; user-select: none; }
.feng-sand-item:hover { border-color: var(--gm-primary, #eb1313); background: var(--gm-light, #fff5f5); }
.feng-sand-item.selected { background: var(--gm-light, #fdeeee); border-color: var(--gm-primary, #eb1313); color: var(--gm-primary, #eb1313); font-weight: 600; }

/* ===== 风水结果区 ===== */
.feng-result .feng-desc { font-size: 14px; line-height: 1.8; background: #fafafa; padding: 14px; border-radius: 8px; margin-bottom: 10px; border-left: 3px solid var(--gm-primary, #eb1313); }
.feng-result .feng-desc.bad { border-left-color: #e65100; background: #fff8e1; }
.feng-result h3 { font-size: 15px; font-weight: 600; color: #555; margin: 16px 0 8px; }
.feng-tag { font-size: 12px; padding: 3px 10px; border-radius: 12px; display: inline-block; margin: 2px 4px; }
.feng-tag.ok { background: #e8f5e9; color: #388e3c; }
.feng-tag.warn { background: #fff3e0; color: #e65100; }
.feng-grid4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 10px 0; }
.feng-grid4 .card { background: #fafafa; padding: 12px; border-radius: 8px; text-align: center; }
.feng-grid4 .card .v { font-size: 16px; font-weight: 700; }
.feng-grid4 .card .l { font-size: 11px; color: #888; margin-top: 4px; }
.feng-sand-results { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.feng-s-r { padding: 10px; border-radius: 8px; font-size: 13px; text-align: center; }
.feng-s-r.ji { background: #e8f5e9; border: 1px solid #c8e6c9; }
.feng-s-r.xiong { background: #ffebee; border: 1px solid #f8bbd0; }
.feng-s-r .r { font-size: 18px; font-weight: 700; }

/* ===== 报告区块通用样式（所有门派共用） ===== */
.gm-section { margin-bottom: 24px; }
.gm-section-title {
    font-size: 16px; font-weight: 700; color: #333;
    margin: 0 0 12px; padding: 8px 14px;
    background: linear-gradient(90deg, var(--gm-light, #fff5f5), #fff);
    border-left: 4px solid var(--gm-primary, #eb1313);
    border-radius: 0 6px 6px 0;
    display: flex; align-items: center; gap: 8px;
}
.gm-section-icon { font-size: 18px; }

/* ===== 通用卡片 ===== */
.gm-card {
    background: #fff; border-radius: 10px; padding: 14px 16px;
    border: 1px solid #eee; border-left: 4px solid #888;
    margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
    transition: all .2s;
}
.gm-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.gm-card.gm-ji { border-left-color: #43a047; background: linear-gradient(90deg, #f1f8e9 0%, #fff 30%); }
.gm-card.gm-xiong { border-left-color: #e53935; background: linear-gradient(90deg, #ffebee 0%, #fff 30%); }
.gm-card.gm-ping { border-left-color: #fb8c00; background: linear-gradient(90deg, #fff8e1 0%, #fff 30%); }
.gm-card.gm-info { border-left-color: var(--gm-primary, #eb1313); background: linear-gradient(90deg, var(--gm-light, #feeeee) 0%, #fff 30%); }
.gm-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.gm-card-tag { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 12px; background: #f5f5f5; color: #555; }
.gm-card.gm-ji .gm-card-tag { background: #c8e6c9; color: #2e7d32; }
.gm-card.gm-xiong .gm-card-tag { background: #ffcdd2; color: #c62828; }
.gm-card.gm-ping .gm-card-tag { background: #ffe0b2; color: #e65100; }
.gm-card.gm-info .gm-card-tag { background: var(--gm-light, #bbdefb); color: var(--gm-primary, #eb1313); }
.gm-card-title { font-size: 15px; font-weight: 600; color: #222; }
.gm-card-meta { font-size: 12px; color: #888; background: #f8f8f8; padding: 2px 8px; border-radius: 10px; }
.gm-card-body { font-size: 14px; color: #444; line-height: 1.7; margin-top: 4px; }
.gm-card-detail { font-size: 13px; color: #666; line-height: 1.7; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #eee; }
.gm-source { font-size: 11px; color: #999; margin-top: 8px; padding-top: 6px; border-top: 1px dotted #eee; font-style: italic; }

/* ===== 水法/砂法卡片 ===== */
.gm-water-list, .gm-sand-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.gm-water-card, .gm-sand-card {
    background: #fff; border-radius: 10px; padding: 14px 16px;
    border: 1px solid #eee; border-left: 4px solid #888; transition: all .2s;
}
.gm-water-card:hover, .gm-sand-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.gm-water-card.gm-ji, .gm-sand-card.gm-ji { border-left-color: #43a047; background: linear-gradient(90deg, #f1f8e9 0%, #fff 40%); }
.gm-water-card.gm-xiong, .gm-sand-card.gm-xiong { border-left-color: #e53935; background: linear-gradient(90deg, #ffebee 0%, #fff 40%); }
.gm-water-card.gm-ping, .gm-sand-card.gm-ping { border-left-color: #fb8c00; background: linear-gradient(90deg, #fff8e1 0%, #fff 40%); }
.gm-water-head, .gm-sand-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dashed #eee; }
.gm-water-name, .gm-sand-name { font-size: 16px; font-weight: 700; color: #222; }

/* ===== 古文/今解样式 ===== */
.gm-ancient {
    font-size: 13px; line-height: 1.9; color: #5d4037;
    background: #fdf6f0; padding: 10px 12px; border-radius: 6px;
    margin-bottom: 8px; border-left: 3px solid #d7ccc8;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
}
.gm-modern {
    font-size: 13px; line-height: 1.8; color: #333;
    background: #f5f9ff; padding: 10px 12px; border-radius: 6px;
    margin-bottom: 8px; border-left: 3px solid #90caf9;
}
.gm-sand-tips { font-size: 12px; color: #666; padding: 6px 10px; background: #fffbe6; border-radius: 6px; margin-bottom: 6px; border-left: 2px solid #ffd54f; }
.gm-kai { font-family: "STKaiti", "KaiTi", serif; background: #fdf6ec; color: #8d6e63; padding: 8px 12px; border-radius: 6px; line-height: 1.8; }

/* ===== 八宅专属：九宫格 ===== */
.gm-bazhai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gm-bazhai-item {
    background: #fff; border-radius: 8px; padding: 10px;
    border: 1px solid #eee; border-top: 3px solid #888; text-align: center;
}
.gm-bazhai-item.gm-ji { border-top-color: #43a047; background: #f1f8e9; }
.gm-bazhai-item.gm-xiong { border-top-color: #e53935; background: #ffebee; }
.gm-bazhai-item.gm-center { border-top-color: var(--gm-primary, #eb1313); background: var(--gm-light, #feeeee); }
.gm-bazhai-item .star { font-size: 15px; font-weight: 700; color: #222; }
.gm-bazhai-item .fang { font-size: 12px; color: #666; margin-top: 2px; }
.gm-bazhai-item .gi { font-size: 12px; font-weight: 700; margin-top: 4px; }
.gm-bazhai-item.gm-ji .gi { color: #2e7d32; }
.gm-bazhai-item.gm-xiong .gi { color: #c62828; }
.gm-bazhai-item .desc { font-size: 11px; color: #888; margin-top: 6px; line-height: 1.5; text-align: left; }

/* ===== 玄空飞星专属：九宫飞星盘 ===== */
.gm-luopan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 520px; margin: 0 auto; }
.gm-luopan-cell {
    background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 10px 6px; text-align: center; min-height: 82px;
}
.gm-luopan-cell.gm-ji { background: #f1f8e9; border-color: #c8e6c9; }
.gm-luopan-cell.gm-xiong { background: #ffebee; border-color: #f8bbd0; }
.gm-luopan-cell.gm-ping { background: #fff8e1; border-color: #ffecb3; }
.gm-luopan-cell.gm-center { background: var(--gm-light, #feeeee); border-color: #e1bee7; }
.gm-luopan-cell .gong { font-size: 13px; font-weight: 700; color: var(--gm-primary, #eb1313); }
.gm-luopan-cell .gong-dir { font-size: 10px; color: #999; }
.gm-luopan-cell .stars { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.gm-luopan-cell .stars span { font-size: 14px; font-weight: 700; }
.gm-luopan-cell .stars .yun { color: #666; }
.gm-luopan-cell .stars .shan { color: #1565c0; }
.gm-luopan-cell .stars .xiang { color: #c62828; }
.gm-luopan-cell .gi-badge { font-size: 10px; font-weight: 700; margin-top: 4px; }
.gm-luopan-cell.gm-ji .gi-badge { color: #2e7d32; }
.gm-luopan-cell.gm-xiong .gi-badge { color: #c62828; }
.gm-luopan-cell.gm-ping .gi-badge { color: #e65100; }
.gm-legend { display: flex; justify-content: center; gap: 16px; margin-top: 10px; font-size: 12px; color: #666; }
.gm-legend .yun { color: #666; }
.gm-legend .shan { color: #1565c0; }
.gm-legend .xiang { color: #c62828; }
/* 八卦论断表 */
.gm-bagua-judge { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 760px; margin: 0 auto; }
.gm-bagua-judge .cell {
    background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 10px 8px;
    border-top: 3px solid #888; text-align: center; min-height: 96px;
}
.gm-bagua-judge .cell.gm-ji { border-top-color: #43a047; background: #f1f8e9; }
.gm-bagua-judge .cell.gm-xiong { border-top-color: #e53935; background: #ffebee; }
.gm-bagua-judge .cell.gm-ping { border-top-color: #fb8c00; background: #fff8e1; }
.gm-bagua-judge .cell.gm-center { border-top-color: var(--gm-primary, #eb1313); background: var(--gm-light, #feeeee); }
.gm-bagua-judge .cell .gong { font-size: 16px; font-weight: 700; color: #222; }
.gm-bagua-judge .cell .dir { font-size: 11px; color: #999; margin-top: 1px; }
.gm-bagua-judge .cell .gi { font-size: 12px; font-weight: 700; margin-top: 3px; }
.gm-bagua-judge .cell.gm-ji .gi { color: #2e7d32; }
.gm-bagua-judge .cell.gm-xiong .gi { color: #c62828; }
.gm-bagua-judge .cell.gm-ping .gi { color: #e65100; }
.gm-bagua-judge .cell.gm-center .gi { color: var(--gm-primary, #eb1313); }
.gm-bagua-judge .cell .stars { font-size: 12px; color: #555; margin-top: 4px; font-weight: 600; }
.gm-bagua-judge .cell .desc { font-size: 11px; color: #666; margin-top: 5px; line-height: 1.5; text-align: left; }

/* ===== 玄空大卦专属样式 ===== */
/* 卦信息卡片 */
.gm-gua-row { display: flex; gap: 10px; flex-wrap: wrap; }
.gm-gua-item {
    flex: 1; min-width: 200px; background: #fafafa; border-radius: 8px; padding: 12px;
    border: 1px solid #eee; border-top: 3px solid var(--gm-primary, #eb1313); text-align: center;
}
.gm-gua-item.gm-ji { border-top-color: #43a047; background: #f1f8e9; }
.gm-gua-item.gm-xiong { border-top-color: #e53935; background: #ffebee; }
.gm-gua-item.gm-ping { border-top-color: #fb8c00; background: #fff8e1; }
.gm-gua-item .gua-name { font-size: 18px; font-weight: 700; color: #222; }
.gm-gua-item .gua-meta { font-size: 12px; color: #666; margin-top: 4px; line-height: 1.6; }
.gm-gua-item .gi { font-size: 12px; font-weight: 700; margin-top: 6px; }
.gm-gua-item.gm-ji .gi { color: #2e7d32; }
.gm-gua-item.gm-xiong .gi { color: #c62828; }
.gm-gua-item.gm-ping .gi { color: #e65100; }
.gua-symbol { font-size: 30px; line-height: 1.15; color: var(--gm-primary, #eb1313); margin-top: 2px; }

/* 元运走势·热度图 */
.gm-heat { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.gm-heat-col { flex: 1; min-width: 60px; max-width: 84px; text-align: center; }
.gm-heat-yun { font-size: 13px; font-weight: 700; color: #555; padding: 3px 0; }
.gm-heat-tag { font-size: 10px; color: var(--gm-primary, #eb1313); background: var(--gm-light, #feeeee); border: 1px solid #e8d9b0; border-radius: 8px; padding: 0 4px; margin-left: 2px; font-weight: 600; white-space: nowrap; }
.gm-heat-years { font-size: 10px; color: #999; padding-bottom: 5px; }
.gm-heat-cell { border-radius: 6px; padding: 6px 2px; margin-bottom: 5px; font-size: 12px; font-weight: 700; color: #fff; line-height: 1.5; min-height: 46px; display: flex; flex-direction: column; justify-content: center; }
.gm-heat-cell .tag { font-size: 10px; font-weight: 400; opacity: .88; }
.gm-heat-cell.gm-ji { background: linear-gradient(180deg, #43a047, #2e7d32); }
.gm-heat-cell.gm-xiong { background: linear-gradient(180deg, #e53935, #c62828); }
.gm-heat-cell.gm-ping { background: linear-gradient(180deg, #fb8c00, #ef6c00); }
.gm-heat-cell.gm-cur { outline: 2px solid var(--gm-primary, #eb1313); outline-offset: 1px; }
.gm-heat-col.gm-cur { position: relative; }
.gm-heat-col.gm-cur::before { content: ''; position: absolute; top: -4px; bottom: -4px; left: 50%; width: 0; border-left: 2px dashed var(--gm-primary, #eb1313); z-index: 2; }
.gm-heat-col.gm-cur::after { content: '\25BC 现在'; position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--gm-primary, #eb1313); font-weight: 700; white-space: nowrap; z-index: 2; }
.gm-heat-legend { display: flex; gap: 14px; justify-content: center; margin-top: 10px; font-size: 12px; color: #666; flex-wrap: wrap; }
.gm-heat-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* 生克合冲·四象限总图 */
.gm-quad-wrap { position: relative; max-width: 700px; margin: 8px auto 0; padding: 6px; }
.gm-quad-lines { position: absolute; left: 50%; top: 50%; width: 100%; height: 1px; background: #eadfc6; transform: translate(-50%, -50%); pointer-events: none; }
.gm-quad-lines::after { content: ''; position: absolute; left: 50%; top: 50%; width: 1px; height: 100%; background: #eadfc6; transform: translate(-50%, -50%); }
.gm-quad { display: grid; grid-template-columns: 1fr 138px 1fr; grid-template-rows: auto 138px auto; gap: 8px; position: relative; z-index: 1; }
.gm-quad-card { border-radius: 10px; padding: 8px 10px; text-align: center; border: 1px solid #eee; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.05); display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.gm-quad-card .lbl { font-size: 11px; color: #999; }
.gm-quad-card .gua { font-size: 13px; font-weight: 700; color: #222; }
.gm-quad-card .sym { font-size: 20px; color: var(--gm-primary, #eb1313); line-height: 1.2; }
.gm-quad-card.gm-q-g1 { border-top: 3px solid #43a047; background: #f1f8e9; }
.gm-quad-card.gm-q-g2 { border-top: 3px solid #e53935; background: #ffebee; }
.gm-quad-card.gm-q-g3 { border-top: 3px solid #fb8c00; background: #fff8e1; }
.gm-quad-center { border-radius: 50%; border: none; color: #fff; background: radial-gradient(circle at 30% 30%, #ff6b6b, #eb1313 60%, #c40e0e); }
.gm-quad-center .lbl { color: rgba(255,255,255,.85); }
.gm-quad-center .gua { color: #fff; font-size: 14px; }
.gm-quad-center .sym { color: #fff; font-size: 22px; }
.gm-rel { display: inline-block; margin-top: 3px; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #fff; }
.gm-rel.g-in { background: #2e7d32; }
.gm-rel.g-out { background: #9e9e9e; }
.gm-rel.g-ke { background: #c62828; animation: gm-flash 1.1s ease-in-out infinite; }
.gm-rel.g-ping { background: #ef6c00; }
@keyframes gm-flash { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* 抽爻换象 */
.gm-cy-box { background: #fafafa; border-radius: 8px; padding: 12px; border: 1px dashed #e8d9b0; }
.gm-cy-box .cy-num { font-size: 20px; font-weight: 700; color: var(--gm-primary, #eb1313); }
.gm-cy-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.gm-cy-cell { flex: 1; min-width: 220px; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 8px 10px; font-size: 12px; color: #555; }
.gm-cy-cell .sum { font-size: 15px; font-weight: 700; color: var(--gm-primary, #eb1313); }
.gm-cy-cell .rel { font-weight: 700; margin-top: 3px; }
.gm-ji-text { color: #2e7d32; font-weight: 700; }
.gm-xiong-text { color: #c62828; font-weight: 700; }
.gm-ping-text { color: #e65100; font-weight: 700; }

/* 综合论断·星级 */
.gm-star { font-size: 28px; color: #f5b83d; letter-spacing: 3px; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.08); }
.gm-star .gm-star-empty { color: #e0d8c8; }
.gm-items { margin-top: 12px; }
.gm-item { display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; border: 1px solid #eee; background: #fafafa; }
.gm-item .ic { font-size: 16px; width: 20px; text-align: center; flex: 0 0 auto; margin-top: 1px; }
.gm-item .tt { font-size: 13px; font-weight: 700; color: #333; }
.gm-item .dd { font-size: 12px; color: #777; margin-top: 2px; line-height: 1.6; }
.gm-item.g1 { border-left: 3px solid #43a047; background: #f1f8e9; }
.gm-item.g2 { border-left: 3px solid #e53935; background: #ffebee; }
.gm-item.g3 { border-left: 3px solid #fb8c00; background: #fff8e1; }

/* 测不准提示 */
.gm-tips { background: #fffaf0; border: 1px dashed #e8c37a; border-radius: 8px; padding: 10px 14px; }
.gm-tip { font-size: 13px; color: #8d6e63; line-height: 1.7; padding: 4px 0; display: flex; gap: 8px; }
.gm-tip::before { content: '\1F4CF'; flex: 0 0 auto; }

/* 顶部三色勋章 */
.gm-medal-wrap { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 12px; background: linear-gradient(135deg, #fffdf7, #fafaf5); border: 1px solid #eee; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.gm-medal { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: #fff; flex: 0 0 auto; box-shadow: 0 3px 10px rgba(0,0,0,.2); letter-spacing: 0; }
.gm-medal-ji { background: radial-gradient(circle at 30% 28%, #66bb6a, #2e7d32 65%, #1b5e20); }
.gm-medal-ping { background: radial-gradient(circle at 30% 28%, #ffb74d, #ef6c00 65%, #e65100); }
.gm-medal-xiong { background: radial-gradient(circle at 30% 28%, #ef5350, #c62828 65%, #b71c1c); }
.gm-medal-info { flex: 1; }
.gm-medal-star { font-size: 26px; color: #f5b83d; letter-spacing: 3px; line-height: 1.25; text-shadow: 0 1px 2px rgba(0,0,0,.08); }
.gm-medal-star .gm-star-empty { color: #e0d8c8; }
.gm-medal-meta { font-size: 13px; color: #555; margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gm-medal-sub { font-size: 12px; color: #999; margin-top: 3px; }
.gm-leveltag { display: inline-block; background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; }

/* 关键警告栏 */
.gm-warn-box { background: #fff5f5; border: 1px solid #ffcdd2; border-left: 4px solid #c62828; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.gm-warn-title { font-size: 14px; font-weight: 700; color: #c62828; margin-bottom: 6px; }
.gm-warn-item { font-size: 13px; color: #8d1f1f; line-height: 1.7; padding: 3px 0; display: flex; gap: 6px; }
.gm-warn-item.gm-warn-ok { color: #2e7d32; }
.gm-warn-item::before { content: '\26A0'; flex: 0 0 auto; }
.gm-warn-item.gm-warn-ok::before { content: '\2705'; }

/* 评分明细 */
.gm-score-line { font-size: 12px; color: #888; background: #fafaf5; border: 1px dashed #e8d9b0; border-radius: 6px; padding: 5px 10px; margin: 8px 0; }

/* 三段式结论 */
.gm-trio-box { margin-top: 10px; }
.gm-trio { font-size: 13px; line-height: 1.7; padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; border: 1px solid #eee; }
.gm-trio-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 8px; margin-right: 6px; color: #fff; }
.gm-trio-ji { background: #f1f8e9; border-color: #c8e6c9; }
.gm-trio-ji .gm-trio-tag { background: #2e7d32; }
.gm-trio-xiong { background: #ffebee; border-color: #ffcdd2; }
.gm-trio-xiong .gm-trio-tag { background: #c62828; }
.gm-trio-hua { background: #fff8e1; border-color: #ffe082; }
.gm-trio-hua .gm-trio-tag { background: #ef6c00; }

/* 健康值卡片 */
.gm-health { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gm-health-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 14px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.gm-health-card .hc-icon { font-size: 30px; }
.gm-health-card .hc-name { font-size: 14px; font-weight: 700; color: #333; margin-top: 6px; }
.gm-health-card .hc-score { font-size: 13px; font-weight: 700; margin-top: 4px; padding: 2px 10px; border-radius: 10px; display: inline-block; color: #fff; }
.gm-health-card .hc-desc { font-size: 12px; color: #777; margin-top: 6px; line-height: 1.6; }
.hc-ji { background: #2e7d32; }
.hc-ping { background: #ef6c00; }
.hc-xiong { background: #c62828; }
.gm-health-banner { margin-top: 12px; border-radius: 10px; padding: 12px 16px; font-size: 14px; line-height: 1.8; border: 1px solid; display: flex; align-items: flex-start; gap: 10px; }
.gm-health-banner .hb-ico { font-size: 22px; flex: 0 0 auto; }
.gm-health-banner.hb-ji { background: #f1f8e9; border-color: #c8e6c9; color: #2e7d32; }
.gm-health-banner.hb-ping { background: #fff8e1; border-color: #ffe082; color: #b26a00; }
.gm-health-banner.hb-xiong { background: #ffebee; border-color: #ffcdd2; color: #b71c1c; }
.gm-health-banner .hb-tag { font-weight: 800; margin-right: 4px; white-space: nowrap; }

/* 房屋罗盘 */
.gm-compass-wrap { position: relative; max-width: 460px; margin: 10px auto; }
.gm-compass { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; border: 2px solid #eb1313; background: radial-gradient(circle at 30% 30%, #fffaf0, #f5e9d0 75%); box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.gm-compass::before, .gm-compass::after { content: ''; position: absolute; background: #d9c9a3; z-index: 1; }
.gm-compass::before { left: 50%; top: 8%; width: 2px; height: 84%; transform: translateX(-50%); }
.gm-compass::after { top: 50%; left: 8%; height: 2px; width: 84%; transform: translateY(-50%); }
.gm-compass-house { position: absolute; left: 50%; top: 50%; width: 34%; height: 34%; transform: translate(-50%, -50%); background: linear-gradient(135deg, #eb1313, #c40e0e); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; z-index: 3; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.gm-compass-card { position: absolute; width: 30%; text-align: center; z-index: 2; }
.gm-compass-card .cc-dir { font-size: 12px; font-weight: 700; color: #8d6e63; }
.gm-compass-card .cc-name { font-size: 11px; color: #666; margin-top: 2px; line-height: 1.4; }
.gm-compass-card .cc-advice { font-size: 11px; font-weight: 700; margin-top: 3px; padding: 2px 6px; border-radius: 8px; display: inline-block; color: #fff; line-height: 1.5; }
.gm-compass-card.gm-cc-north { top: 1%; left: 50%; transform: translateX(-50%); }
.gm-compass-card.gm-cc-south { bottom: 1%; left: 50%; transform: translateX(-50%); }
.gm-compass-card.gm-cc-east { right: 1%; top: 50%; transform: translateY(-50%); }
.gm-compass-card.gm-cc-west { left: 1%; top: 50%; transform: translateY(-50%); }
.gm-compass-card.gm-cc-ne { top: 13%; right: 8%; }
.gm-compass-card.gm-cc-nw { top: 13%; left: 8%; }
.gm-compass-card.gm-cc-se { bottom: 13%; right: 8%; }
.gm-compass-card.gm-cc-sw { bottom: 13%; left: 8%; }
.gm-compass-legend { display: flex; gap: 12px; justify-content: center; margin-top: 10px; font-size: 12px; color: #666; flex-wrap: wrap; }
.gm-compass-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* 计分黑板 */
.gm-healthbar { margin: 10px 0 4px; }
.gm-healthbar-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: #555; margin-bottom: 4px; }
.gm-healthbar-top b { font-size: 22px; }
.gm-healthbar-track { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #c62828 0%, #ef6c00 40%, #f5b83d 60%, #66bb6a 70%, #2e7d32 90%, #1b5e20 100%); position: relative; }
.gm-healthbar-fill { position: absolute; top: -2px; right: -2px; height: 18px; width: 6px; border-radius: 3px; background: #333; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.4); }
.gm-healthbar-scale { display: flex; justify-content: space-between; font-size: 10px; color: #999; margin-top: 3px; }
.gm-board { margin-top: 10px; background: #2b2b2b; border-radius: 10px; padding: 12px 14px; color: #eee; }
.gm-board-title { font-size: 13px; font-weight: 700; color: #f5b83d; margin-bottom: 8px; }
.gm-board-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed #444; line-height: 1.5; }
.gm-board-row:last-child { border-bottom: none; }
.gm-board-row .br-name { color: #ccc; }
.gm-board-row .br-detail { color: #999; font-size: 11px; margin-left: 8px; }
.gm-board-row .br-val { font-weight: 700; white-space: nowrap; }
.gm-board-row.br-plus .br-val { color: #66bb6a; }
.gm-board-row.br-minus .br-val { color: #ef5350; }
.gm-board-row.br-base .br-val { color: #f5b83d; }
.gm-board-row.br-total { border-top: 2px solid #f5b83d; margin-top: 4px; padding-top: 8px; font-size: 14px; }
.gm-board-row.br-total .br-val { color: #fff; }

/* 行动指南表格 */
.gm-repair { width: 100%; border-collapse: collapse; font-size: 13px; }
.gm-repair th { background: var(--gm-light, #feeeee); color: var(--sun-red-dark, #c40e0e); padding: 8px 10px; font-size: 12px; text-align: left; border: 1px solid #eadfc6; }
.gm-repair td { padding: 9px 10px; border: 1px solid #eee; color: #444; line-height: 1.7; vertical-align: top; }
.gm-repair tr.gm-repair-ji { background: #f1f8e9; }
.gm-repair tr.gm-repair-xiong { background: #fff8e1; }
.gm-repair td.rp-item { font-weight: 700; color: #333; white-space: nowrap; }

/* 一句话总结横幅 */
.gm-summary-banner { display: flex; align-items: flex-start; gap: 10px; background: linear-gradient(135deg, #fffdf7, #faf3e0); border: 1px solid #e8d9b0; border-left: 5px solid var(--gm-primary, #eb1313); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; font-size: 15px; line-height: 1.9; color: #5d4037; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.gm-summary-banner .sb-ico { font-size: 26px; flex: 0 0 auto; }
.gm-summary-banner .sb-tag { display: inline-block; background: var(--gm-primary, #eb1313); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 8px; margin-right: 4px; vertical-align: 2px; }

/* 折叠式警告栏 */
.gm-tips-fold { background: #fff8f0; border: 1px solid #f0c36d; border-radius: 8px; padding: 0; overflow: hidden; }
.gm-tips-fold summary { list-style: none; cursor: pointer; padding: 12px 14px; font-size: 14px; font-weight: 700; color: var(--gm-primary, #eb1313); display: flex; align-items: center; gap: 8px; user-select: none; }
.gm-tips-fold summary::-webkit-details-marker { display: none; }
.gm-tips-fold summary .tf-dot { width: 9px; height: 9px; border-radius: 50%; background: #e53935; animation: gm-flash 1.2s ease-in-out infinite; flex: 0 0 auto; }
.gm-tips-fold summary .tf-arrow { margin-left: auto; color: #c9a34b; font-size: 12px; transition: transform .2s; }
.gm-tips-fold[open] summary .tf-arrow { transform: rotate(180deg); }
.gm-tips-fold .tf-body { padding: 0 14px 12px; border-top: 1px dashed #eadfc6; }
.gm-tips-fold .gm-tip { margin-top: 8px; }

/* 术语白话脚注 */
.gm-baihua { font-size: 11px; color: #a1887f; background: #fdf6ec; border-radius: 4px; padding: 1px 6px; margin-left: 6px; font-weight: 400; white-space: nowrap; }

/* ===== AI 预测 + 优化方位（geomancy-common.js） ===== */
.gm-ai-loading { padding: 24px; text-align: center; color: #888; font-size: 14px; background: #fafafa; border-radius: 10px; }
.gm-ai-error { padding: 18px; text-align: center; color: #c62828; font-size: 14px; background: #ffebee; border-radius: 10px; }
.gm-ai-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 18px 20px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.gm-ai-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 2px solid var(--gm-primary, #eb1313); margin-bottom: 14px; }
.gm-ai-tag { background: linear-gradient(135deg, #eb1313, #c62828); color: #fff; padding: 4px 12px; border-radius: 6px; font-size: 14px; font-weight: 700; }
.gm-ai-meta { font-size: 13px; color: #888; }
.gm-ai-body { font-size: 14px; color: #333; line-height: 1.9; white-space: normal; word-break: break-word; }
.gm-ai-source { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #eee; font-size: 12px; color: #aaa; }
.gm-owner-info { font-size: 13px; color: #555; background: #f6f8fa; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.gm-plan-list { display: flex; flex-direction: column; gap: 14px; }
.gm-plan-card { border: 1px solid #eee; border-radius: 10px; padding: 14px 16px; background: #fdfdfd; transition: box-shadow .2s; }
.gm-plan-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.gm-plan-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.gm-plan-rank { background: #eef; color: #303f9f; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 10px; }
.gm-plan-dir { font-size: 17px; font-weight: 700; color: #222; }
.gm-plan-score { font-size: 16px; font-weight: 800; color: var(--gm-primary, #eb1313); }
.gm-plan-grade { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 10px; }
.gm-plan-grade.gm-plan-ji { background: #c8e6c9; color: #2e7d32; }
.gm-plan-grade.gm-plan-ping { background: #ffe0b2; color: #e65100; }
.gm-plan-grade.gm-plan-xiong { background: #ffcdd2; color: #c62828; }
.gm-plan-attrs { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #666; margin-bottom: 8px; }
.gm-plan-wuxing { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: #444; margin-bottom: 10px; padding: 8px 12px; background: #fafafa; border-radius: 8px; }
.gm-plan-item { display: flex; align-items: center; gap: 6px; }
.gm-plan-label { color: #999; font-size: 12px; }
.gm-plan-sha { font-size: 13px; color: #444; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gm-sha { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.gm-sha-ji { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.gm-sha-xiong { background: #ffebee; color: #c62828; border-color: #ef9a9a; }
.gm-sha-ping { background: #fff8e1; color: #e65100; border-color: #ffe082; }
.gm-plan-reasons { font-size: 12px; color: #777; margin-bottom: 8px; }
.gm-plan-reasons ul { margin: 4px 0 0 18px; padding: 0; }
.gm-plan-repair { font-size: 13px; color: #2e5d2e; background: #f1f8e9; border-radius: 8px; padding: 8px 12px; }
/* 福主信息表单 */
.gm-owner-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; padding: 12px; background: #fafafa; border-radius: 10px; border: 1px solid #eee; }
.gm-owner-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gm-owner-row .gm-owner-title { font-size: 13px; font-weight: 700; color: #555; min-width: 52px; }
.gm-owner-row select, .gm-owner-row input { padding: 4px 6px; font-size: 13px; border: 1px solid #ddd; border-radius: 4px; }
.gm-owner-row label { font-size: 13px; color: #333; cursor: pointer; margin-right: 4px; }

/* 次要按钮（AI 预测 / 优化方位） */
.btn-secondary { background: linear-gradient(135deg, #5b7cfa, #4a66d8); color: #fff; border: none; border-radius: 6px; padding: 6px 16px; font-size: 13px; cursor: pointer; transition: all .15s; }
.btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(74,102,216,.35); }
.btn-secondary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ===== 标题行 + 模式切换 + 统一输入行 ===== */
.gm-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: nowrap; }
.gm-title-row .gm-title-text { white-space: nowrap; }
.gm-mode-group { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.gm-mode-group label { position: relative; font-size: .8rem; color: var(--text-secondary, #666); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; padding: 5px 14px; border: 1px solid var(--border-color, #e5e5e5); border-radius: 20px; background: #fff; transition: all .15s; }
.gm-mode-group label:hover { border-color: var(--sun-red, #eb1313); color: var(--sun-red, #eb1313); }
.gm-mode-group label:has(input:checked) { background: var(--sun-red, #eb1313); border-color: var(--sun-red, #eb1313); color: #fff; font-weight: 600; }
.gm-mode-group input { position: absolute; width: 0; height: 0; opacity: 0; margin: 0; }
.gm-btn-area { margin-left: auto; display: inline-flex; gap: 8px; flex: 0 0 auto; }
.gm-input-row { display: flex; align-items: flex-end; gap: 8px 12px; flex-wrap: wrap; margin: 10px 0 6px; }
/* 一组 select 字段：桌面一行可容下「座向|分金|来龙|来去水」，窄屏自动换行不溢出 div */
.gm-input-row .filter-group { flex: 1 1 auto; min-width: 0; }
.gm-input-row .filter-group.flex-grow { flex: 2 1 auto; }
.gm-input-row .filter-group select, .gm-input-row .filter-group input { width: auto; min-width: 64px; max-width: 100%; }

/* ===== 第二行输入（预测时间/福主/修造时间）===== */
.gm-input-row-2 { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; padding: 8px 10px; background: #fafafa; border-radius: 8px; border: 1px dashed #eee; }
.gm-input-row-2 .filter-group { flex: 0 0 auto; }
.gm-input-row-2 .filter-group select, .gm-input-row-2 .filter-group input { width: auto; min-width: 60px; }

/* ===== AI 流式输出（参考八字 sticky 状态栏 + liveContent）===== */
.gm-live-status { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; border-radius: 10px; margin-bottom: 12px; font-size: .85rem; }
.gm-live-status .gm-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: gm-spin 0.8s linear infinite; }
@keyframes gm-spin { to { transform: rotate(360deg); } }
.gm-live-content { min-height: 200px; }
.gm-ai-tk { margin-top: 8px; padding: 4px 12px; background: #f0f4f8; border-radius: 20px; text-align: right; font-size: .75rem; color: #89a; }

/* ===== 操作行：类型选择 + 分析按钮 单独一行（与八字 filter-actions-row 同规则） ===== */
.gm-actions-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px dashed #e7dcc9; margin-bottom: 14px; }
.gm-actions-row .gm-mode-group { margin-left: 0; }
.gm-actions-row .gm-btn-area { margin-left: auto; }

/* ===== 操作按钮统一尺寸：开始分析 / AI 预测 / 优化方位 等宽等高（模式切换不跳动），与全站 btn-sm 一致 ===== */
.gm-actions-row .gm-btn-area button {
    min-width: 128px; height: 34px; padding: 0 16px;
    font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 30px; border: none; cursor: pointer; transition: all .15s;
}
.gm-actions-row .gm-btn-area button:hover { transform: translateY(-1px); }
.gm-actions-row .gm-btn-area button:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ===== 砂方位行 + 最右侧「左右到水」自动判断标签 ===== */
.gm-sand-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.gm-sand-row .filter-label { margin: 0; }
.gm-waterdir {
    margin-left: auto; font-size: 12px; font-weight: 600; white-space: nowrap;
    padding: 3px 12px; border-radius: 20px;
    border: 1px dashed #d8b36a; color: #8a6a1a; background: #fffdf4;
}
.gm-waterdir-left { background: #e8f5e9; border-color: #a5d6a7; color: #2e7d32; border-style: solid; }
.gm-waterdir-right { background: #fff3e0; border-color: #ffcc80; color: #b26a00; border-style: solid; }
.gm-waterdir-none { color: #9e9e9e; background: #fafafa; border-color: #e0e0e0; }

/* ============================================================
   风水首页/子页头图：左侧风水罗盘 + 文字 + 右侧青阳阁
   —— 对齐 master/index.html 的「图标在左 + 文字 + 右侧青阳阁」布局。
   去除右侧人物徽章（ge-badge），改用 .xb-ch 左图标（罗盘）+ 文字；
   右侧青阳阁由 .xb-banner::before 提供（index 用 ge-hero-home，子页用 banner-qyg-100），
   左侧深色遮罩 .xb-banner::after 保证白字可读。仅作用风水模块（.xb-geomancy）。
   ============================================================ */
.xb-geomancy .xb-ch-icon {
    height: 72px;        /* 风水罗盘：等比高度，不撑高头图 */
    width: auto;
    margin-right: 6px;
}
@media (max-width: 520px) {
    .xb-geomancy .xb-ch-icon { display: none; }   /* 窄屏隐藏罗盘，文字占满 */
}
