:root {
  --bg: #07110d;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-2: rgba(10, 17, 31, 0.9);
  --text: #f2ebd4;
  --muted: #9ba7a0;
  --gold: #c9a96b;
  --gold-2: #f0d79f;
  --line: rgba(201, 169, 107, 0.22);
  --accent: #7ec8a8;
  --accent-2: #5ab08a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(160deg, #0a0e1a 0%, #111827 40%, #0f1a2e 100%);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }

.topnav { margin-bottom: 10px; }
.topnav a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.topnav a:hover { color: var(--gold-2); border-color: rgba(201, 169, 107, 0.6); }

.page {
  max-width: 540px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

/* 桌面端自适应加宽 */
@media (min-width: 820px) {
  .page { max-width: 760px; }
}

.site-header { text-align: center; padding: 12px 8px 6px; }

.site-title {
  font-size: 1.9rem;
  letter-spacing: 0.12em;
  margin: 0 0 6px;
  background: linear-gradient(120deg, var(--gold-2), var(--gold), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(201, 169, 107, 0.25);
}

/* 网站标题 Logo */
.site-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 10px;
  box-shadow: 0 0 14px rgba(201, 169, 107, 0.4);
}

/* 所有下拉框深色 */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c9a96b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 12px !important;
  padding: 11px 10px !important;
  padding-right: 28px !important;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
}
select:hover { border-color: rgba(201, 169, 107, 0.6); }
select:focus { border-color: rgba(201, 169, 107, 0.7); background-color: rgba(255, 255, 255, 0.07); }
select option { background-color: #0d1a14; color: #f2ebd4; }
.dt-row { display: flex; gap: 6px; }
.dt-row select { flex: 1; min-width: 0; padding: 11px 6px !important; font-size: 0.9rem; }

.site-subtitle {
  color: var(--muted);
  letter-spacing: 0.16em;
  margin: 0;
  font-size: 0.88rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 20px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  margin-top: 20px;
}

.card-title {
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 6px;
  font-weight: 700;
}

.hint { color: var(--muted); font-size: 0.8rem; line-height: 1.6; margin: 4px 0 14px; }

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 0.84rem;
  color: var(--gold-2);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

input[type="text"], input[type="date"], input[type="time"], input[type="month"], textarea, select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

textarea { min-height: 72px; resize: vertical; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
  border-color: rgba(201, 169, 107, 0.7);
  background: rgba(255, 255, 255, 0.07);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator { filter: invert(0.85); }

.radio-row { display: flex; gap: 12px; }

.radio {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.radio input { display: none; }
.radio span { color: var(--muted); font-size: 0.95rem; }
.radio:has(input:checked) { border-color: rgba(201, 169, 107, 0.8); background: rgba(201, 169, 107, 0.14); }
.radio:has(input:checked) span { color: var(--gold-2); }

.place-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.place-row select { padding: 10px 6px; font-size: 0.86rem; }

.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0a0e1a;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.1em;
  transition: transform 0.2s ease, filter 0.2s ease;
  margin-top: 6px;
}

.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }
.btn:disabled { filter: grayscale(0.4); cursor: wait; }

.btn.gold { background: linear-gradient(135deg, #f0d79f 0%, #c9a96b 100%); }

.error { color: #ff9a8a; font-size: 0.85rem; margin: 12px 0 0; text-align: center; line-height: 1.5; }

/* 结果区 */
.result-head { text-align: center; padding-bottom: 14px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.result-title { font-size: 1.12rem; letter-spacing: 0.1em; color: var(--gold-2); font-weight: 700; margin-bottom: 6px; }
.solar-note { color: var(--muted); font-size: 0.76rem; letter-spacing: 0.04em; }

.type-badge {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 10px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(126, 200, 168, 0.25), rgba(90, 176, 138, 0.25));
  border: 1px solid rgba(126, 200, 168, 0.6);
  color: #8fd0aa;
  margin: 6px 0 12px;
}

.kv-row { display: flex; align-items: baseline; padding: 7px 0; gap: 10px; }
.kv-k { flex: 0 0 84px; color: var(--muted); font-size: 0.9rem; letter-spacing: 0.06em; }
.kv-v { color: var(--text); font-size: 0.95rem; line-height: 1.5; }
.kv-v.big { font-size: 1.1rem; letter-spacing: 0.12em; color: var(--gold-2); font-weight: 700; }

.section-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  margin-top: 14px;
}

.section-block h4 { margin: 0 0 6px; color: var(--gold-2); font-size: 0.92rem; letter-spacing: 0.1em; }
.section-block p { margin: 0; line-height: 1.85; font-size: 0.94rem; color: var(--text); }
.section-block ul { margin: 6px 0 0; padding-left: 18px; color: var(--text); line-height: 1.9; font-size: 0.92rem; }
.section-block .sub { color: var(--muted); font-size: 0.82rem; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.86rem; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; color: var(--text); line-height: 1.6; }
.tbl th { color: var(--gold-2); background: rgba(201, 169, 107, 0.08); font-weight: 700; }
.tbl td .tag { font-size: 0.8rem; padding: 1px 8px; border-radius: 999px; }
.tag.dajji { background: rgba(126, 200, 168, 0.3); color: #8fd0aa; }
.tag.ji { background: rgba(126, 200, 168, 0.2); color: #b7e0c8; }
.tag.ping { background: rgba(155, 167, 160, 0.25); color: #c8d0cb; }
.tag.shen { background: rgba(240, 215, 159, 0.25); color: #e6cf9a; }
.tag.ji2 { background: rgba(233, 130, 122, 0.3); color: #f0a79f; }

/* 问卷 */
.quiz { margin-top: 4px; }
.quiz-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: rgba(255,255,255,0.02); }
.quiz-item .q { color: var(--gold-2); font-size: 0.92rem; margin-bottom: 8px; font-weight: 600; }
.quiz-item label { display: block; color: var(--muted); font-size: 0.86rem; padding: 5px 0; cursor: pointer; line-height: 1.5; }
.quiz-item label input { margin-right: 6px; }
.quiz-item label.sel { color: var(--accent); }

/* 锁定遮罩 */
.lock-zone { position: relative; }
.lock-zone .lock-mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,17,31,0.15), rgba(10,17,31,0.92));
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  border-radius: 14px; padding: 18px;
  z-index: 2;
}

.unlock { margin-top: 20px; text-align: center; border-top: 1px dashed var(--line); padding-top: 16px; }
.unlock-title { color: var(--gold-2); margin: 0 0 4px; font-size: 0.95rem; letter-spacing: 0.04em; }
.unlock-sub { color: var(--muted); margin: 0; font-size: 0.78rem; }
.unlock-btn { margin-top: 14px; }

/* 支付弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 99;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: 360px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel-2); padding: 22px; text-align: center;
}
.modal h3 { color: var(--gold-2); margin: 0 0 6px; letter-spacing: 0.08em; }
.modal .price { font-size: 2rem; color: var(--gold-2); font-weight: 800; margin: 10px 0; }
.modal .price small { font-size: 1rem; color: var(--muted); }
.modal p { color: var(--muted); font-size: 0.84rem; line-height: 1.7; margin: 4px 0; }
.modal .btn-row { display: flex; gap: 10px; margin-top: 16px; }
.modal .btn { margin-top: 0; }
.modal .btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.kline { margin-top: 8px; }
.kline .kline-row { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; font-size: 0.78rem; color: var(--muted); }
.kline .kline-track { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.kline .kline-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 999px; }

.footer { text-align: center; color: rgba(155,167,160,0.6); font-size: 0.72rem; line-height: 1.7; margin-top: 22px; letter-spacing: 0.04em; }
.footer p { margin: 0; }

.ai-note { color: var(--accent); font-size: 0.76rem; margin-top: 8px; }

@media (max-width: 380px) {
  .place-row { grid-template-columns: 1fr; }
}
