/* =====================================================================
 * 玄机罗盘 · 基础样式（对外获客页）
 * ===================================================================== */

:root {
  --ink: #0a0c11;
  --panel: #141822;
  --panel-2: #1a1f2b;
  --line: rgba(198, 166, 100, .20);
  --line-soft: rgba(255, 255, 255, .07);
  --gold: #c6a664;
  --gold-2: #e6d5a8;
  --text: #e9e7e2;
  --muted: #8e94a3;
  --danger: #c9614f;
  --ok: #6aa87c;
  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }

/* hidden 属性必须能压过组件自身的 display 声明，否则隐藏元素仍会挡点击 */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--ink);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  background-image:
    radial-gradient(900px 500px at 50% -10%, rgba(198, 166, 100, .10), transparent 70%),
    radial-gradient(600px 400px at 90% 20%, rgba(120, 90, 200, .05), transparent 70%);
  background-attachment: fixed;
}

.wrap { width: min(760px, 100%); margin: 0 auto; padding: 0 18px; }

/* ---------- 顶栏 ---------- */
.topbar {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 12, 17, .82);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: grid; place-items: center;
  border: 1px solid var(--gold); border-radius: 7px;
  color: var(--gold-2); font-family: var(--serif); font-size: 16px;
  background: linear-gradient(160deg, rgba(198,166,100,.16), transparent);
}
.logo-text { font-family: var(--serif); font-size: 17px; letter-spacing: .06em; color: var(--gold-2); }
.topbar-tip { font-size: 12px; color: var(--muted); letter-spacing: .08em; }

/* ---------- 首屏 ---------- */
.hero { padding: 46px 0 8px; }
.hero-title {
  font-family: var(--serif); font-size: 30px; line-height: 1.35;
  margin: 0 0 10px; letter-spacing: .05em;
  background: linear-gradient(120deg, #fff 10%, var(--gold-2) 55%, var(--gold) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); margin: 0 0 26px; font-size: 14.5px; }

/* ---------- 面板 ---------- */
.panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 18px;
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .9);
}
.panel-title {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  margin: 0 0 18px; color: var(--gold-2); letter-spacing: .06em;
  display: flex; align-items: center; gap: 9px;
}
.panel-title::before {
  content: ''; width: 3px; height: 15px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}

