/* 2027 运势测试 · 瑞士国际风
   纸白 #F4F3EF / 墨黑 #111 / 单一红 #E4322B / 灰两档；无圆角无阴影无渐变 */

:root {
  --paper: #F4F3EF;
  --ink: #111111;
  --red: #E4322B;
  --gray: #6E6E6E;
  --line: #111111;
  --soft: #D9D7D0;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}

a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--ink); }
a:hover { color: var(--red); border-color: var(--red); }

.red { color: var(--red); }

/* ---------- 头部 ---------- */

.masthead { max-width: var(--max); margin: 0 auto; padding: 24px 20px 0; }

.bar {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--line); padding-bottom: 10px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
}
.brand { font-weight: 700; }
.tag { color: var(--gray); }

.hero { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 28px 0 20px; }
.hero__year {
  font-size: clamp(96px, 20vw, 240px);
  line-height: 0.82;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.hero__copy { max-width: 560px; }
.kicker { margin: 0 0 4px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray); }
h1 { margin: 0 0 10px; font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.01em; }
.lede { margin: 0; color: #333; font-size: 15px; }

@media (min-width: 860px) {
  .hero { grid-template-columns: 1.2fr 0.8fr; align-items: end; }
  .hero__copy { padding-bottom: 14px; }
}

/* ---------- 面板 ---------- */

main { max-width: var(--max); margin: 0 auto; padding: 0 20px 40px; }

.panel { border-top: 1px solid var(--line); padding: 18px 0 26px; }

.ptitle {
  margin: 0 0 16px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  display: flex; gap: 10px; align-items: baseline;
}
.pnum { color: var(--red); font-weight: 800; }

/* ---------- 表单行 ---------- */

.row {
  display: grid; grid-template-columns: 88px 1fr; gap: 12px 16px;
  align-items: center; padding: 12px 0; border-bottom: 1px solid var(--soft);
}
.rlabel { font-size: 12px; letter-spacing: 0.12em; color: var(--gray); text-transform: uppercase; }

@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; gap: 8px; }
  .rlabel { padding-top: 2px; }
}

/* 分段选择 */
.seg { display: inline-flex; border: 1px solid var(--line); justify-self: start; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span {
  display: block; padding: 7px 22px; font-size: 14px; cursor: pointer;
  border-right: 1px solid var(--line); min-width: 64px; text-align: center;
}
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--red); outline-offset: -2px; }

/* ---------- 滚轮 ---------- */

.wheels {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  border-bottom: 1px solid var(--soft);
}
@media (max-width: 560px) {
  .wheels { grid-template-columns: repeat(5, 1fr); }
  .wheel__item { font-size: 15px; }
}

