:root {
  --paper: #f7f4ed;
  --paper-deep: #eeeae1;
  --surface: #fffdfa;
  --ink: #2f302f;
  --muted: #86837d;
  --line: #e5e0d6;
  --gold: #b18d4f;
  --gold-dark: #85652e;
  --gold-pale: #f1e8d4;
  --wood: #258a57;
  --fire: #d96535;
  --earth: #a47d32;
  --metal: #78838b;
  --water: #287eb3;
  --shadow: 0 12px 32px rgba(72, 58, 35, .07);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; padding-bottom: 94px; }
.topbar { height: 66px; background: rgba(255,253,250,.94); display: flex; align-items: center; justify-content: space-between; padding: 0 max(18px, calc((100vw - 1100px)/2)); border-bottom: 1px solid rgba(229,224,214,.75); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); }
.brand { font-family: "STKaiti", "KaiTi", serif; font-size: 25px; letter-spacing: .12em; }
.icon-button, .back-button { border: 0; background: transparent; color: var(--ink); width: 40px; height: 40px; font-size: 25px; border-radius: 50%; transition: background .2s, color .2s; }
.icon-button:hover, .back-button:hover { background: var(--gold-pale); color: var(--gold-dark); }
main { width: min(calc(100% - 22px), 1100px); margin: 0 auto; }
.view { padding: 34px 0 38px; }
.hero-copy { padding: 6px 4px 25px; }
.eyebrow { margin: 0 0 8px; color: var(--gold-dark); font-size: 12px; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 5vw, 44px); font-weight: 600; letter-spacing: .02em; }
h2 { margin-bottom: 0; font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; margin-bottom: 13px; }
.muted, small { color: var(--muted); }
.panel { background: var(--surface); border: 1px solid rgba(229,224,214,.7); border-radius: 22px; box-shadow: var(--shadow); }
.input-panel { padding: clamp(20px, 4vw, 40px); }
.field-row { display: grid; grid-template-columns: 115px 1fr; align-items: center; gap: 18px; min-height: 63px; border-bottom: 1px solid var(--line); }
.field-row label, .segmented-field legend { font-size: 18px; font-weight: 500; }
.field-row small { font-size: 13px; font-weight: 400; }
input[type="text"], input[type="tel"], input[type="datetime-local"], select { width: 100%; min-width: 0; border: 0; color: var(--ink); background: transparent; outline: 0; font-size: 16px; padding: 10px 0; }
input::placeholder { color: #bdb9b1; }
select { appearance: none; background: linear-gradient(45deg, transparent 50%, var(--gold) 50%) calc(100% - 14px) 50% / 7px 7px no-repeat, linear-gradient(135deg, var(--gold) 50%, transparent 50%) calc(100% - 9px) 50% / 7px 7px no-repeat; padding-right: 30px; }
.region-selects { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 10px; }
.region-selects select { border: 1px solid var(--line); border-radius: 8px; padding: 9px 28px 9px 10px; }
.split-row { display: grid; grid-template-columns: 1fr 1.35fr; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.segmented-field legend { margin-bottom: 12px; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; min-height: 47px; }
.segmented label { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { width: 100%; text-align: center; padding: 9px 7px; border-radius: 999px; color: #aaa59e; transition: .2s; white-space: nowrap; }
.segmented input:checked + span { color: #fff; background: var(--gold); box-shadow: 0 3px 8px rgba(177,141,79,.25); }
.local-time-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 22px 0; }
.local-time-row p { margin: 0 0 7px; font-size: 13px; color: #a29d94; display: flex; gap: 10px; flex-wrap: wrap; }
.local-time-row p:last-child { margin-bottom: 0; }
.local-time-row strong { color: var(--gold-dark); font-weight: 500; }
.switch-label { display: flex; align-items: center; gap: 10px; font-size: 16px; white-space: nowrap; }
.switch-label input { position: absolute; opacity: 0; }
.switch { width: 46px; height: 27px; background: #d4d0c8; border-radius: 999px; position: relative; transition: .2s; }
.switch::after { content: ""; position: absolute; width: 21px; height: 21px; top: 3px; left: 3px; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,.14); transition: .2s; }
.switch-label input:checked + .switch { background: var(--gold); }
.switch-label input:checked + .switch::after { transform: translateX(19px); }
.primary-button { width: 100%; border: 0; background: #262521; color: #f4dfb7; min-height: 59px; border-radius: 999px; font-size: 19px; letter-spacing: .12em; transition: transform .2s, background .2s; }
.primary-button:hover { background: #161512; transform: translateY(-1px); }
.primary-button span { margin-left: 11px; font-size: 22px; }
.instant-card { margin-top: 22px; padding: 24px; }
.instant-heading { display: flex; align-items: start; justify-content: space-between; }
.live-dot { color: #7eaa65; font-size: 11px; }
.instant-content { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; }
.mini-pillars { display: flex; gap: clamp(10px, 3vw, 30px); }
.mini-pillar { text-align: center; display: flex; flex-direction: column; gap: 2px; }
.mini-pillar b { font-family: "STKaiti", "KaiTi", serif; font-size: 29px; font-weight: 500; }
.mini-pillar small { font-size: 11px; }
.instant-meta { text-align: right; display: grid; gap: 4px; }
.instant-meta strong { font-size: 24px; font-weight: 500; }
.outline-button { width: 100%; min-height: 47px; border: 1px solid var(--line); background: transparent; border-radius: 999px; color: var(--ink); font-size: 16px; transition: .2s; }
.outline-button:hover { border-color: var(--gold); color: var(--gold-dark); background: var(--gold-pale); }
.result-header { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: 24px 0 14px; }
.result-header h1 { font-size: 27px; margin: 0; }
.result-header h1 { text-align: center; }
.back-button { font-size: 39px; line-height: 1; }
.result-identity { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 14px; background: #25251f; color: #f8f3e8; border-color: #39362b; }
.zodiac-emblem { width: 54px; height: 54px; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; color: #f0d79f; font-family: "STKaiti", "KaiTi", serif; font-size: 27px; }
.identity-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.identity-copy strong { color: #f1d79e; font-size: 17px; }
.identity-copy span, .identity-copy small { color: #e4dfd2; font-size: 12px; }
.identity-tags { display: flex; flex-direction: column; align-items: end; gap: 4px; }
.identity-tags span { color: #f4e9d3; border: 1px solid rgba(244,233,211,.3); border-radius: 6px; padding: 3px 7px; font-size: 11px; }
.result-tabs { position: sticky; top: 66px; z-index: 12; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: rgba(240,236,228,.97); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 5px 16px rgba(72,58,35,.06); backdrop-filter: blur(12px); }
.result-tab { min-height: 44px; border: 0; border-radius: 7px; color: #77736c; background: transparent; padding: 10px 7px; font-size: 14px; font-weight: 500; }
.result-tab.active { color: var(--gold-dark); background: var(--surface); box-shadow: 0 2px 8px rgba(72,58,35,.08); }
.result-tab-panel { padding: 20px 0 42px; }
.info-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.info-group { min-width: 0; }
.info-group:last-child { grid-column: 1 / -1; }
.info-group-title { margin: 0 0 8px 2px; color: var(--gold-dark); font-size: 14px; }
.info-list { overflow: hidden; border-radius: 12px; border: 1px solid var(--line); }
.info-row { display: grid; grid-template-columns: 92px 1fr; gap: 11px; padding: 10px 13px; font-size: 13px; line-height: 1.65; }
.info-row:nth-child(odd) { background: #f3f1ec; }
.info-label { color: #969188; }
.knowledge-note { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 9px; margin: 14px 0 0; padding: 11px 13px; border-left: 3px solid var(--gold); background: #f7f1e4; color: #6b6252; font-size: 12px; line-height: 1.7; }
.knowledge-note b { color: var(--gold-dark); }
.pillar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pillar-card { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.pillar-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 10px 11px; background: #f3efe7; }
.pillar-card header span { color: var(--gold-dark); font-size: 13px; font-weight: 600; }
.pillar-card header small { font-size: 11px; }
.pillar-glyphs { display: grid; place-items: center; gap: 5px; padding: 14px 8px 11px; }
.pillar-divider { width: 28px; height: 1px; background: var(--line); }
.pillar-facts { margin: 0; padding: 0 11px; }
.pillar-facts > div { padding: 8px 0; border-top: 1px solid var(--line); }
.pillar-facts dt { margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.pillar-facts dd { margin: 0; color: #56534d; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.pillar-star-block { padding: 9px 11px 12px; border-top: 1px solid var(--line); }
.pillar-star-block > b { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 500; }
.star-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.star-chips span { padding: 3px 6px; border: 1px solid #e5dbc4; border-radius: 5px; background: #f7f2e7; color: #715c38; font-size: 10px; line-height: 1.4; }
.phase-score-section { margin-top: 24px; }
.phase-radar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.phase-radar-card { min-width: 0; padding: 12px 12px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.phase-radar-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.phase-radar-card header strong { color: var(--gold-dark); font-size: 14px; }
.phase-radar-card header small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.phase-radar { display: block; width: 100%; height: auto; min-height: 145px; overflow: visible; }
.phase-radar-grid-line { fill: none; stroke: #ded7cb; stroke-width: .65; vector-effect: non-scaling-stroke; }
.phase-radar-axis { stroke: #e6dfd4; stroke-width: .65; vector-effect: non-scaling-stroke; }
.phase-radar-value { fill: rgba(190, 148, 67, .16); stroke: #a77b32; stroke-width: 1.1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.phase-radar-dot { fill: #9a6d25; stroke: #fffaf0; stroke-width: .8; vector-effect: non-scaling-stroke; }
.phase-radar-label { fill: #716b61; font-size: 8.5px; letter-spacing: .02em; }
.phase-radar-scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: -1px; }
.phase-radar-scores span { display: grid; gap: 2px; justify-items: center; color: #777168; font-size: 10px; }
.phase-radar-scores b { color: var(--gold-dark); font-size: 10px; font-weight: 500; }
.section { margin-top: 18px; }
.section-title { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 16px; }
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--gold); }
.locked-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.locked-card { min-height: 74px; padding: 11px; background: #faf9f6; border: 1px solid var(--line); border-radius: 11px; display: grid; gap: 5px; font-size: 12px; }
.locked-card.wide { grid-column: 1 / -1; }
.locked-card strong { color: var(--gold-dark); font-size: 14px; }
.locked-card.metric-card { min-height: 112px; }
.locked-card .metric-text { font-size: 11px; line-height: 1.6; font-weight: 500; }
.lock-icon { color: #baa47b; font-size: 17px; }
.energy-panel { padding: 16px; background: #f0ede6; border-radius: 14px; }
.energy-copy { color: #77736c; font-size: 13px; line-height: 1.8; margin-bottom: 14px; }
.energy-bars { display: grid; gap: 8px; }
.energy-line { display: grid; grid-template-columns: 32px 1fr 40px; align-items: center; gap: 8px; font-size: 12px; }
.energy-track { height: 8px; background: #ded9d0; border-radius: 99px; overflow: hidden; }
.energy-fill { height: 100%; border-radius: inherit; }
.energy-state { text-align: right; color: var(--gold-dark); }
.state-ribbon { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--gold); color: #fff; border-radius: 8px; overflow: hidden; margin-top: 14px; }
.state-ribbon span { padding: 8px 2px; text-align: center; font-size: 12px; border-right: 1px solid rgba(255,255,255,.25); }
.state-ribbon span:last-child { border: 0; }
.bone-card { border-radius: 13px; overflow: hidden; border: 1px solid #8c6f32; background: linear-gradient(120deg, #59421f, #b68d44); color: #fff; padding: 20px 15px; text-align: center; position: relative; }
.bone-card strong { display: block; font-size: 26px; color: #ffe8ae; font-family: "STKaiti", "KaiTi", serif; }
.bone-card p { margin: 9px 0 0; line-height: 1.75; font-size: 14px; }
.sky-card { border-radius: 14px; background: #20221f; border: 1px solid #34372f; overflow: hidden; color: #eee5d4; }
.celestial-chart { position: relative; width: 100%; aspect-ratio: 1.7; min-height: 220px; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 22px 22px; overflow: hidden; }
.celestial-orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(218,190,128,.25); border-radius: 50%; transform: translate(-50%,-50%); }
.celestial-orbit.o1 { width: 29%; aspect-ratio: 1; } .celestial-orbit.o2 { width: 51%; aspect-ratio: 1; } .celestial-orbit.o3 { width: 73%; aspect-ratio: 1; }
.celestial-axis { position: absolute; inset: 8% 7%; border-top: 1px dashed rgba(255,255,255,.11); top: 50%; }
.celestial-axis::after { content: ""; position: absolute; height: 184px; border-left: 1px dashed rgba(255,255,255,.11); left: 50%; top: -92px; }
.celestial-sun { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; transform: translate(-50%,-50%); border-radius: 50%; display: grid; place-items: center; background: #c49b4f; color: #1c1d1a; box-shadow: 0 0 24px rgba(230,190,106,.28); font-family: "STKaiti", "KaiTi", serif; font-size: 21px; }
.planet { position: absolute; transform: translate(-50%,-50%); display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: #30332e; color: #f2e4c7; font-size: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.planet::after { content: attr(data-label); position: absolute; top: 32px; font-size: 9px; color: #bdb5a6; white-space: nowrap; }
.celestial-caption { position: absolute; left: 12px; bottom: 10px; display: grid; gap: 3px; font-size: 10px; color: #aaa79f; }
.celestial-caption strong { color: #ead29d; font-size: 12px; }
.celestial-pillars { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid rgba(255,255,255,.12); }
.celestial-pillar { display: grid; place-items: center; padding: 10px 4px; border-right: 1px solid rgba(255,255,255,.1); font-family: "STKaiti", "KaiTi", serif; font-size: 17px; color: #ead29d; }
.celestial-pillar:last-child { border-right: 0; }
.celestial-pillar small { color: #9e9b94; font-family: inherit; font-size: 9px; }
.sky-note { margin: 8px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.solar-terms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 12px; }
.term-card { background: #faf9f5; border: 1px solid var(--line); padding: 10px 6px; border-radius: 9px; text-align: center; font-size: 11px; }
.term-card b { display: block; color: var(--gold-dark); margin-bottom: 5px; }
.chart-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.chart-table { min-width: 680px; width: 100%; border-collapse: collapse; table-layout: fixed; }
.chart-table th, .chart-table td { padding: 10px 7px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: center; font-size: 13px; line-height: 1.7; }
.chart-table th:first-child, .chart-table td:first-child { width: 77px; text-align: left; color: #958f86; background: #f4f1eb; position: sticky; left: 0; z-index: 1; }
.chart-table tr:last-child td, .chart-table tr:last-child th { border-bottom: 0; }
.stem, .branch { display: block; font-family: "STKaiti", "KaiTi", serif; font-size: 29px; line-height: 1.2; font-weight: 600; }
.element-wood { color: var(--wood); } .element-fire { color: var(--fire); } .element-earth { color: var(--earth); } .element-metal { color: var(--metal); } .element-water { color: var(--water); }
.pill { display: inline-block; padding: 2px 5px; border-radius: 5px; font-size: 11px; background: #f3eee2; color: var(--gold-dark); margin: 1px; }
.relation-box { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13px; line-height: 1.9; }
.relation-box p { margin-bottom: 9px; }
.relation-box p:last-child { margin-bottom: 0; }
.relation-box b { color: var(--gold-dark); }
.professional-lead { border: 1px solid #d9ccb2; border-radius: 8px; background: var(--surface); overflow: hidden; }
.professional-lead-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #292b28; color: #f5ead4; }
.professional-lead-header span { color: #d1c6b3; font-size: 12px; }
.professional-lead-header strong { color: #efd398; font-size: 16px; }
.professional-lead-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.professional-lead-grid > div { min-width: 0; padding: 14px 16px; border-right: 1px solid var(--line); }
.professional-lead-grid > div:last-child { border-right: 0; }
.professional-lead-grid b { display: block; margin-bottom: 6px; color: var(--gold-dark); font-size: 12px; }
.professional-lead-grid p { margin: 0; color: #56534d; font-size: 12px; line-height: 1.75; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.detail-card h3 { color: var(--gold-dark); margin-bottom: 8px; font-size: 14px; }
.detail-card p { margin: 0; font-size: 13px; line-height: 1.75; }
.table-card { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.compact-table { min-width: 620px; width: 100%; border-collapse: collapse; }
.compact-table th, .compact-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: center; font-size: 12px; white-space: nowrap; }
.compact-table th { color: var(--gold-dark); background: #f3efe7; font-weight: 500; }
.compact-table tr:last-child td { border-bottom: 0; }
.detail-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.detail-section-heading .section-note { margin-bottom: 11px; }
.detail-mode-toggle { flex: 0 0 auto; margin-top: 1px; min-height: 32px; padding: 0 10px; border: 1px solid #d9c59e; border-radius: 7px; background: #faf5e9; color: var(--gold-dark); font-size: 11px; white-space: nowrap; transition: background .2s, border-color .2s, color .2s; }
.detail-mode-toggle:hover, .detail-mode-toggle[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-pale); color: var(--gold-dark); }
.professional-detail-scroll { overflow-x: auto; border: 1px solid #d8d0c3; border-radius: 10px; background: var(--surface); box-shadow: 0 8px 20px rgba(72,58,35,.045); scrollbar-color: #c7b58e transparent; }
.professional-detail-table { min-width: 1050px; width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.professional-detail-table th, .professional-detail-table td { min-width: 106px; padding: 10px 8px; border-right: 1px solid #ebe6dc; border-bottom: 1px solid #ebe6dc; text-align: center; vertical-align: middle; color: #555149; font-size: 11px; line-height: 1.55; }
.professional-detail-table thead th { position: sticky; top: 0; z-index: 3; min-width: 106px; padding: 11px 8px; background: #2d2e2a; color: #ead5a8; font-size: 12px; font-weight: 500; letter-spacing: .06em; }
.professional-detail-table thead th:first-child { left: 0; z-index: 5; width: 70px; min-width: 70px; background: #252622; color: #b9b1a3; }
.professional-detail-table tbody th { position: sticky; left: 0; z-index: 2; width: 70px; min-width: 70px; background: #f4f1eb; color: #989187; font-weight: 500; }
.professional-detail-table tbody tr:nth-child(even) td { background: #fcfbf8; }
.professional-detail-table tbody tr:last-child th, .professional-detail-table tbody tr:last-child td { border-bottom: 0; }
.professional-detail-table th:last-child, .professional-detail-table td:last-child { border-right: 0; }
.professional-detail-table .detail-stem, .professional-detail-table .detail-branch { display: inline-block; font-family: "STKaiti", "KaiTi", serif; font-size: 30px; line-height: 1.1; font-weight: 600; }
.professional-detail-table .detail-branch { margin-top: 3px; }
.professional-detail-table .detail-god { color: #4e4b45; font-size: 13px; }
.professional-detail-table .detail-hidden { display: grid; justify-content: center; gap: 2px; }
.professional-detail-table .detail-hidden > span { display: inline-flex; align-items: baseline; justify-content: center; gap: 3px; font-family: "STKaiti", "KaiTi", serif; font-size: 17px; }
.professional-detail-table .detail-hidden small { font-family: inherit; color: #777066; font-size: 10px; }
.professional-detail-table .star-chips { justify-content: center; gap: 3px; }
.professional-detail-table .star-chips span { padding: 2px 4px; font-size: 9px; }
.section-note { margin: -3px 0 11px 13px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.shensha-grid { display: grid; gap: 8px; }
.shensha-pillar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shensha-period-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shensha-card { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.shensha-card header { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; row-gap: 2px; margin-bottom: 8px; }
.shensha-card header span { color: var(--muted); font-size: 10px; }
.shensha-card header strong { color: var(--gold-dark); font-family: "STKaiti", "KaiTi", serif; font-size: 17px; }
.shensha-card header small { grid-column: 1 / -1; font-size: 10px; }
.shensha-row-card { display: grid; grid-template-columns: minmax(108px, .36fr) 1fr; gap: 10px; align-items: start; }
.shensha-row-card header { margin-bottom: 0; }
.shensha-section { padding-top: 4px; }
.professional-analysis { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.analysis-guide { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 10px 14px; margin: 0 0 13px; padding: 11px 14px; border: 1px solid #e4d8c0; border-left: 3px solid var(--gold); border-radius: 8px; background: #faf6ed; }
.analysis-guide span { color: var(--gold-dark); font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.analysis-guide b { color: #4d4a43; font-size: 13px; font-weight: 600; }
.analysis-guide small { justify-self: end; color: var(--muted); font-size: 11px; }
.analysis-list { display: grid; gap: 10px; }
.analysis-item { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.analysis-item[open] { border-color: #d9c59e; box-shadow: 0 6px 18px rgba(72,58,35,.055); }
.analysis-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 62px; padding: 11px 15px; cursor: pointer; color: var(--gold-dark); }
.analysis-item summary::-webkit-details-marker { display: none; }
.analysis-summary-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.analysis-index { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: var(--gold-pale); color: var(--gold-dark); font-family: "STKaiti", "KaiTi", serif; font-size: 16px; line-height: 1; }
.analysis-summary-copy { display: grid; gap: 3px; min-width: 0; }
.analysis-summary-copy strong { color: #3e3d39; font-size: 15px; line-height: 1.4; }
.analysis-summary-copy small { overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.analysis-toggle { flex: 0 0 23px; width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #d9cdb7; border-radius: 50%; color: var(--gold-dark); }
.analysis-toggle::before { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.analysis-item[open] .analysis-toggle::before { margin-top: 3px; transform: rotate(225deg); }
.analysis-body { padding: 2px 18px 18px 56px; color: #57544e; font-size: 13px; line-height: 1.9; }
.professional-analysis-item summary { font-size: 15px; }
.analysis-angle { display: grid; grid-template-columns: minmax(110px, .25fr) minmax(0, 1fr); gap: 18px; padding: 13px 0; border-top: 1px solid var(--line); }
.analysis-angle:first-child { padding-top: 4px; border-top: 0; }
.analysis-angle b, .classic-note b { display: block; margin-bottom: 4px; color: #49463f; font-size: 13px; }
.analysis-angle b { color: var(--gold-dark); font-weight: 600; }
.analysis-angle p, .classic-note p { margin: 0; }
.classic-note { margin-top: 11px; padding: 11px 12px; border-left: 3px solid var(--gold); background: #f7f1e4; color: #665d4c; }
.classic-note b { color: var(--gold-dark); }
.luck-analysis { list-style: none; padding: 0; margin: 7px 0; display: grid; gap: 7px; }
.luck-analysis li { display: grid; grid-template-columns: minmax(130px,.38fr) 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); background: transparent; }
.luck-analysis li:first-child { padding-top: 3px; }
.luck-analysis li:last-child { border-bottom: 0; }
.luck-analysis li b { color: var(--gold-dark); font-size: 12px; }
.luck-analysis li span { line-height: 1.65; }
.toast { position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; background: #262521; color: #f3e4c1; border-radius: 999px; padding: 10px 17px; font-size: 13px; transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.records-hero-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.records-manage { min-width: 68px; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--gold-dark); font-size: 14px; }
.records-manage[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-pale); }
.records-list { padding: 0 16px; }
.records-switcher { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #f0ece4; }
.records-switch { min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; transition: background .2s, color .2s, box-shadow .2s; }
.records-switch small { margin-left: 4px; color: inherit; font-size: 11px; }
.records-switch.active { background: var(--surface); color: var(--gold-dark); box-shadow: 0 2px 8px rgba(72,58,35,.08); }
.records-filter-row { display: grid; grid-template-columns: 90px minmax(0, 240px); align-items: center; gap: 12px; margin: 0 0 12px; padding: 0 4px; color: var(--muted); font-size: 13px; }
.records-filter-row select { min-height: 40px; padding: 8px 28px 8px 10px; border: 1px solid var(--line); border-radius: 8px; background-color: var(--surface); color: var(--ink); font-size: 13px; }
.records-group + .records-group { border-top: 1px solid var(--line); }
.records-group-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0; padding: 17px 2px 5px; color: var(--gold-dark); font-size: 16px; }
.records-group-title small { color: var(--muted); font-size: 12px; font-weight: 400; }
.record-empty { padding: 28px 8px; text-align: center; color: var(--muted); font-size: 13px; }
.record-entry { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.record-entry:last-child { border-bottom: 0; }
.record-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 15px 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.record-entry .record-row { flex: 1; min-width: 0; border-bottom: 0; }
.record-row:disabled { cursor: default; opacity: .78; }
.record-delete { flex: 0 0 42px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: #a84e42; font-size: 25px; line-height: 1; }
.record-delete:hover { background: #f7e9e6; }
.record-row:hover { background: #faf7f0; }
.record-row:disabled:hover { background: transparent; }
.record-row:last-child { border-bottom: 0; }
.record-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-pale); color: var(--gold-dark); font-family: "STKaiti", "KaiTi", serif; font-size: 20px; }
.record-copy { flex: 1; min-width: 0; display: grid; gap: 4px; }
.record-copy strong { font-size: 14px; }
.record-copy small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-pillars { color: var(--gold-dark); font-family: "STKaiti", "KaiTi", serif; font-size: 15px; white-space: nowrap; }
.phone-record-row .record-pillars { font-family: inherit; font-size: 12px; }
.academy-list, .settings-list { display: grid; gap: 10px; }
.academy-card { display: flex; gap: 14px; padding: 18px; }
.academy-card > span { color: var(--gold); font-family: "STKaiti", "KaiTi", serif; font-size: 22px; }
.academy-card h2 { font-size: 16px; margin-bottom: 7px; }
.academy-card p { margin: 0; color: #706c64; font-size: 13px; line-height: 1.75; }
.settings-list { padding: 0 16px 16px; }
.profile-card { padding: 18px; display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.member-card { padding: 18px; margin-bottom: 12px; border-color: #d6bd83; background: linear-gradient(135deg, #fffdf7, #f7f0e2); }
.member-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.member-card-head h2 { margin: 0 0 5px; color: var(--gold-dark); font-size: 19px; }
.member-status, .member-expiry { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.member-badge { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #c9a95e; border-radius: 999px; color: var(--gold-dark); background: #fff9e9; font-size: 11px; }
.member-quota-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0 12px; }
.member-quota-grid > div { min-height: 58px; padding: 9px 8px; border: 1px solid rgba(196, 166, 100, .35); border-radius: 9px; background: rgba(255,255,255,.55); }
.member-quota-grid span, .member-quota-grid strong { display: block; }
.member-quota-grid span { color: var(--muted); font-size: 10px; }
.member-quota-grid strong { margin-top: 6px; color: var(--ink); font-size: 12px; }
.member-card .primary-button { width: 100%; margin-top: 13px; }
.member-lock-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 15px; border: 1px solid #d7c18e; background: #fffaf0; }
.member-lock-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #ead9ad; color: var(--gold-dark); font-size: 12px; }
.member-lock-card h3 { margin: 0 0 4px; color: var(--gold-dark); font-size: 14px; }
.member-lock-card p, .member-lock-card small { display: block; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.member-lock-card small { margin-top: 3px; font-size: 10px; }
.member-lock-card .outline-button { white-space: nowrap; }
.member-compliance { color: #796e58; font-size: 11px; line-height: 1.7; }
.member-compliance-top { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--gold); background: #f7f1e4; }
.member-compliance-bottom { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.membership-dialog-card { max-height: min(720px, calc(100vh - 36px)); overflow: auto; }
.membership-dialog-notice { position: absolute; top: 12px; left: 18px; right: 18px; z-index: 1; margin: 0; }
.membership-offer-list, .membership-single-list { display: grid; gap: 8px; margin-top: 16px; }
.membership-offer { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.membership-offer:hover, .membership-offer:focus-visible { border-color: #c9a95e; background: #fffaf0; }
.membership-offer span, .membership-offer b, .membership-offer small { display: block; }
.membership-offer b { color: var(--gold-dark); font-size: 14px; }
.membership-offer small { max-width: 270px; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.membership-offer strong { flex: 0 0 auto; color: var(--gold-dark); font-size: 16px; }
.membership-single-list { padding-top: 14px; border-top: 1px solid var(--line); }
.membership-single-list p { margin: 0; color: var(--ink); font-weight: 600; font-size: 13px; }
.membership-single-list small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.profile-avatar { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: #262721; border: 1px solid var(--gold); color: #efd394; font-family: "STKaiti", "KaiTi", serif; font-size: 23px; }
.profile-summary { flex: 1; display: grid; gap: 4px; }
.profile-summary strong { font-size: 16px; }
.profile-summary small { font-size: 11px; }
.local-badge { padding: 4px 8px; border-radius: 6px; background: var(--gold-pale); color: var(--gold-dark); font-size: 11px; }
.profile-field { min-height: 57px; display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-field input { border: 0; background: transparent; outline: 0; min-width: 0; color: var(--ink); text-align: right; }
.setting-row { min-height: 57px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); font-size: 14px; }
.setting-row strong { font-weight: 500; color: var(--muted); }
.setting-row .setting-on { color: var(--gold-dark); }
.settings-list .outline-button { margin-top: 12px; }
.service-panel { margin-top: 12px; padding: 0 16px 6px; }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 66px; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.service-row:last-child { border-bottom: 0; }
.service-row > span { display: grid; gap: 4px; }
.service-row strong { font-size: 14px; font-weight: 500; }
.service-row small { color: var(--muted); font-size: 11px; }
.service-row > b { color: var(--gold-dark); font-size: 25px; font-weight: 400; }
.service-row:hover strong { color: var(--gold-dark); }
.profile-settings-tabs { position: sticky; top: 66px; z-index: 11; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 0 14px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(240,236,228,.96); box-shadow: 0 5px 16px rgba(72,58,35,.06); backdrop-filter: blur(12px); }
.profile-settings-tab { min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; }
.profile-settings-tab.active { background: var(--surface); color: var(--gold-dark); box-shadow: 0 2px 8px rgba(72,58,35,.08); }
.profile-settings-panel[hidden] { display: none !important; }
.preference-panel, .rule-panel { gap: 0; padding-top: 20px; }
.settings-section-heading { padding: 0 0 14px; }
.settings-section-heading h2 { margin-bottom: 6px; color: var(--gold-dark); font-size: 19px; }
.settings-section-heading p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.preference-reset { width: auto; min-height: 38px; margin-top: 12px; padding: 0 13px; font-size: 12px; }
.preference-context-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 4px 0 16px; }
.preference-context { min-height: 65px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f6; color: var(--ink); font-size: 13px; }
.preference-context span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.preference-context.active { border-color: #c8ab72; background: var(--gold-pale); color: var(--gold-dark); }
.preference-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 55px; border-top: 1px solid var(--line); color: #57534b; font-size: 13px; }
.preference-row > label:first-child, .preference-row > span:first-child { color: #57534b; }
.preference-row select { min-height: 38px; padding: 7px 28px 7px 10px; border: 1px solid var(--line); border-radius: 8px; background-color: var(--surface); color: var(--ink); font-size: 13px; }
.preference-block { padding: 5px 0 8px; border-top: 1px solid var(--line); }
.preference-block h3 { margin: 12px 0 2px; color: var(--gold-dark); font-size: 14px; }
.preference-segment { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f3efe7; }
.preference-segment button { min-height: 34px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; }
.preference-segment button.active { background: var(--surface); color: var(--gold-dark); box-shadow: 0 1px 5px rgba(72,58,35,.1); }
.preference-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 51px; border-top: 1px solid var(--line); color: #57534b; font-size: 13px; }
.preference-switch input { position: absolute; opacity: 0; pointer-events: none; }
.preference-switch .switch { flex: 0 0 46px; }
.marker-columns { padding-bottom: 0; }
.marker-column-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 13px; min-height: 46px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.marker-column-group b { flex: 0 0 73px; color: #57534b; font-size: 12px; }
.marker-column-group label { display: inline-flex; align-items: center; gap: 4px; }
.marker-column-group input { accent-color: var(--gold); }
.rule-panel { margin-bottom: 12px; }
.rule-definition-list { display: grid; gap: 7px; }
.rule-definition { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.rule-definition[open] { border-color: #d8c49b; box-shadow: 0 4px 14px rgba(72,58,35,.05); }
.rule-definition summary { display: grid; grid-template-columns: 29px minmax(0, 1fr) auto 18px; align-items: center; gap: 9px; min-height: 59px; padding: 9px 11px; cursor: pointer; list-style: none; }
.rule-definition summary::-webkit-details-marker { display: none; }
.rule-index { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; background: var(--gold-pale); color: var(--gold-dark); font-family: "STKaiti", "KaiTi", serif; font-size: 14px; }
.rule-copy { min-width: 0; display: grid; gap: 3px; }
.rule-copy strong { color: #46433d; font-size: 13px; }
.rule-copy small { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.rule-toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-dark); font-size: 10px; white-space: nowrap; cursor: pointer; }
.rule-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.rule-toggle .switch { flex: 0 0 38px; width: 38px; height: 22px; background: #d4d0c8; border-radius: 999px; position: relative; transition: .2s; }
.rule-toggle .switch::after { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,.14); transition: .2s; }
.rule-toggle input:checked + .switch { background: var(--gold); }
.rule-toggle input:checked + .switch::after { transform: translateX(16px); }
.rule-chevron { width: 9px; height: 9px; border-right: 1.5px solid var(--gold-dark); border-bottom: 1.5px solid var(--gold-dark); transform: rotate(45deg); transition: transform .2s; }
.rule-definition[open] .rule-chevron { transform: rotate(225deg); }
.rule-body { padding: 0 14px 14px 49px; color: #625d54; font-size: 12px; line-height: 1.8; }
.rule-body p { margin: 0; }
.rule-impact { display: grid; grid-template-columns: 65px minmax(0, 1fr); gap: 9px; margin-top: 10px; padding: 9px 10px; border-left: 3px solid var(--gold); background: #f7f1e4; color: #6a604e; }
.rule-impact b { color: var(--gold-dark); font-size: 11px; }
.rule-method-panel { padding: 20px 18px; }
.rule-method-panel h2 { margin-bottom: 14px; color: var(--gold-dark); font-size: 18px; }
.analysis-pipeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: pipeline; }
.analysis-pipeline li { position: relative; display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 13px; padding: 12px 0 12px 35px; border-top: 1px solid var(--line); color: #625d54; font-size: 12px; line-height: 1.7; counter-increment: pipeline; }
.analysis-pipeline li::before { content: counter(pipeline, decimal-leading-zero); position: absolute; left: 0; top: 13px; color: var(--gold-dark); font-family: "STKaiti", "KaiTi", serif; font-size: 16px; }
.analysis-pipeline b { color: #4d4941; }
.analysis-pipeline span { color: #746e64; }
body.pref-no-pillar-colors .pillar-glyphs .element-wood, body.pref-no-pillar-colors .pillar-glyphs .element-fire, body.pref-no-pillar-colors .pillar-glyphs .element-earth, body.pref-no-pillar-colors .pillar-glyphs .element-metal, body.pref-no-pillar-colors .pillar-glyphs .element-water { color: var(--ink) !important; }
body.pref-no-hidden-colors .pillar-facts .hidden-char { color: inherit !important; }
body.pref-no-luck-colors .compact-table .element-wood, body.pref-no-luck-colors .compact-table .element-fire, body.pref-no-luck-colors .compact-table .element-earth, body.pref-no-luck-colors .compact-table .element-metal, body.pref-no-luck-colors .compact-table .element-water { color: inherit !important; }
body.pref-yinyang-font [data-yinyang="阳"] { font-style: normal; }
body.pref-yinyang-font [data-yinyang="阴"] { font-style: italic; }
body.pref-accessibility { --line: #c9c3b8; --muted: #5e5a52; }
body.pref-accessibility button:focus-visible, body.pref-accessibility select:focus-visible, body.pref-accessibility input:focus-visible { outline: 3px solid #4d6f9f; outline-offset: 2px; }
body.theme-dark { --paper: #20211f; --paper-deep: #2a2b28; --surface: #2b2c29; --ink: #f0ede4; --muted: #b8b3a8; --line: #494942; --gold: #d2ad68; --gold-dark: #e4c485; --gold-pale: #4b402e; --shadow: 0 12px 32px rgba(0,0,0,.2); }
body.theme-dark .topbar, body.theme-dark .bottom-nav { background: rgba(38,39,36,.96); }
body.theme-dark .records-switcher, body.theme-dark .profile-settings-tabs, body.theme-dark .preference-segment { background: #343530; }
body.theme-dark .member-card { background: linear-gradient(135deg, #343129, #2d2b27); border-color: #806a3d; }
body.theme-dark .member-quota-grid > div, body.theme-dark .membership-offer { background: #30312e; border-color: #5b503b; }
body.theme-dark .member-lock-card { background: #353128; border-color: #806a3d; }
body.theme-dark .member-compliance-top { background: #383329; }
body.theme-dark .preference-context, body.theme-dark .rule-impact, body.theme-dark .phone-equation, body.theme-dark .state-ribbon { background: #34332d; }
body.theme-dark .preference-context.active { background: var(--gold-pale); }
body.theme-dark .rule-copy strong, body.theme-dark .analysis-pipeline b, body.theme-dark .preference-row > label:first-child, body.theme-dark .preference-row > span:first-child, body.theme-dark .preference-switch, body.theme-dark .marker-column-group b { color: var(--ink); }
.group-settings { margin-top: 12px; padding-top: 18px; }
.group-settings-heading h2 { margin-bottom: 5px; color: var(--gold-dark); font-size: 17px; }
.group-settings-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.group-add-row { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 9px; padding: 13px 0 7px; }
.group-add-row input { min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: #faf9f6; color: var(--ink); }
.group-add-row input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(177,141,79,.12); }
.group-add-row .outline-button { min-height: 42px; margin: 0; padding: 0 9px; font-size: 13px; }
.custom-groups-list { display: grid; gap: 0; }
.custom-group-row { display: flex; align-items: center; justify-content: space-between; min-height: 45px; border-top: 1px solid var(--line); color: #5f5a52; font-size: 13px; }
.custom-group-delete { width: 32px; height: 32px; color: #a84e42; font-size: 21px; }
.custom-group-delete:hover { background: #f7e9e6; }
.group-empty { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.favorite-entry-panel { margin-top: 12px; }
.favorite-phones-panel { margin-top: 12px; padding: 18px 16px 8px; }
.favorite-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; }
.favorite-panel-heading h2 { color: var(--gold-dark); font-size: 18px; }
.favorite-panel-heading .icon-button { flex: 0 0 36px; width: 36px; height: 36px; font-size: 24px; }
.favorite-phones-list { display: grid; gap: 0; }
.favorite-phone-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.favorite-phone-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
.favorite-phone-copy strong { color: var(--ink); font-size: 16px; letter-spacing: .04em; }
.favorite-phone-copy small { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.favorite-phone-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.favorite-phone-actions .outline-button { width: auto; min-height: 36px; padding: 0 10px; font-size: 12px; }
.favorite-phone-actions .icon-button { width: 32px; height: 32px; color: #a84e42; font-size: 21px; }
.phone-panel { padding: clamp(20px, 4vw, 40px); }
.phone-picker-entry { width: auto; min-width: 128px; margin-top: 14px; padding: 0 20px; }
.subview-header { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 20px 0 12px; }
.subview-header h1 { margin: 0; font-size: 27px; }
.subview-header .eyebrow { margin-bottom: 4px; }
.subview-mark { padding: 5px 9px; border: 1px solid #d9c59e; border-radius: 6px; background: var(--gold-pale); color: var(--gold-dark); font-size: 11px; }
.picker-intro { margin: 0 2px 16px; font-size: 13px; line-height: 1.75; }
.phone-picker-panel { padding-bottom: clamp(24px, 4vw, 40px); }
.picker-number-field { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.picker-number-field > label { display: block; margin-bottom: 10px; color: var(--ink); font-size: 18px; font-weight: 500; }
.picker-number-field textarea { display: block; width: 100%; min-height: 190px; resize: vertical; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #faf9f6; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.7; }
.picker-number-field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(177,141,79,.12); }
.picker-parse-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.picker-parse-row .outline-button { width: auto; min-width: 108px; min-height: 40px; padding: 0 14px; font-size: 13px; }
.picker-parse-row span { color: var(--muted); font-size: 12px; }
.picker-error { margin: 9px 0 0; }
.picker-results { display: grid; gap: 12px; padding: 18px 0 42px; }
.picker-results-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .8fr); gap: 16px; padding: 20px; }
.picker-results-summary h2 { margin-bottom: 7px; color: var(--gold-dark); font-size: 20px; }
.picker-results-summary p { margin: 0; color: #6f6a61; font-size: 13px; line-height: 1.75; }
.picker-results-summary dl { display: grid; gap: 8px; margin: 0; padding-left: 16px; border-left: 1px solid var(--line); }
.picker-results-summary dl div { display: grid; grid-template-columns: 68px 1fr; gap: 8px; align-items: baseline; font-size: 12px; }
.picker-results-summary dt { color: var(--muted); }
.picker-results-summary dd { margin: 0; color: #555149; line-height: 1.6; }
.picker-result-list { display: grid; gap: 9px; }
.picker-result-card { display: flex; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 5px 14px rgba(72,58,35,.04); }
.picker-result-rank { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--gold-pale); color: var(--gold-dark); font-family: "STKaiti", "KaiTi", serif; font-size: 17px; }
.picker-result-main { flex: 1; min-width: 0; }
.picker-result-number { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.picker-result-number strong { color: var(--ink); font-size: 18px; letter-spacing: .04em; }
.picker-result-number span { color: var(--gold-dark); font-size: 12px; white-space: nowrap; }
.picker-result-score { display: flex; align-items: baseline; gap: 7px; margin-top: 6px; }
.picker-result-score b { color: var(--gold-dark); font-size: 25px; font-weight: 600; }
.picker-result-score small { font-size: 11px; }
.picker-result-score em { margin-left: 5px; color: #8b857b; font-size: 11px; font-style: normal; }
.picker-result-meta { margin-top: 8px; color: #747067; font-size: 11px; }
.picker-result-dimensions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 7px; }
.picker-result-dimensions span { display: grid; gap: 2px; padding: 5px 4px; border-radius: 6px; background: #f3efe7; text-align: center; }
.picker-result-dimensions b { color: var(--gold-dark); font-size: 10px; font-weight: 500; }
.picker-result-dimensions span { font-size: 11px; }
.picker-result-open { width: auto; min-height: 39px; margin-top: 10px; padding: 0 13px; font-size: 12px; }
.picker-result-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.picker-result-actions .picker-result-open, .picker-result-actions .picker-favorite-button { margin-top: 0; }
.picker-result-actions .picker-favorite-button { width: auto; min-height: 39px; padding: 0 13px; font-size: 12px; }
.picker-result-actions .picker-favorite-button.is-favorite { border-color: #d9c59e; background: var(--gold-pale); color: var(--gold-dark); }
.year-marker { display: inline-block; width: 6px; height: 6px; margin-left: 3px; vertical-align: middle; border-radius: 50%; }
.marker-gray { background: #99968f; }
.marker-green { background: #4eaa62; }
.marker-red { background: #d0574c; }
.picker-reset { width: 100%; }
.picker-dialog { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 18px; background: rgba(38,37,33,.48); }
.picker-dialog[hidden] { display: none !important; }
.picker-dialog-card { width: min(100%, 440px); padding: 24px; border: 1px solid #d9c59e; border-radius: 16px; background: var(--surface); box-shadow: 0 18px 50px rgba(30,26,18,.2); }
.picker-dialog-icon { width: 31px; height: 31px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 50%; background: var(--gold-pale); color: var(--gold-dark); font-size: 16px; }
.picker-dialog-card h2 { margin-bottom: 9px; color: var(--gold-dark); font-size: 20px; }
.picker-dialog-card p { margin: 0; color: #5f5b53; font-size: 13px; line-height: 1.9; }
.picker-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; }
.picker-dialog-actions .primary-button, .picker-dialog-actions .outline-button { min-height: 46px; font-size: 13px; letter-spacing: 0; }
.service-dialog { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 18px; background: rgba(38,37,33,.48); }
.service-dialog[hidden] { display: none !important; }
.service-dialog-card { position: relative; width: min(100%, 440px); padding: 24px; border: 1px solid #d9c59e; border-radius: 16px; background: var(--surface); box-shadow: 0 18px 50px rgba(30,26,18,.2); }
.service-dialog-card h2 { margin-bottom: 9px; color: var(--gold-dark); font-size: 20px; }
.service-dialog-close { position: absolute; top: 12px; right: 12px; }
.service-dialog-intro { margin: 0; color: #5f5b53; font-size: 13px; line-height: 1.8; }
.service-faq { display: grid; gap: 0; margin-top: 13px; border-top: 1px solid var(--line); }
.service-faq div { display: grid; gap: 3px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.service-faq b { color: #4d4941; font-size: 13px; }
.service-faq span { color: var(--muted); font-size: 12px; line-height: 1.7; }
.feedback-text { display: block; width: 100%; min-height: 125px; margin-top: 14px; padding: 10px 11px; resize: vertical; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #faf9f6; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.7; }
.feedback-text:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(177,141,79,.12); }
.service-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; }
.service-dialog-actions .primary-button, .service-dialog-actions .outline-button { min-height: 46px; font-size: 13px; letter-spacing: 0; }
.dialog-open { overflow: hidden; }
.phone-calendar-field { padding: 20px 0; border-bottom: 1px solid var(--line); }
.phone-calendar-field legend { margin-bottom: 12px; }
.form-error { margin: 8px 0 0 133px; color: #a64d3a; font-size: 13px; }
.phone-hint { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.phone-disclaimer { color: #89847b; font-size: 11px; line-height: 1.7; }
.phone-disclaimer-top { margin: 18px 0 16px; padding: 10px 12px; border-left: 3px solid var(--gold); background: #f7f1e4; }
.phone-result { display: grid; gap: 14px; padding: 18px 0 42px; }
.phone-report { padding: 18px; }
.phone-report h2 { color: var(--gold-dark); font-size: 18px; margin-bottom: 11px; }
.phone-report h3 { color: var(--gold-dark); font-size: 15px; margin-bottom: 8px; }
.phone-birth-context { margin: 14px 0 16px; padding: 14px 0 0; border-top: 1px solid var(--line); }
.phone-birth-context-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.phone-birth-context-head h3 { margin: 0; font-size: 15px; }
.phone-birth-context-head span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.phone-birth-meta { margin: 6px 0 0; color: #68645c; font-size: 12px; line-height: 1.7; }
.phone-birth-meta strong { color: var(--ink); font-weight: 600; }
.phone-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 11px; }
.phone-pillar { display: grid; justify-items: center; gap: 2px; padding: 7px 4px; border: 1px solid var(--line); border-radius: 8px; background: #faf9f6; }
.phone-pillar b { color: var(--gold-dark); font-family: "STKaiti", "KaiTi", serif; font-size: 17px; font-weight: 600; }
.phone-pillar small { color: var(--muted); font-size: 10px; }
.phone-style { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.phone-style strong { color: var(--gold-dark); font-size: 18px; }
.phone-style small { white-space: nowrap; color: #8a857c; }
.phone-copy { margin: 12px 0 0; color: #5f5b53; font-size: 13px; line-height: 1.85; }
.phone-suggestion { margin-top: 14px; padding: 12px; border-radius: 10px; background: #f5f1e8; color: #696359; font-size: 13px; line-height: 1.75; }
.phone-unlock { margin-top: 16px; }
.phone-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.phone-score { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f6; }
.phone-score span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.phone-score strong { color: var(--gold-dark); font-size: 23px; font-weight: 600; }
.phone-score em { margin-left: 5px; color: #777168; font-size: 12px; font-style: normal; }
.phone-grade-note { margin: 12px 0 0; color: #5f5b53; font-size: 13px; line-height: 1.8; }
.phone-phase-list { display: grid; gap: 11px; margin-top: 13px; }
.phone-phase { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #faf9f6; }
.phone-phase-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.phone-phase-head strong { color: var(--ink); font-size: 15px; }
.phone-phase-head span { color: var(--gold-dark); font-size: 12px; white-space: nowrap; }
.phone-equations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.phone-equation { padding: 7px 8px; border-radius: 7px; background: #f1ede4; color: #615d55; font-size: 12px; }
.phone-score-method { margin: -4px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.phone-phase-copy { margin: 0; color: #605c54; font-size: 13px; line-height: 1.8; }
.phone-advice { margin: 0; padding-left: 19px; color: #605c54; font-size: 13px; line-height: 1.8; }
.phone-advice li + li { margin-top: 5px; }
.phone-disclaimer-bottom { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.hidden { display: none !important; }
.bottom-nav { position: fixed; z-index: 30; bottom: 0; left: 50%; width: min(calc(100% - 22px), 1100px); min-height: 74px; padding: 7px 0 max(7px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(255,253,250,.97); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; display: grid; grid-template-columns: repeat(4,1fr); box-shadow: 0 -8px 24px rgba(72,58,35,.06); backdrop-filter: blur(18px); }
.bottom-nav-item { border: 0; background: transparent; color: #aaa59e; display: grid; place-items: center; gap: 2px; font-size: 22px; }
.bottom-nav-item small { color: inherit; font-size: 11px; }
.bottom-nav-item.active { color: var(--gold); }
@media (min-width: 720px) {
  .result-tab-panel { padding-bottom: 60px; }
}
@media (max-width: 520px) {
  .view { padding-top: 22px; }
  .result-tab { font-size: 13px; }
  .records-switch { font-size: 12px; }
  .info-groups { grid-template-columns: 1fr; }
  .info-group:last-child { grid-column: auto; }
  .pillar-grid, .shensha-pillar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase-radar-grid { grid-template-columns: 1fr; }
  .professional-lead-grid { grid-template-columns: 1fr; }
  .professional-lead-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .professional-lead-grid > div:last-child { border-bottom: 0; }
  .professional-lead-header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .analysis-guide { grid-template-columns: 1fr; gap: 4px; }
  .analysis-guide small { justify-self: start; }
  .analysis-summary-copy small { white-space: normal; }
  .analysis-body { padding: 2px 14px 16px; }
  .analysis-angle { grid-template-columns: 1fr; gap: 4px; padding: 11px 0; }
  .shensha-period-grid { grid-template-columns: 1fr; }
  .section-note { margin-left: 0; }
  .phone-panel .field-row { min-height: 55px; }
  .phone-panel .phone-calendar-field { padding: 14px 0; }
  .subview-header { padding-top: 15px; }
  .subview-header h1 { font-size: 24px; }
  .picker-intro { margin-left: 0; margin-right: 0; }
  .picker-results-summary { grid-template-columns: 1fr; gap: 13px; }
  .picker-results-summary dl { padding-left: 0; padding-top: 12px; border-top: 1px solid var(--line); border-left: 0; }
  .picker-result-number { display: grid; gap: 4px; }
  .picker-result-number span { white-space: normal; }
  .picker-dialog-card { padding: 20px; }
  .split-row { grid-template-columns: 1fr; gap: 17px; }
  .calendar-segment span { font-size: 13px; }
  .field-row { grid-template-columns: 90px 1fr; gap: 10px; }
  .field-row label, .segmented-field legend { font-size: 16px; }
  .instant-content { display: block; }
  .instant-meta { text-align: left; margin-top: 12px; }
  .mini-pillars { justify-content: space-between; }
  .detail-grid, .locked-grid { grid-template-columns: 1fr; }
  .locked-card.wide { grid-column: auto; }
  .solar-terms { grid-template-columns: repeat(2,1fr); }
  .result-header { padding-top: 15px; }
  .record-row { align-items: flex-start; }
  .record-pillars { white-space: normal; text-align: right; font-size: 13px; max-width: 100px; }
  .member-quota-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-lock-card { grid-template-columns: auto 1fr; }
  .member-lock-card .outline-button { grid-column: 1 / -1; width: 100%; }
  .membership-offer small { max-width: 210px; }
  .luck-analysis li { grid-template-columns: 1fr; gap: 3px; }
  .form-error { margin-left: 100px; }
  .phone-overview, .phone-equations { grid-template-columns: 1fr; }
  .phone-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-style { align-items: flex-start; flex-direction: column; gap: 5px; }
  .favorite-phone-row { align-items: flex-start; flex-direction: column; }
  .favorite-phone-actions { width: 100%; justify-content: flex-end; }
  .profile-settings-tab { font-size: 12px; }
  .preference-row { grid-template-columns: 1fr; gap: 5px; padding: 9px 0; }
  .preference-segment { width: 100%; }
  .rule-definition summary { grid-template-columns: 27px minmax(0, 1fr) auto 14px; gap: 7px; }
  .rule-copy small { white-space: normal; }
  .rule-body { padding-left: 14px; }
  .analysis-pipeline li { grid-template-columns: 1fr; gap: 2px; padding-left: 35px; }
}
@media (max-width: 380px) {
  .pillar-grid, .shensha-pillar-grid { grid-template-columns: 1fr; }
  .shensha-row-card { grid-template-columns: 1fr; }
}