/* ---------- 表单 ---------- */
.field { margin-bottom: 17px; }
.field > label {
  display: block; font-size: 13.5px; color: var(--muted);
  margin-bottom: 8px; letter-spacing: .04em;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.opt { color: #616776; font-size: 12px; }
.req {
  font-size: 11px; color: var(--gold); border: 1px solid var(--line);
  padding: 0 5px; border-radius: 4px; margin-left: 6px; letter-spacing: .05em;
}

input[type=text], input[type=tel], input[type=number],
input[type=date], input[type=time], select {
  width: 100%; padding: 12px 13px;
  background: rgba(0, 0, 0, .34);
  border: 1px solid var(--line-soft); border-radius: 10px;
  color: var(--text); font-size: 15px; font-family: var(--sans);
  outline: none; transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 21px, calc(100% - 12px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
input:focus, select:focus {
  border-color: rgba(198, 166, 100, .55);
  box-shadow: 0 0 0 3px rgba(198, 166, 100, .10);
}
input[type=date], input[type=time] { color-scheme: dark; }

.seg {
  display: flex; background: rgba(0, 0, 0, .34);
  border: 1px solid var(--line-soft); border-radius: 10px; padding: 3px;
}
.seg-item {
  flex: 1; padding: 9px 0; text-align: center; cursor: pointer;
  background: none; border: 0; color: var(--muted);
  font-size: 14.5px; font-family: var(--sans); border-radius: 7px;
  transition: all .16s;
}
.seg-item.active {
  background: linear-gradient(180deg, rgba(198,166,100,.24), rgba(198,166,100,.10));
  color: var(--gold-2);
  box-shadow: inset 0 0 0 1px rgba(198,166,100,.35);
}

.city-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.lng-manual { margin-top: 9px; }

.quick-time { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.qt-chip {
  font-size: 12px; padding: 5px 9px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--line-soft); color: var(--muted);
  background: rgba(0,0,0,.22); transition: all .15s; font-family: var(--sans);
}
.qt-chip:hover { border-color: rgba(198,166,100,.45); color: var(--gold-2); }

.hint { font-size: 12.5px; color: #6c7280; margin: 9px 0 0; line-height: 1.65; }
.hint.center { text-align: center; }

.advanced { margin: 4px 0 18px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.advanced summary {
  cursor: pointer; font-size: 13px; color: var(--muted);
  list-style: none; user-select: none;
}
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: '▸ '; color: var(--gold); }
.advanced[open] summary::before { content: '▾ '; }
.adv-body { padding-top: 14px; }
.check {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 13.5px; color: var(--muted); margin-bottom: 12px; cursor: pointer;
}
.check input { width: 16px; height: 16px; margin-top: 4px; accent-color: var(--gold); flex: 0 0 16px; }
.check em { font-style: normal; color: #5d6371; font-size: 12px; }

.btn-primary {
  width: 100%; padding: 14px; border: 0; border-radius: 11px; cursor: pointer;
  font-size: 16px; font-family: var(--serif); letter-spacing: .12em; font-weight: 600;
  color: #1a1408;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 60%, #a8873f);
  box-shadow: 0 10px 26px -12px rgba(198, 166, 100, .75);
  transition: transform .14s, box-shadow .14s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(198,166,100,.9); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }

.btn-ghost {
  padding: 10px 14px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid var(--line-soft);
  color: var(--muted); font-size: 13.5px; font-family: var(--sans);
  transition: all .15s; white-space: nowrap;
}
.btn-ghost:hover { border-color: rgba(198,166,100,.45); color: var(--gold-2); }
.btn-mini {
  padding: 2px 8px; border-radius: 6px; cursor: pointer; margin-left: 6px;
  background: rgba(198,166,100,.13); border: 1px solid rgba(198,166,100,.3);
  color: var(--gold-2); font-size: 11.5px; font-family: var(--sans);
}

.form-note { font-size: 12px; color: #5d6371; text-align: center; margin: 13px 0 0; }

/* ---------- 结果 ---------- */
.result { padding: 34px 0 20px; }
.result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.result-head h2 {
  font-family: var(--serif); font-size: 21px; margin: 0;
  color: var(--gold-2); letter-spacing: .06em;
}

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px 18px; }
.info-item { display: flex; gap: 9px; font-size: 13.5px; align-items: baseline; }
.info-item .k { color: var(--muted); flex: 0 0 62px; font-size: 12.5px; }
.info-item .v { color: var(--text); }
.info-item .v em { font-style: normal; color: var(--gold-2); }

/* 四柱表 */
.pillars-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pillars { border-collapse: collapse; width: 100%; min-width: 340px; }
.pillars th, .pillars td {
  border: 1px solid var(--line-soft); padding: 9px 6px;
  text-align: center; font-size: 14px;
}
.pillars th {
  background: rgba(198,166,100,.07); color: var(--muted);
  font-weight: 400; font-size: 12.5px; letter-spacing: .05em;
}
.pillars th.rowhead {
  width: 54px; background: rgba(0,0,0,.24); font-size: 12px;
}
.pillars td.gan, .pillars td.zhi {
  font-family: var(--serif); font-size: 21px; padding: 11px 6px;
}
.pillars td.gan { color: var(--gold-2); }
.pillars td.zhi { color: #a9c6e8; }
.pillars td.day-master { position: relative; }
.pillars td.day-master::after {
  content: '日主'; position: absolute; top: 3px; right: 4px;
  font-size: 9.5px; color: var(--gold); opacity: .8; font-family: var(--sans);
}
.pillars td.hide-gan { font-size: 13px; color: #9aa1b0; letter-spacing: .05em; }
.pillars td.ss { font-size: 12.5px; color: #8b93a4; }
.pillars td.nayin { font-size: 12px; color: #7d8494; }
.wuxing-tag {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 11.5px; font-family: var(--sans);
}
.wx-木 { background: rgba(106,168,124,.18); color: #8fd0a4; }
.wx-火 { background: rgba(201,97,79,.18); color: #f0957f; }
.wx-土 { background: rgba(198,166,100,.18); color: #ddc182; }
.wx-金 { background: rgba(200,205,215,.16); color: #d5dae4; }
.wx-水 { background: rgba(90,130,200,.18); color: #9dbdf0; }

/* 五行条 */
.wuxing-bars { display: grid; gap: 11px; }
.wx-row { display: grid; grid-template-columns: 46px 1fr 58px; align-items: center; gap: 11px; }
.wx-name { font-family: var(--serif); font-size: 16px; }
.wx-track { height: 9px; background: rgba(0,0,0,.38); border-radius: 5px; overflow: hidden; }
.wx-fill { height: 100%; border-radius: 5px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.fill-木 { background: linear-gradient(90deg, #4d7d5c, #7bc190); }
.fill-火 { background: linear-gradient(90deg, #96382a, #e0705a); }
.fill-土 { background: linear-gradient(90deg, #8a7433, #d4b768); }
.fill-金 { background: linear-gradient(90deg, #7d838f, #dde2ea); }
.fill-水 { background: linear-gradient(90deg, #34568f, #7ba3e0); }
.wx-pct { font-size: 12.5px; color: var(--muted); text-align: right; }

.wuxing-summary { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-soft); }
.judge-note {
  margin: 14px 0 0; padding: 11px 13px; border-radius: 9px;
  background: rgba(198,166,100,.07); border-left: 2px solid rgba(198,166,100,.5);
  font-size: 13px; color: #b9bec9; line-height: 1.75;
}
.summary-line { font-size: 13.5px; margin-bottom: 9px; display: flex; gap: 9px; align-items: baseline; }
.summary-line .k { color: var(--muted); flex: 0 0 74px; font-size: 12.5px; }
.verdict {
  display: inline-block; padding: 2px 11px; border-radius: 20px;
  font-size: 13px; font-family: var(--serif);
  border: 1px solid rgba(198,166,100,.4); color: var(--gold-2);
  background: rgba(198,166,100,.11);
}

/* 十神网格 */
.shishen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; }
.ss-cell {
  border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 10px 8px; text-align: center; background: rgba(0,0,0,.2);
}
.ss-cell .pos { font-size: 11px; color: #666c7a; }
.ss-cell .name { font-family: var(--serif); font-size: 15px; color: var(--gold-2); margin-top: 3px; }
.ss-cell .cnt { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* 大运 */
.yun-head { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.yun-head strong { color: var(--gold-2); font-weight: 500; }
.yun-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -20px; padding: 0 20px 8px; }
.yun-track { display: flex; gap: 8px; min-width: min-content; }
.yun-cell {
  min-width: 66px; text-align: center; padding: 11px 6px;
  border: 1px solid var(--line-soft); border-radius: 10px;
  background: rgba(0,0,0,.22);
}
.yun-cell.current {
  border-color: rgba(198,166,100,.6);
  background: linear-gradient(180deg, rgba(198,166,100,.19), rgba(198,166,100,.05));
  box-shadow: 0 0 18px -6px rgba(198,166,100,.5);
}
.yun-cell .age { font-size: 11px; color: #666c7a; }
.yun-cell .gz { font-family: var(--serif); font-size: 17px; color: var(--gold-2); margin: 3px 0; }
.yun-cell .yr { font-size: 10.5px; color: var(--muted); }

/* 锁定区 */
.lock-panel {
  position: relative; overflow: hidden;
  border-color: rgba(198,166,100,.30);
}
.lock-panel::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 30%, rgba(10,12,17,.4));
}
.lock-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  border: 1px solid rgba(198,166,100,.45); color: var(--gold);
  background: rgba(198,166,100,.1); letter-spacing: .08em;
}
.lock-list { list-style: none; padding: 0; margin: 0; }
.lock-list li {
  padding: 11px 0 11px 30px; position: relative;
  border-bottom: 1px dashed var(--line-soft); font-size: 14px; color: #b9bec9;
}
.lock-list li:last-child { border-bottom: 0; }
.lock-list li::before {
  content: '🔒'; position: absolute; left: 2px; top: 11px; font-size: 13px; opacity: .75;
}
.lock-note { font-size: 13px; color: var(--gold); margin: 16px 0 0; position: relative; z-index: 1; }

/* CTA */
.cta-panel {
  border-color: rgba(198,166,100,.42);
  background: linear-gradient(180deg, rgba(198,166,100,.09), var(--panel-2));
  text-align: center;
}
.cta-title {
  font-family: var(--serif); font-size: 20px; margin: 0 0 10px;
  color: var(--gold-2); letter-spacing: .06em;
}
.cta-note { font-size: 13.5px; color: var(--muted); margin: 0 0 20px; }

.qr-box {
  width: 186px; height: 186px; margin: 0 auto 16px;
  border-radius: 14px; overflow: hidden; position: relative;
  background: #f4f1ea; padding: 8px;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-placeholder {
  position: absolute; inset: 8px; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #e9e5db, #e9e5db 8px, #e2ddd1 8px, #e2ddd1 16px);
  border-radius: 8px; color: #6b6355; text-align: center;
}
.qr-ph-inner { display: grid; gap: 3px; font-size: 11.5px; line-height: 1.5; }
.qr-ph-inner strong { font-size: 13px; color: #4a4436; }
.qr-ph-inner code { background: rgba(0,0,0,.1); padding: 0 4px; border-radius: 3px; font-size: 11px; }

.wechat-id { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.wechat-id strong { color: var(--gold-2); font-size: 15px; letter-spacing: .04em; }

.profile-code {
  margin-top: 16px; padding: 13px 14px; border-radius: 10px;
  background: rgba(0,0,0,.4); border: 1px dashed var(--line);
  font-size: 12.5px; color: var(--muted); text-align: left;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  line-height: 1.75; word-break: break-all; display: none;
}
.profile-code.show { display: block; }
.profile-code .pc-no { color: var(--gold-2); font-size: 14px; letter-spacing: .08em; }
.profile-code .pc-raw {
  margin-top: 9px; padding: 9px 10px; border-radius: 7px;
  background: rgba(0,0,0,.34); max-height: 108px; overflow: auto;
  color: #7f8694; font-size: 11.5px; line-height: 1.6; word-break: break-all;
}

.contact-box {
  margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--line-soft);
  text-align: left;
}
.contact-label { font-size: 13px; color: var(--muted); margin: 0 0 11px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }

.disclaimer { font-size: 11.5px; color: #545a67; line-height: 1.8; text-align: center; padding: 8px 0 30px; }

/* ---------- 命理知识内链区 ---------- */
.content-nav { padding: 10px 0 46px; }
.cn-title {
  font-family: var(--serif); font-size: 21px; color: var(--gold-2);
  margin: 0 0 8px; letter-spacing: .05em;
}
.cn-sub { font-size: 13.5px; color: var(--muted); margin: 0 0 20px; }
.cn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cn-card {
  display: block; text-decoration: none; padding: 16px 17px;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  transition: all .17s;
}
.cn-card:hover { border-color: rgba(198,166,100,.5); transform: translateY(-2px); }
.cn-card .cn-k {
  display: inline-block; font-size: 11px; color: var(--gold);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 0 6px; margin-bottom: 9px; letter-spacing: .06em;
}
.cn-card h3 {
  font-family: var(--serif); font-size: 15.5px; color: var(--text);
  margin: 0 0 7px; font-weight: 600; line-height: 1.5;
}
.cn-card p { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.7; }

.footer {
  border-top: 1px solid var(--line-soft); padding: 22px 0;
  text-align: center; font-size: 12px; color: #545a67;
}

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 24px);
  background: rgba(23, 27, 36, .97); border: 1px solid rgba(198,166,100,.45);
  color: var(--gold-2); padding: 11px 22px; border-radius: 24px;
  font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: all .28s; z-index: 200; box-shadow: 0 14px 34px -14px #000;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 560px) {
  .hero { padding: 30px 0 8px; }
  .hero-title { font-size: 24px; }
  .panel { padding: 18px 15px; border-radius: 12px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .info-grid { grid-template-columns: 1fr; }
  .pillars th.rowhead { width: 44px; }
  .pillars th, .pillars td { padding: 7px 3px; font-size: 13px; }
  .pillars td.gan, .pillars td.zhi { font-size: 18px; padding: 9px 3px; }
  .contact-row { grid-template-columns: 1fr; }
  .topbar-tip { display: none; }
  .yun-scroll { margin: 0 -15px; padding: 0 15px 8px; }
}