.wheel {
  position: relative; height: 198px; overflow-y: auto;
  scroll-snap-type: y mandatory; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wheel::-webkit-scrollbar { display: none; }
.wheel__pad { height: 81px; } /* (198-36)/2 */
.wheel__item {
  height: 36px; line-height: 36px; text-align: center;
  font-size: 17px; color: #8a8880;
  scroll-snap-align: center; scroll-snap-stop: always;
  transition: color 0.15s ease;
}
.wheel__item.is-on { color: var(--ink); font-weight: 700; }
.wheel__item.is-sub { font-size: 13px; color: var(--gray); }
.wheel::before, .wheel::after {
  content: ""; position: absolute; left: 0; right: 0; height: 60px; pointer-events: none; z-index: 1;
}
.wheel::before { top: 0; background: linear-gradient(var(--paper), rgba(244,243,239,0)); }
.wheel::after { bottom: 0; background: linear-gradient(rgba(244,243,239,0), var(--paper)); }
.wheel__band {
  position: absolute; left: 0; right: 0; top: 81px; height: 36px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  pointer-events: none; z-index: 0;
}
.wheel-wrap { position: relative; }
.wheel-wrap__cap {
  position: absolute; left: 0; right: 0; bottom: 4px; z-index: 2;
  text-align: center; font-size: 10px; letter-spacing: 0.14em; color: var(--gray);
  text-transform: uppercase;
}

.row--check { grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }

/* ---------- 下拉 ---------- */

.places { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .places { grid-template-columns: 1fr; } }

.select {
  width: 100%; padding: 8px 6px; font: inherit; font-size: 15px;
  color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--line);
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 49%, var(--ink) 50%), linear-gradient(-45deg, transparent 49%, var(--ink) 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  padding-right: 26px;
}
.select:focus { outline: none; border-bottom-color: var(--red); }
.select--inline { width: auto; min-width: 190px; }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-block; padding: 12px 28px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  font: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0.04em;
  cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
  min-height: 46px;
}
.btn:hover { background: var(--red); border-color: var(--red); }
.btn:disabled { background: transparent; color: var(--gray); border-color: var(--soft); cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--line { background: transparent; color: var(--ink); border-style: dashed; }
.btn--line:hover { background: var(--red); border-color: var(--red); color: var(--paper); border-style: solid; }

.submit { display: flex; gap: 16px; align-items: center; padding-top: 18px; flex-wrap: wrap; }
.submit__note { font-size: 12px; color: var(--gray); letter-spacing: 0.08em; }

.hint { margin: 10px 0 0; font-size: 13px; color: var(--gray); }
.hint--strong { color: var(--red); font-weight: 600; }
.err { margin: 12px 0 0; color: var(--red); font-size: 14px; font-weight: 600; }

/* ---------- 四柱表 ---------- */

.chart { border-top: 1px solid var(--line); }
.chart__table { width: 100%; border-collapse: collapse; font-size: 15px; }
.chart__table th, .chart__table td {
  text-align: center; padding: 10px 4px; border-bottom: 1px solid var(--soft);
  border-right: 1px solid rgba(0,0,0,.06);
}
.chart__table th:last-child, .chart__table td:last-child { border-right: 0; }
.chart__table th { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray); font-weight: 600; }
.chart__table td.k { font-size: 12px; color: var(--gray); text-align: left; padding-left: 10px; white-space: nowrap; }
.chart__table td.gz { font-size: 22px; font-weight: 700; letter-spacing: 0.02em; }
.chart__table .wuxing { display: flex; gap: 3px; justify-content: center; }
.chart__table .wuxing i {
  display: block; height: 6px; width: 10px; background: var(--soft);
}
.chart__table .wuxing i.on { background: var(--red); }
.chart__note { margin: 8px 0 0; font-size: 13px; color: var(--gray); }
.wxline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: end; padding: 4px 8px 0; }
.wx { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wx i { display: block; width: 26px; opacity: .9; }
.wx b { font-size: 12px; font-weight: 700; }
.wx em { font-style: normal; font-size: 11px; color: var(--gray); }
.siglist { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 6px; font-size: 13px; color: #333; }
.siglist em { font-style: normal; color: var(--gray); font-size: 12px; }

/* ---------- 报告 ---------- */

.summary { border-top: 1px solid var(--line); padding: 14px 0 4px; display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.summary__score { font-size: clamp(84px, 14vw, 150px); line-height: 0.85; font-weight: 800; letter-spacing: -0.05em; }
.summary__score small { font-size: 0.22em; font-weight: 600; letter-spacing: 0.02em; color: var(--gray); margin-left: 8px; }
.summary__meta { padding-bottom: 8px; }
.summary__keynote { font-size: 18px; font-weight: 700; margin: 0; }
.summary__sub { margin: 4px 0 0; font-size: 13px; color: var(--gray); }

.dims { display: grid; gap: 10px; padding: 14px 0 6px; border-bottom: 1px solid var(--line); }
.dim { display: grid; grid-template-columns: 74px 1fr 44px; align-items: center; gap: 12px; }
.dim__name { font-size: 13px; color: var(--gray); letter-spacing: 0.08em; }
.dim__track { height: 10px; background: var(--soft); position: relative; }
.dim__fill { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.dim__fill.is-low { background: var(--red); }
.dim__val { font-size: 15px; font-weight: 700; text-align: right; }

.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; padding: 14px 0 8px; }
.months__head { grid-column: 1 / -1; margin: 0 0 4px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray); }
@media (max-width: 700px) { .months { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 560px) { .months { grid-template-columns: repeat(4, 1fr); gap: 8px 4px; } }
.month { text-align: center; font-size: 12px; color: var(--gray); }
.month__bar { height: 48px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 4px; }
.month__bar i { display: block; width: 10px; background: var(--soft); }
.month__bar i.hi { background: var(--ink); }
.month__bar i.lo { background: var(--red); }

.chapters { border-top: 1px solid var(--line); margin-top: 6px; }
.chapter { border-bottom: 1px solid var(--soft); }
.chapter__head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 0; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 600;
}
.chapter__head > span:first-child::before {
  content: "+"; display: inline-block; width: 18px; color: var(--red); font-weight: 800;
}
.chapter[open] > .chapter__head > span:first-child::before { content: "−"; }
.chapter__head::-webkit-details-marker { display: none; }
.chapter__state { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); }
.chapter__state.is-ok { color: var(--ink); }
.chapter__state.is-bad { color: var(--red); }
.chapter__body { padding: 4px 0 18px; }
.chapter__text { white-space: pre-wrap; font-size: 15px; line-height: 1.85; color: #222; max-width: 68ch; }
.chapter__text h4 { margin: 18px 0 6px; font-size: 15px; letter-spacing: 0.04em; }

.tail { padding: 18px 0 8px; border-top: 1px solid var(--line); }
.tail p { margin: 8px 0; font-size: 14px; color: #333; }
.tail p.tail__wechat { font-weight: 700; }

.share { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 0 0; }

/* ---------- 页脚 ---------- */

.foot { max-width: var(--max); margin: 0 auto; padding: 20px 20px 40px; border-top: 1px solid var(--line); font-size: 12px; color: var(--gray); }
.foot p { margin: 4px 0; }

/* ---------- 加载态 ---------- */

.spin { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--gray); border-top-color: var(--ink); border-radius: 50%; animation: sp 0.8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
