/* 排盘工具的外壳：出生信息表单页（宣纸 · 朱砂，与工具首页一致） */
@font-face { font-family: "LJ Brush"; src: url("../../fonts/brush.woff2") format("woff2"); font-display: swap; }
:root {
  --paper: #F5EFE3; --card: #FFFDF8; --line: #E2D3B6;
  --ink: #1B1A18; --ink-2: #3D3A35; --ink-3: #8A8276;
  --seal: #B8322A; --green: #2F6B45;
  --kai: "STKaiti", "KaiTi", "Kaiti SC", "楷体", serif;
  --sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --rpx: calc(min(100vw, 480px) / 750);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); }
[hidden] { display: none !important; }

.shell { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 0 14px 28px; }
.shell-top { display: flex; align-items: center; gap: 8px; height: 52px; }
.shell-back { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); text-decoration: none; font-size: 20px; }
.shell-back:active { background: #EFE6D4; }
.shell-title { flex: 1; font: 700 20px/1 var(--kai); letter-spacing: 2px; }
.shell-brand { font: 18px/1 "LJ Brush", var(--kai); color: var(--ink-3); text-decoration: none; }

.intro { margin: 4px 2px 14px; color: var(--ink-3); font: 14px/1.6 var(--kai); }

/* 表单 */
.bf { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px 16px; }
.bf-row { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px dashed #EADFC9; padding: 6px 0; }
.bf-row:last-of-type { border-bottom: 0; }
.bf-label { flex: none; width: 4.6em; font: 600 15px/1.3 var(--kai); color: var(--ink-2); }
.bf-fields { flex: 1; display: flex; gap: 6px; min-width: 0; }
.bf-fields select { flex: 1; min-width: 0; }
.bf-place { flex-wrap: wrap; }
.bf-place select { flex: 1 1 30%; }
select {
  appearance: none; -webkit-appearance: none; height: 38px; padding: 0 22px 0 10px; border-radius: 8px;
  border: 1px solid var(--line); background: #FFFDF8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238A8276' stroke-width='1.5'/%3E%3C/svg%3E") right 8px center no-repeat;
  font: 14px var(--sans); color: var(--ink); text-overflow: ellipsis;
}
.bf-seg { display: inline-flex; background: #F1E8D6; border-radius: 99px; padding: 3px; }
.bf-seg button { border: 0; background: none; font: 15px var(--kai); color: var(--ink-2); padding: 6px 18px; border-radius: 99px; }
.bf-seg button.is-on { background: var(--seal); color: #FFF6EC; }
.bf-check { display: inline-flex; align-items: center; gap: 6px; font: 15px var(--kai); }
.bf-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.bf-switch input { position: absolute; opacity: 0; pointer-events: none; }
.bf-switch i { position: relative; width: 44px; height: 26px; border-radius: 99px; background: #D9CDB6; transition: background .2s; flex: none; }
.bf-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.bf-switch input:checked + i { background: var(--green); }
.bf-switch input:checked + i::after { transform: translateX(18px); }
.bf-switch input:disabled + i { opacity: .5; }
.bf-ts-text { font-style: normal; font-size: 12.5px; color: var(--ink-3); }
.bf-error { min-height: 1em; margin: 8px 0 0; color: var(--seal); font-size: 13px; }
.bf-submit { display: block; width: 100%; margin-top: 6px; height: 46px; border: 0; border-radius: 99px; background: linear-gradient(100deg, #A3201C, #B8322A 55%, #8E1A16); color: #FFF6EC; font: 700 17px var(--kai); letter-spacing: 3px; box-shadow: 0 4px 12px rgba(150,30,25,.2); }
.bf-submit:active { transform: scale(.98); }
.bf-note { margin: 10px 0 0; text-align: center; color: var(--ink-3); font-size: 12px; }

/* 盘面：小程序页面跑在 .mp-root 里，宽度限制在手机宽 */
.mp-root { position: relative; max-width: 480px; margin: 0 auto; min-height: 100vh; }
.mp-scroll-x { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.mp-scroll-y { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mp-root [role="button"] { cursor: pointer; }
@media (min-width: 520px) { body { background: #E9E1D1; } }
.mp-root a { text-decoration: none; color: inherit; }

/* ---------- 顶部标题栏 + 工具栏（网页自带） ---------- */
.bz-head { position: sticky; top: 0; z-index: 30; max-width: 480px; margin: 0 auto; background: rgba(245, 239, 227, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid #E2D3B6; }
.bz-head-row { display: flex; align-items: center; gap: 6px; height: 50px; padding: 0 10px 0 4px; }
.bz-head-back { width: 40px; height: 40px; border: 0; background: none; font-size: 24px; color: #1B1A18; border-radius: 50%; cursor: pointer; }
.bz-head-back:active { background: #EFE6D4; }
.bz-head-title { flex: 1; min-width: 0; }
.bz-head-title b { display: block; font: 700 18px/1.2 "STKaiti", "KaiTi", serif; letter-spacing: 2px; }
.bz-head-title small { display: block; font-size: 11.5px; color: #8A8276; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-head-home { flex: none; font: 15px/1 "LJ Brush", "STKaiti", serif; color: #8A8276; text-decoration: none; padding: 6px; }
.bz-tools { display: flex; gap: 8px; padding: 0 10px 10px; overflow-x: auto; scrollbar-width: none; }
.bz-tools::-webkit-scrollbar { display: none; }
.bz-tool { flex: 1 0 auto; justify-content: center; display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px; border-radius: 99px; border: 1px solid #E2D3B6; background: #FFFDF8; color: #3D3A35; font: 600 13.5px/1 "STKaiti", "KaiTi", serif; cursor: pointer; white-space: nowrap; }
.bz-tool svg { width: 16px; height: 16px; }
.bz-tool:active { transform: scale(.96); }
.bz-tool.is-primary { background: #B8322A; border-color: #B8322A; color: #FFF6EC; }


/* 宽屏（电脑）上盘面居中，与顶栏对齐 */
body .mp-root { margin-left: auto !important; margin-right: auto !important; width: 100% !important; max-width: 480px !important; box-shadow: 0 0 0 1px #E2D3B6; }

.bf-tip { margin: -4px 0 4px calc(4.6em + 10px); color: #8A8276; font-size: 12px; line-height: 1.5; }
.bf-seg[data-name="zi"] button { padding: 6px 12px; font-size: 14px; }
.bf-row:has(+ .bf-tip) { border-bottom: 0; }
