/* 八云前端（暗黑 · 素版） · 手机 / 平板 / 电脑。只管展示，不碰排盘口径。 */
:root {
  --bg: #0a0a0c;
  --bg2: #101014;
  --card: #141418;
  --card-solid: #141418;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --text: #e8e8ed;
  --muted: #8a8a96;
  --dim: #5c5c68;
  --accent: #3d7eff;
  --accent-hi: #5a92ff;
  --danger: #ff5d6c;
  --ok: #3ddc97;
  --wx-木: #3fcf72;
  --wx-火: #ff4f5e;
  --wx-土: #b98552;
  --wx-金: #e8c040;
  --wx-水: #4a7ae8;
  --r-lg: 14px;
  --r: 10px;
  --r-sm: 8px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --top-h: 56px;
  --tab-h: 58px;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", serif;
  --yun-age-gan-gap: 80px; /* 大运／流年「几岁↔天干」统一间隙 · 美术终值 80 */
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden; }
body {
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.spacer { flex: 1; }

/* 极淡网格 / 点阵 / 扫描线：科技感，克制，无艳色 */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 28%, #000 18%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 28%, #000 18%, transparent 78%);
}
.bg-dots {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .35;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 22%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 22%, #000 10%, transparent 70%);
}
.bg-scan {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(255,255,255,.012) 3px,
    rgba(255,255,255,.012) 4px
  );
  opacity: .55;
  mix-blend-mode: soft-light;
}

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: calc(var(--top-h) + var(--sat));
  padding: var(--sat) calc(16px + var(--sar)) 0 calc(16px + var(--sal));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(61,126,255,.06);
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.brand img { height: 28px; width: auto; opacity: .88; }
.brand-mark img { height: 26px; filter: drop-shadow(0 0 6px rgba(61,126,255,.25)); }
.brand-txt { display: none; }
.topnav { display: none; gap: 2px; margin-left: 0; }
.topnav a { padding: 8px 14px; border-radius: 8px; color: var(--muted); font-size: 14px; transition: color .15s, background .15s; }
.topnav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.topnav a.on { color: var(--text); background: rgba(61,126,255,.16); }
.auth { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.auth-user { display: flex; align-items: center; flex-shrink: 0; margin-right: 4px; }
.auth-user[hidden] { display: none !important; }
.user-chip { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px 0 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--accent); color: #fff; flex-shrink: 0; overflow: hidden; }
.avatar.is-img { padding: 0; background: transparent; }
.avatar.is-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.user-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }

/* 按钮：实色，无渐变 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); cursor: pointer;
  font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s, box-shadow .15s;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02); }
.btn-tech {
  width: min(280px, 100%);
  letter-spacing: .28em; padding-left: calc(18px + .28em);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 0 0 1px rgba(61,126,255,.08), 0 0 18px rgba(61,126,255,.06);
}
.btn-tech.btn-primary {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 0 22px rgba(61,126,255,.28);
}
.btn:active { opacity: .85; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 16px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-primary { border-color: transparent; color: #fff; background: var(--accent); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-primary:disabled { opacity: .5; cursor: progress; }
.btn-ghost:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); }
.chip { min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: transparent;
  font-size: 13px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; position: relative; }
.chip::after { content: ""; position: absolute; inset: -4px; }
.chip:hover { color: var(--text); border-color: var(--line2); }

/* 布局壳 */
.shell { position: relative; z-index: 1; padding: 16px calc(16px + var(--sar)) calc(var(--tab-h) + var(--sab) + 24px) calc(16px + var(--sal)); }
.side, .main { min-width: 0; }

/* 卡片 / 面板 */
.panel, .card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 0 0 1px rgba(61,126,255,.04), 0 8px 28px rgba(0,0,0,.28);
}
.panel { padding: 18px; position: relative; }
.card { padding: 16px; position: relative; }
.panel::before, .card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 17px; letter-spacing: .08em; font-weight: 600; }
.card-title { font-size: 13px; color: var(--muted); letter-spacing: .16em; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 3px; height: 12px; border-radius: 1px; background: var(--accent); }

/* 表单：老八云式上下行（左标签 · 右控件），暗黑科技感 */
.form-stack {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: rgba(255,255,255,.015);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 0 0 1px rgba(61,126,255,.05);
}
.frow {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.frow:last-child { border-bottom: 0; }
.frow-top { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.frow-hint { min-height: 40px; }
.frow > label, .frow > .lab {
  width: 84px; flex-shrink: 0; font-size: 14px; color: var(--muted); letter-spacing: .04em;
}
.fctl { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; }
.fctl-end { justify-content: flex-end; gap: 10px; }
.fctl input[type=text], .fctl input[type=number], .fctl input[type=date], .fctl input[type=time], .fctl input[type=search],
.fctl select, .fctl textarea {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border-radius: 8px;
  background: transparent; border: 0; outline: none; text-align: right;
  font-size: 15px; transition: background .15s;
  -webkit-appearance: none; appearance: none;
}
.fctl textarea { text-align: left; resize: vertical; min-height: 56px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.fctl input:focus, .fctl select:focus, .fctl textarea:focus {
  background: rgba(61,126,255,.06);
}
input[type=search], .library .search {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line2); outline: none; font-size: 16px;
  -webkit-appearance: none; appearance: none;
}
input[type=search]:focus, .library .search:focus {
  border-color: rgba(61,126,255,.65); box-shadow: 0 0 0 1px rgba(61,126,255,.2), 0 0 16px rgba(61,126,255,.12);
}
input::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
input[type=date], input[type=time] { color-scheme: dark; }
.fctl select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 4px) 50%, calc(100% + 1px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 16px;
}
select option { background: var(--card-solid); }
/* 生辰滚轮触发器 */
.picker-trigger {
  width: 100%; min-height: 40px; padding: 8px 4px 8px 10px; border: 0; border-radius: 8px;
  background: transparent; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  cursor: pointer; text-align: right; transition: background .15s;
}
.picker-trigger:hover, .picker-trigger:focus-visible {
  background: rgba(61,126,255,.06); outline: none;
}
.picker-trigger span { font-size: 15px; letter-spacing: .02em; color: var(--text); }
.picker-chev {
  width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg); flex-shrink: 0; margin-right: 4px; opacity: .7;
}

/* 滚轮选择器 */
body.wp-open { overflow: hidden; }
.wp-root { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; } /* phase1: above .di-modal(90) so 修改弹层内出生滚轮可见 */
.wp-root.hidden { display: none !important; }
.wp-mask { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.wp-sheet {
  position: relative; z-index: 1; width: min(560px, 100%);
  background: #121218; border: 1px solid var(--line2); border-bottom: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -12px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(61,126,255,.08);
  padding-bottom: max(12px, var(--sab));
  animation: wpUp .22s ease-out;
}
@keyframes wpUp {
  from { transform: translateY(24px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}
.wp-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px;
  border-bottom: 1px solid var(--line);
}
.wp-title { flex: 1; text-align: center; font-size: 15px; font-weight: 600; letter-spacing: .08em; color: var(--text); }
.wp-btn {
  min-width: 56px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 15px;
}
.wp-btn.wp-ok { color: var(--accent-hi); font-weight: 600; }
.wp-btn:hover { background: rgba(255,255,255,.04); }
.wp-wheels {
  position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: 220px; margin: 8px 8px 4px; overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
}
.wp-col {
  height: 100%; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; text-align: center;
}
.wp-col::-webkit-scrollbar { display: none; }
.wp-spacer { height: 90px; flex-shrink: 0; pointer-events: none; }
.wp-item {
  height: 40px; line-height: 40px; scroll-snap-align: center;
  font-size: 16px; color: var(--muted); letter-spacing: .04em;
  user-select: none; -webkit-user-select: none;
}
.wp-hl {
  position: absolute; left: 6px; right: 6px; top: 50%; height: 40px; margin-top: -20px;
  border-radius: 10px; pointer-events: none;
  background: rgba(61,126,255,.10); border: 1px solid rgba(61,126,255,.28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
@media (min-width: 1024px) {
  .wp-root { align-items: center; padding: 24px; }
  .wp-sheet {
    border-radius: 14px; border: 1px solid var(--line2);
    box-shadow: 0 24px 64px rgba(0,0,0,.55), 0 0 0 1px rgba(61,126,255,.1);
    animation: wpFade .18s ease-out;
  }
  @keyframes wpFade {
    from { transform: translateY(8px) scale(.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .wp-sheet { animation: none !important; }
}
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

.seg { display: grid; grid-template-columns: 1fr 1fr; width: min(210px, 100%); margin-left: auto; padding: 3px; gap: 3px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line2); }
.seg button { min-height: 36px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; transition: background .15s, color .15s; position: relative; }
.seg button::after { content: ""; position: absolute; inset: -2px 0; }
.seg button.on { color: #fff; background: var(--accent); box-shadow: 0 0 12px rgba(61,126,255,.25); }

.toggle { position: relative; width: 50px; height: 30px; border-radius: 999px; border: 0; background: rgba(255,255,255,.12); cursor: pointer; transition: background .2s; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; inset: -6px -2px; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.toggle.on { background: var(--accent); box-shadow: 0 0 14px rgba(61,126,255,.28); }
.toggle.on i { transform: translateX(20px); }
.toggle:disabled { opacity: .35; cursor: not-allowed; }
.hint { font-size: 12px; color: var(--dim); margin: 10px 2px 0; line-height: 1.6; }
.error { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(255,93,108,.1); border: 1px solid rgba(255,93,108,.3); color: var(--danger); font-size: 13px; }
#btn-submit { margin-top: 16px; box-shadow: 0 0 22px rgba(61,126,255,.22); }

/* 首页：上置 logo + 竖直入口；约 12s 暗黑科技入场（只播一次，不循环） */
.hero {
  position: relative; display: flex; align-items: flex-start; justify-content: center;
  min-height: calc(100dvh - var(--top-h) - var(--tab-h) - 48px);
  padding-top: clamp(32px, 9vh, 80px);
}
.hero-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* 细网格底纹：偏 HUD / 黑科技，极低对比 */
.hero-grid {
  position: absolute; inset: -10% -20%;
  background-image:
    linear-gradient(rgba(61,126,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61,126,255,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 55% 50% at 50% 28%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 55% 50% at 50% 28%, #000 0%, transparent 72%);
  opacity: 0;
}

/* 径向光晕：压在 logo 后 */
.hero-glow {
  position: absolute; left: 50%; top: 10%;
  width: min(380px, 90vw); height: min(380px, 90vw);
  transform: translate(-50%, 0);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61,126,255,.22) 0%, rgba(61,126,255,.06) 38%, transparent 68%);
  filter: blur(2px);
  opacity: 0;
}

.hero-ring {
  position: absolute; left: 50%; top: 12%; transform: translate(-50%, 0) scale(.88);
  border-radius: 50%;
  opacity: 0;
}
.hero-ring--outer {
  width: min(360px, 86vw); height: min(360px, 86vw);
  border: 1px solid rgba(61,126,255,.10);
  box-shadow: 0 0 48px rgba(61,126,255,.06), inset 0 0 48px rgba(61,126,255,.03);
}
.hero-ring--mid {
  width: min(300px, 74vw); height: min(300px, 74vw);
  top: 14%;
  border: 1px solid rgba(61,126,255,.16);
  box-shadow: 0 0 36px rgba(61,126,255,.08), inset 0 0 28px rgba(61,126,255,.04);
}
.hero-ring--inner {
  width: min(220px, 56vw); height: min(220px, 56vw);
  top: 18%;
  border: 1px solid rgba(120,170,255,.22);
  box-shadow: 0 0 24px rgba(61,126,255,.12), inset 0 0 18px rgba(61,126,255,.05);
}

/* 刻度环：专业仪表面感 */
.hero-ticks {
  position: absolute; left: 50%; top: 14%;
  width: min(300px, 74vw); height: min(300px, 74vw);
  transform: translate(-50%, 0) rotate(0deg);
  border-radius: 50%;
  opacity: 0;
  background:
    repeating-conic-gradient(
      from 0deg,
      rgba(140,180,255,.35) 0deg 0.6deg,
      transparent 0.6deg 15deg
    );
  -webkit-mask-image: radial-gradient(circle, transparent 62%, #000 63%, #000 66%, transparent 67%);
  mask-image: radial-gradient(circle, transparent 62%, #000 63%, #000 66%, transparent 67%);
}

.hero-scan {
  position: absolute; left: 50%; top: 6%; transform: translateX(-50%);
  width: min(240px, 60vw); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180,210,255,.75), transparent);
  box-shadow: 0 0 14px rgba(61,126,255,.55), 0 0 32px rgba(61,126,255,.22);
  opacity: 0;
}
.hero-scan--alt {
  width: min(180px, 46vw);
  background: linear-gradient(90deg, transparent, rgba(100,170,255,.55), transparent);
  box-shadow: 0 0 10px rgba(61,126,255,.4);
}

.hero-particles { position: absolute; inset: 0; }
.hero-particles span {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #9ec0ff;
  box-shadow: 0 0 6px rgba(120,180,255,.85);
  opacity: 0;
}
.hero-particles span:nth-child(1)  { left: 18%; top: 22%; }
.hero-particles span:nth-child(2)  { left: 78%; top: 18%; width: 3px; height: 3px; }
.hero-particles span:nth-child(3)  { left: 28%; top: 48%; }
.hero-particles span:nth-child(4)  { left: 70%; top: 42%; }
.hero-particles span:nth-child(5)  { left: 12%; top: 36%; width: 1px; height: 1px; }
.hero-particles span:nth-child(6)  { left: 86%; top: 34%; }
.hero-particles span:nth-child(7)  { left: 42%; top: 14%; }
.hero-particles span:nth-child(8)  { left: 58%; top: 56%; width: 3px; height: 3px; }
.hero-particles span:nth-child(9)  { left: 22%; top: 62%; }
.hero-particles span:nth-child(10) { left: 74%; top: 64%; }
.hero-particles span:nth-child(11) { left: 48%; top: 8%; width: 1px; height: 1px; }
.hero-particles span:nth-child(12) { left: 64%; top: 28%; }

.hero-inner {
  position: relative; z-index: 1; text-align: center; padding: 8px 12px 24px; width: min(360px, 100%);
  display: flex; flex-direction: column; align-items: center;
  min-height: calc(100dvh - var(--top-h) - var(--tab-h) - 56px);
}
.hero-logo { width: 112px; margin: 0 auto 0; opacity: 1; transform: none; }
.hero-logo img {
  width: 100%; height: auto;
  filter: drop-shadow(0 0 14px rgba(61,126,255,.28));
}
.hero h1 { display: none; }
.hero-cta {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  margin-top: auto;
  margin-bottom: 10px;
  padding-top: 28px;
}
#view-home .hero-cta > * { opacity: 1; transform: none; width: min(280px, 100%); }
.guest-card .hero-cta {
  flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px;
}
.guest-card .hero-cta > * { opacity: 1; transform: none; width: auto; }

/* —— 背景特效时间轴（只播一次；CTA／logo／简介立刻可见可点）——
   主按钮与通道入口：首屏即 opacity:1，无延迟、不依次淡入
   0–5s  网格／环／刻度／扫描／粒子／光晕（背景层，pointer-events:none）
*/
body[data-view="home"] .hero-grid {
  animation: heroGridIn 2.2s cubic-bezier(.22,.7,.2,1) 0s both;
}
body[data-view="home"] .hero-ring--outer {
  animation: heroRingIn 2.4s cubic-bezier(.22,.7,.2,1) .35s both;
}
body[data-view="home"] .hero-ring--mid {
  animation: heroRingIn 2.2s cubic-bezier(.22,.7,.2,1) 1.4s both;
}
body[data-view="home"] .hero-ring--inner {
  animation: heroRingIn 2s cubic-bezier(.22,.7,.2,1) 2.6s both;
}
body[data-view="home"] .hero-ticks {
  animation: heroTicksIn 3.2s cubic-bezier(.22,.7,.2,1) 1.6s both;
}
body[data-view="home"] .hero-glow {
  animation: heroGlowIn 4.5s cubic-bezier(.22,.7,.2,1) 2.8s both;
}
body[data-view="home"] .hero-scan:not(.hero-scan--alt) {
  animation: heroScan 2.4s ease-in-out 1.8s both;
}
body[data-view="home"] .hero-scan--alt {
  animation: heroScanAlt 2.6s ease-in-out 6.6s both;
}
body[data-view="home"] .hero-particles span:nth-child(1)  { animation: heroParticleIn 2.4s ease-out 3.0s both; }
body[data-view="home"] .hero-particles span:nth-child(2)  { animation: heroParticleIn 2.4s ease-out 3.25s both; }
body[data-view="home"] .hero-particles span:nth-child(3)  { animation: heroParticleIn 2.4s ease-out 3.45s both; }
body[data-view="home"] .hero-particles span:nth-child(4)  { animation: heroParticleIn 2.4s ease-out 3.65s both; }
body[data-view="home"] .hero-particles span:nth-child(5)  { animation: heroParticleIn 2.4s ease-out 3.85s both; }
body[data-view="home"] .hero-particles span:nth-child(6)  { animation: heroParticleIn 2.4s ease-out 4.05s both; }
body[data-view="home"] .hero-particles span:nth-child(7)  { animation: heroParticleIn 2.4s ease-out 4.2s both; }
body[data-view="home"] .hero-particles span:nth-child(8)  { animation: heroParticleIn 2.4s ease-out 4.4s both; }
body[data-view="home"] .hero-particles span:nth-child(9)  { animation: heroParticleIn 2.4s ease-out 4.6s both; }
body[data-view="home"] .hero-particles span:nth-child(10) { animation: heroParticleIn 2.4s ease-out 4.8s both; }
body[data-view="home"] .hero-particles span:nth-child(11) { animation: heroParticleIn 2.4s ease-out 5.0s both; }
body[data-view="home"] .hero-particles span:nth-child(12) { animation: heroParticleIn 2.4s ease-out 5.15s both; }

/* logo／CTA 立即可见，不再等特效；特效仅背景层 */
body[data-view="home"] .hero-logo { animation: none; opacity: 1; transform: none; filter: none; }
#view-home .hero-cta > * { animation: none !important; opacity: 1 !important; transform: none !important; }

@keyframes heroGridIn {
  from { opacity: 0; }
  40% { opacity: .85; }
  to { opacity: .55; }
}
@keyframes heroRingIn {
  from { opacity: 0; transform: translate(-50%, 12px) scale(.86); }
  55% { opacity: 1; }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes heroTicksIn {
  from { opacity: 0; transform: translate(-50%, 0) rotate(-18deg); }
  45% { opacity: .7; }
  to { opacity: .45; transform: translate(-50%, 0) rotate(0deg); }
}
@keyframes heroGlowIn {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.9); }
  45% { opacity: .95; transform: translate(-50%, 0) scale(1.04); }
  75% { opacity: .7; transform: translate(-50%, 0) scale(1); }
  100% { opacity: .55; transform: translate(-50%, 0) scale(1); }
}
@keyframes heroScan {
  0% { opacity: 0; top: 8%; }
  12% { opacity: .95; }
  100% { opacity: 0; top: 46%; }
}
@keyframes heroScanAlt {
  0% { opacity: 0; top: 12%; }
  15% { opacity: .7; }
  100% { opacity: 0; top: 52%; }
}
@keyframes heroParticleIn {
  0% { opacity: 0; transform: translateY(6px) scale(.4); }
  35% { opacity: .95; transform: translateY(0) scale(1); }
  100% { opacity: .55; transform: translateY(-4px) scale(1); }
}
@keyframes heroLogoIn {
  from { opacity: 0; transform: translateY(14px) scale(.92); filter: brightness(1.55) saturate(1.15); }
  55% { opacity: 1; transform: translateY(0) scale(1.015); filter: brightness(1.12); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: none; }
}
@keyframes heroCtaIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  body[data-view="home"] .hero-logo,
  body[data-view="home"] .hero-ring,
  body[data-view="home"] .hero-scan,
  body[data-view="home"] .hero-grid,
  body[data-view="home"] .hero-glow,
  body[data-view="home"] .hero-ticks,
  body[data-view="home"] .hero-particles span,
  #view-home .hero-cta > * { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero-scan, .hero-particles, .hero-ticks { display: none; }
  .hero-grid { opacity: .35; }
  .hero-glow { opacity: .4; }
}

/* 首页「简介」入口：轻链，不抢三主按钮 */
.hero-about {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 4px; margin-bottom: clamp(20px, 4vh, 40px);
  min-height: 40px; padding: 0 16px;
  font-size: 13px; letter-spacing: .36em; padding-left: calc(16px + .36em);
  color: var(--dim);
  border: 1px solid transparent;
  border-radius: 8px;
  transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
  opacity: 1;
}
.hero-about:hover {
  color: var(--muted);
  border-color: rgba(61,126,255,.22);
  background: rgba(61,126,255,.06);
  box-shadow: 0 0 14px rgba(61,126,255,.08);
}
body[data-view="home"] .hero-about {
  animation: none; opacity: 1;
}
body[data-view="home"] .hero .site-slogan {
  opacity: 1;
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  body[data-view="home"] .hero-about,
  body[data-view="home"] .hero .site-slogan { animation: none !important; opacity: 1 !important; }
}

/* 简介／背景页：暗黑素净，适中阅读宽 */
.about { display: flex; flex-direction: column; gap: 12px; width: min(680px, 100%); margin: 0 auto; padding-bottom: 28px; }
.about-bar { display: flex; align-items: center; gap: 8px; }
.about-kicker {
  font-size: 12px; letter-spacing: .42em; padding-left: .42em;
  color: var(--dim); text-transform: none;
}
.about-card {
  position: relative;
  padding: 28px 22px 32px;
  border-radius: var(--r-lg);
  background: var(--card-solid);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 0 28px rgba(61,126,255,.05);
  overflow: hidden;
}
.about-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: rgba(61,126,255,.35);
  box-shadow: 0 0 12px rgba(61,126,255,.35);
  pointer-events: none;
}
.about-couplet {
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(22px, 5.6vw, 28px);
  line-height: 1.55;
  letter-spacing: .18em;
  margin: 4px 0 26px;
  padding: 8px 8px 22px;
  border-bottom: 1px solid var(--line);
  color: #f0f0f5;
}
.about-couplet p { margin: 0; }
.about-body {
  font-size: 15px; line-height: 1.9; color: var(--muted);
}
.about-body p { margin: 0 0 1.05em; }
.about-body p:last-child { margin-bottom: 0; }
.about-body .mark {
  color: #e8e8ed;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 0 .1em;
  box-shadow: inset 0 -1px 0 rgba(61,126,255,.45);
}
.about-body .en {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; color: var(--dim); letter-spacing: .02em;
}
.about-arrive { color: #d1d1d6; }
.about-strong {
  color: #e8e8ed; font-weight: 500;
  padding: 10px 0;
  border-left: 2px solid rgba(61,126,255,.55);
  padding-left: 14px;
  margin-left: 2px;
}
.about-verse {
  text-align: center;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .12em;
  color: #e8e8ed;
  padding: 14px 8px;
  margin: 8px 0 14px !important;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.about-close {
  text-align: center;
  color: #a8a8b4;
  letter-spacing: .22em;
  font-size: 14px;
  margin-top: 8px !important;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
/* 公司口号：各页文末 */
.site-slogan {
  text-align: center;
  color: var(--dim);
  letter-spacing: .18em;
  font-size: 12px;
  margin: 18px 0 8px;
  padding: 14px 8px 4px;
  border-top: 1px solid var(--line);
}
.site-slogan-form {
  margin-top: 20px;
  margin-bottom: 4px;
}
.hero .site-slogan {
  border-top: none;
  margin-top: 8px;
  padding-top: 4px;
  letter-spacing: .22em;
  color: #6a6a76;
}
@media (min-width: 640px) {
  .about-card { padding: 36px 40px 40px; }
  .about-body { font-size: 16px; line-height: 1.95; }
  .about-verse { font-size: 18px; }
}
@media (min-width: 1024px) {
  .about { width: min(720px, 100%); }
  .hero-about { margin-bottom: clamp(28px, 5vh, 48px); }
}

/* —— PC 访客首页（法爷定 pc-guest-home-1102）——
   仅：未登录（body.is-guest）＋宽屏 ≥1024。
   手机／窄屏另套：不藏 hero-cta、不把「最新消息」提成大钮、不跟本套布局。
   登录后顶栏定序（auth-topbar-left-1102）不受 is-guest 影响。
*/
body.is-guest .auth #btn-register { display: none !important; }

@media (min-width: 1024px) {
  /* 访客顶栏：左不挂命盘库／最新消息／八云后台；右上仅登录 */
  body.is-guest .topnav { display: none !important; }

  body.is-guest[data-view="home"] .hero {
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(88px, 18vh, 160px);
    min-height: calc(100dvh - var(--top-h) - 32px);
  }
  body.is-guest[data-view="home"] .hero-inner {
    width: min(420px, 100%);
    min-height: calc(100dvh - var(--top-h) - 48px);
    padding-top: clamp(12px, 3vh, 36px);
    justify-content: flex-start;
  }
  /* 大八云 logo：放大＋下压 */
  body.is-guest[data-view="home"] .hero-logo {
    width: clamp(168px, 20vw, 228px);
    margin: 0 auto clamp(32px, 5.5vh, 56px);
  }
  body.is-guest[data-view="home"] .hero-logo img {
    filter: drop-shadow(0 0 22px rgba(61,126,255,.36));
  }
  /* 禁：排盘／八云命盘库 */
  body.is-guest[data-view="home"] .hero-cta { display: none !important; }
  /* logo 下方「最新消息」大钮 → #/news */
  body.is-guest[data-view="home"] .hero-about {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(280px, 100%);
    min-height: 50px;
    margin-top: 4px;
    margin-bottom: clamp(28px, 5vh, 48px);
    padding: 0 24px;
    padding-left: calc(24px + .28em);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .28em;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 0 22px rgba(61,126,255,.28);
    transition: background .15s, box-shadow .15s, opacity .15s;
  }
  body.is-guest[data-view="home"] .hero-about:hover {
    color: #fff;
    background: var(--accent-hi);
    border-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 26px rgba(61,126,255,.34);
  }
  body.is-guest[data-view="home"] .hero .site-slogan {
    margin-top: 8px;
  }
}

/* 手机／窄屏访客首页：嵌 login.html 同款整框＋另一色「访客排盘」；
   默认藏，仅 max-width 访客首页显。PC 访客不跟这套（仍最新消息＋顶栏登录链）。 */
.hero-m-auth,
.hero-m-guest { display: none !important; }

@media (max-width: 1023.98px) {
  /* 登录框自带 logo／标题；藏上方大 logo 免双标；外层 slogan 亦藏（框内已有） */
  body.is-guest[data-view="home"] .hero-logo { display: none !important; }
  body.is-guest[data-view="home"] .hero-inner > .site-slogan { display: none !important; }
  body.is-guest[data-view="home"] .hero {
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    justify-content: flex-start; padding-top: 24px; padding-bottom: 28px;
  }
  body.is-guest[data-view="home"] .hero-inner {
    min-height: auto; justify-content: flex-start; gap: 16px;
  }

  /* 访客手机：放宽 hero-cta，否则 login 卡被卡在 280 */
  body.is-guest[data-view="home"] #view-home .hero-cta {
    width: min(380px, 100%) !important;
  }
  body.is-guest[data-view="home"] .hero-m-auth {
    display: block !important;
    width: min(380px, 100%) !important; /* 压过 #view-home .hero-cta > * 的 280 */
    max-width: 100%;
    box-sizing: border-box;
    /* login.html 同款科技黑壳变量 */
    --hm-line: rgba(255,255,255,.10);
    --hm-bg2: #111114;
    --hm-text: #f2f2f2;
    --hm-muted: #8e8e93;
    --hm-soft: #252528;
    --hm-blue: #0a84ff;
    --hm-green: #30d158;
    --hm-red: #ff453a;
  }
  /* 顶栏 .auth 是 flex 横排；此处必须盖成 login 卡纵向块 */
  body.is-guest[data-view="home"] .hero-m-auth .auth {
    display: block !important;
    margin-left: 0 !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100%;
    padding: 28px 24px 22px;
    border-radius: 20px;
    background: rgba(16,18,24,.92);
    border: 1px solid var(--hm-line);
    color: var(--hm-text);
    box-sizing: border-box;
  }
  body.is-guest[data-view="home"] .hero-m-auth .logo { margin: 0 auto 16px; text-align: center; }
  body.is-guest[data-view="home"] .hero-m-auth .logo img {
    width: 64px; height: 64px; border-radius: 50%; /* 56×1.15≈64；口播再放大约15% */
    border: 1px solid rgba(255,255,255,.12);
    object-fit: contain; background: #000; display: inline-block;
  }
  /* 口播：去卡内「八云」二字与「八字排盘 · 账号登录」；logo alt 仍保留八云 */
  body.is-guest[data-view="home"] .hero-m-auth h1 {
    display: none !important;
  }
  body.is-guest[data-view="home"] .hero-m-auth .sub {
    display: none !important;
  }
  body.is-guest[data-view="home"] .hero-m-auth .seg {
    display: inline-flex; width: 100%; margin-bottom: 16px;
    background: var(--hm-bg2); border: 1px solid #2c2c2e; border-radius: 12px;
    padding: 3px; gap: 2px; box-sizing: border-box;
  }
  body.is-guest[data-view="home"] .hero-m-auth .seg button {
    flex: 1; border: 0; background: transparent; color: var(--hm-muted);
    padding: 7px 10px; border-radius: 9px; cursor: pointer; font-size: 13px;
  }
  body.is-guest[data-view="home"] .hero-m-auth .seg button.on {
    background: var(--hm-soft); color: var(--hm-text); font-weight: 600;
  }
  body.is-guest[data-view="home"] .hero-m-auth form { display: grid; gap: 12px; }
  body.is-guest[data-view="home"] .hero-m-auth .input {
    width: 100%; box-sizing: border-box; padding: 12px 14px; font-size: 15px;
    background: var(--hm-bg2); border: 1px solid #2c2c2e; color: var(--hm-text);
    border-radius: 10px; outline: none;
  }
  body.is-guest[data-view="home"] .hero-m-auth .input:focus { border-color: var(--hm-blue); }
  body.is-guest[data-view="home"] .hero-m-auth .btn {
    border: 0; border-radius: 10px; padding: 12px; font-size: 15px; font-weight: 600;
    cursor: pointer; color: #fff; background: var(--hm-soft); width: 100%;
  }
  body.is-guest[data-view="home"] .hero-m-auth .btn.primary { background: var(--hm-blue); }
  body.is-guest[data-view="home"] .hero-m-auth .msg {
    font-size: 13px; min-height: 18px; text-align: center; color: var(--hm-muted);
  }
  body.is-guest[data-view="home"] .hero-m-auth .msg.ok { color: var(--hm-green); }
  body.is-guest[data-view="home"] .hero-m-auth .msg.err { color: var(--hm-red); }
  body.is-guest[data-view="home"] .hero-m-auth .foot { margin-top: 16px; text-align: center; }
  body.is-guest[data-view="home"] .hero-m-auth .foot-muted { display: none; } /* 已在首页 */
  body.is-guest[data-view="home"] .hero-m-auth .site-slogan {
    margin-top: 12px; opacity: .65; font-size: 12px; text-align: center; color: var(--hm-muted);
  }
  body.is-guest[data-view="home"] .hero-m-auth .hidden { display: none !important; }

  /* 访客排盘：入登录卡内同栅，宽＝登录钮；草绿暗约半（相对 #30d158）
     选择器须压过 .hero-m-auth .btn（同卡内 .btn 灰底） */
  body.is-guest[data-view="home"] .hero-m-auth a.hero-m-guest {
    display: inline-flex !important;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    margin: 0;
    min-height: 0;
    padding: 12px;
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid #145624 !important;
    background: #18682c !important;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(24,104,44,.35);
  }
  body.is-guest[data-view="home"] .hero-m-auth a.hero-m-guest:hover {
    background: #1a7a3a !important;
    border-color: #18682c !important;
    color: #fff !important;
  }
  body.is-guest[data-view="home"] .hero-m-auth a.hero-m-guest:active {
    background: #145624 !important;
    border-color: #0f421c !important;
    color: #fff !important;
    transform: translateY(1px);
  }
  /* 口号随之下压 */
  body.is-guest[data-view="home"] .hero-m-auth .site-slogan {
    margin-top: 14px;
  }

  /* 手机访客：藏旧排盘／命盘库／最新消息轻链；顶栏登录藏免重复 */
  body.is-guest[data-view="home"] #hero-start,
  body.is-guest[data-view="home"] #hero-library { display: none !important; }
  body.is-guest[data-view="home"] #hero-news { display: none !important; }
  body.is-guest[data-view="home"] .topbar .auth { display: none !important; }
  body.is-guest[data-view="home"] .hero-cta {
    gap: 20px;
    margin-top: auto;
    margin-bottom: 18px;
    padding-top: 16px;
    align-items: center;
  }
}



/* 0.19.1: 旧结果页／信息页展示 CSS（.result／.pillars／.yun／info-view…）已整段删除 */

/* 我的命盘 */
.library .search { margin-bottom: 12px; }
.lib-list { display: grid; gap: 10px; }
.lib-item { display: flex; align-items: stretch; gap: 6px; padding: 6px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); transition: border-color .15s; }
.lib-item:hover { border-color: var(--line2); }
.lib-no { flex: 0 0 auto; min-width: 34px; display: flex; align-items: center; justify-content: center; padding: 0 2px 0 4px;
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lib-open { flex: 1; min-width: 0; text-align: left; border: 0; background: none; cursor: pointer; padding: 8px 10px; border-radius: 8px; min-height: 44px; }
.lib-name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.lib-name .badge { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: rgba(61,126,255,.18); color: #9bb8ff; font-weight: 500; }
.lib-tgdz { font-family: var(--serif); letter-spacing: .14em; margin-top: 4px; font-size: 15px; }
.lib-meta { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-acts { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.lib-acts button { width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--dim); cursor: pointer; font-size: 16px; }
.lib-acts button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.lib-acts button.on { color: var(--wx-金); }
.guest-card { text-align: center; padding: 28px 18px; }
.guest-card b { font-size: 16px; } .guest-card p { font-size: 13px; }
.mini-lib { display: none; }
.mini-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.mini-item:hover { background: rgba(255,255,255,.05); }
.mini-item b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-item span { font-family: var(--serif); font-size: 13px; color: var(--muted); letter-spacing: .08em; white-space: nowrap; }

/* 手机底部 tab */
.tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tab-h) + var(--sab)); padding: 0 var(--sar) var(--sab) var(--sal);
  background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--dim); min-height: 44px; transition: color .15s; }
.tabbar a.on { color: var(--text); }
.tabbar a.on .ic { background: var(--accent); }
.tabbar a.disabled { opacity: .35; pointer-events: none; }
.ic { width: 22px; height: 22px; background: var(--dim); -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.tabbar a:not(.on) .ic { background: #6a6a76; }
.ic-home { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 11h3v9h6v-6h2v6h6v-9h3z'/%3E%3C/svg%3E"); }
.ic-chart { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v2H4zm0 5h16v2H4zm0 5h10v2H4zm0 5h10v2H4zm13-4 4 4-4 4z'/%3E%3C/svg%3E"); }
.ic-pan { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h8v8H3zm10 0h8v8h-8zM3 13h8v8H3zm10 0h8v8h-8z'/%3E%3C/svg%3E"); }
.ic-lib { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-5 0-9 2.5-9 5.5V22h18v-2.5C21 16.5 17 14 12 14z'/%3E%3C/svg%3E"); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.quick { display: flex; flex-direction: column; gap: 12px; width: min(720px, 100%); margin: 0 auto; padding-bottom: 28px; }
.quick-card { display: flex; flex-direction: column; gap: 14px; }
.quick-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: .04em; }
.quick-hint { margin: 0; font-size: 13px; line-height: 1.55; }
.quick-hint code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
  padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.quick-raw { width: 100%; min-height: 96px; resize: vertical; font-size: 18px; line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 14px 16px;
  border-radius: 12px; border: 1px solid var(--line2); background: #0c0c10; color: #eee; }
.quick-raw:focus { outline: none; border-color: rgba(120,160,255,.45); box-shadow: 0 0 0 3px rgba(80,120,255,.15); }
.quick-row { display: flex; align-items: center; gap: 12px; }
.quick-row .lab { min-width: 72px; color: var(--muted); font-size: 13px; }
.quick-row .fctl { flex: 1; }
.quick-row select, .quick-row input[type=text] { width: 100%; }
.quick-preview { min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line);
  font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.quick-preview.ok { border-style: solid; border-color: rgba(90,200,140,.35); color: #d8e8dc; }
.quick-preview.bad { border-style: solid; border-color: rgba(255,100,100,.4); color: #ffb4b4; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-actions .btn { flex: 1; min-width: 140px; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tab-h) + var(--sab) + 18px); transform: translateX(-50%); max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 10px; background: #1c1c22; border: 1px solid var(--line2); font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.fade-in { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none !important; } }

/* 手机：按视图切页 */
@media (max-width: 1023.98px) {
  body[data-view="home"] #side, body[data-view="home"] #view-result, body[data-view="home"] #view-library, body[data-view="home"] #view-about, body[data-view="home"] #view-quick, body[data-view="home"] #view-lingxiao { display: none; }
  body[data-view="input"] #main { display: none; }
  body[data-view="result"] #side, body[data-view="result"] #view-home, body[data-view="result"] #view-library, body[data-view="result"] #view-about, body[data-view="result"] #view-quick, body[data-view="result"] #view-lingxiao { display: none; }
  body[data-view="library"] #side, body[data-view="library"] #view-home, body[data-view="library"] #view-result, body[data-view="library"] #view-about, body[data-view="library"] #view-quick, body[data-view="library"] #view-lingxiao { display: none; }
  body[data-view="about"] #side, body[data-view="about"] #view-home, body[data-view="about"] #view-result, body[data-view="about"] #view-library, body[data-view="about"] #view-quick, body[data-view="about"] #view-lingxiao { display: none; }
  body[data-view="quick"] #side, body[data-view="quick"] #view-home, body[data-view="quick"] #view-result, body[data-view="quick"] #view-library, body[data-view="quick"] #view-about, body[data-view="quick"] #view-lingxiao { display: none; }
  body[data-view="result"] #view-result, body[data-view="library"] #view-library { display: flex !important; }
  body[data-view="library"] #view-library { display: block !important; }
  body[data-view="about"] #view-about, body[data-view="quick"] #view-quick { display: flex !important; }
  body[data-view="lingxiao"] #side, body[data-view="lingxiao"] #view-home, body[data-view="lingxiao"] #view-result, body[data-view="lingxiao"] #view-library, body[data-view="lingxiao"] #view-about, body[data-view="lingxiao"] #view-quick { display: none; }
  body[data-view="lingxiao"] #view-lingxiao { display: block !important; }
  body:not([data-view="home"]) .auth #btn-register { display: none; }

  body[data-view="info"] #side, body[data-view="info"] #view-home, body[data-view="info"] #view-result, body[data-view="info"] #view-library, body[data-view="info"] #view-about, body[data-view="info"] #view-quick, body[data-view="info"] #view-lingxiao { display: none; }
  body[data-view="info"] #view-info { display: flex !important; }
  body[data-view="result"] #view-info, body[data-view="home"] #view-info, body[data-view="input"] #view-info, body[data-view="library"] #view-info, body[data-view="about"] #view-info, body[data-view="quick"] #view-info, body[data-view="lingxiao"] #view-info { display: none; }
}
@media (max-width: 380px) {
  .btn-sm { padding: 0 11px; }
}

@media (min-width: 640px) {
  .shell { padding-left: calc(28px + var(--sal)); padding-right: calc(28px + var(--sar)); }
  .ss-vert { font-size: 15.4px; }
  .cang { font-size: 22px; }
  .cang > span { flex-basis: 1.45em; }
  .form-panel { max-width: 520px; margin: 0 auto; }
}

/* 电脑：左栏输入 + 右侧命盘 */
@media (min-width: 1024px) {
  :root { --top-h: 58px; }
  .topnav { display: flex; }
  .tabbar { display: none; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.quick { display: flex; flex-direction: column; gap: 12px; width: min(720px, 100%); margin: 0 auto; padding-bottom: 28px; }
.quick-card { display: flex; flex-direction: column; gap: 14px; }
.quick-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: .04em; }
.quick-hint { margin: 0; font-size: 13px; line-height: 1.55; }
.quick-hint code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
  padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.quick-raw { width: 100%; min-height: 96px; resize: vertical; font-size: 18px; line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 14px 16px;
  border-radius: 12px; border: 1px solid var(--line2); background: #0c0c10; color: #eee; }
.quick-raw:focus { outline: none; border-color: rgba(120,160,255,.45); box-shadow: 0 0 0 3px rgba(80,120,255,.15); }
.quick-row { display: flex; align-items: center; gap: 12px; }
.quick-row .lab { min-width: 72px; color: var(--muted); font-size: 13px; }
.quick-row .fctl { flex: 1; }
.quick-row select, .quick-row input[type=text] { width: 100%; }
.quick-preview { min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line);
  font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.quick-preview.ok { border-style: solid; border-color: rgba(90,200,140,.35); color: #d8e8dc; }
.quick-preview.bad { border-style: solid; border-color: rgba(255,100,100,.4); color: #ffb4b4; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-actions .btn { flex: 1; min-width: 140px; }

.toast { bottom: 28px; }
  .shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start;
    max-width: 1600px; margin: 0 auto; padding: 20px 28px 40px; }
  .side { position: sticky; top: calc(var(--top-h) + 20px); max-height: calc(100vh - var(--top-h) - 40px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent; padding-right: 2px; }
  .form-panel { max-width: none; }
  .mini-lib { display: block; }
  body[data-view="home"] #view-result, body[data-view="home"] #view-library, body[data-view="home"] #view-about, body[data-view="home"] #view-quick, body[data-view="home"] #view-lingxiao,
  body[data-view="input"] #view-result, body[data-view="input"] #view-library, body[data-view="input"] #view-about, body[data-view="input"] #view-quick, body[data-view="input"] #view-lingxiao,
  body[data-view="result"] #view-home, body[data-view="result"] #view-library, body[data-view="result"] #view-about, body[data-view="result"] #view-quick, body[data-view="result"] #view-lingxiao,
  body[data-view="library"] #view-home, body[data-view="library"] #view-result, body[data-view="library"] #view-about, body[data-view="library"] #view-quick, body[data-view="library"] #view-lingxiao,
  body[data-view="about"] #view-home, body[data-view="about"] #view-result, body[data-view="about"] #view-library, body[data-view="about"] #view-quick, body[data-view="about"] #view-lingxiao,
  body[data-view="quick"] #view-home, body[data-view="quick"] #view-result, body[data-view="quick"] #view-library, body[data-view="quick"] #view-about, body[data-view="quick"] #view-lingxiao,
  body[data-view="lingxiao"] #view-home, body[data-view="lingxiao"] #view-result, body[data-view="lingxiao"] #view-library, body[data-view="lingxiao"] #view-about, body[data-view="lingxiao"] #view-quick { display: none !important; }
  body[data-view="result"] #view-result { display: flex !important; }
  body[data-view="library"] #view-library { display: block !important; }

  body[data-view="info"] #view-home, body[data-view="info"] #view-result, body[data-view="info"] #view-library, body[data-view="info"] #view-about, body[data-view="info"] #view-quick, body[data-view="info"] #view-lingxiao { display: none !important; }
  body[data-view="info"] #side { display: none; }
  body[data-view="info"] .shell { grid-template-columns: 1fr; max-width: none; }
  body[data-view="info"] #view-info { display: flex !important; }
  body[data-view="home"] #view-info, body[data-view="input"] #view-info, body[data-view="result"] #view-info, body[data-view="library"] #view-info, body[data-view="about"] #view-info, body[data-view="quick"] #view-info, body[data-view="lingxiao"] #view-info { display: none !important; }

  body[data-view="about"] #view-about, body[data-view="quick"] #view-quick { display: flex !important; }
  body[data-view="lingxiao"] #view-lingxiao { display: block !important; }
  /* 首页落地：不占左侧表单，主 logo 放大，按钮下移拉开 */
  body[data-view="home"] #side { display: none; }
  body[data-view="home"] .shell { grid-template-columns: 1fr; max-width: none; }
  body[data-view="about"] #side, body[data-view="quick"] #side, body[data-view="lingxiao"] #side { display: none; }
  body[data-view="about"] .shell, body[data-view="quick"] .shell, body[data-view="lingxiao"] .shell { grid-template-columns: 1fr; max-width: none; }
  body[data-view="lingxiao"] #main { max-width: none; width: 100%; }
  body[data-view="lingxiao"] #view-lingxiao { width: 100%; max-width: none; }
  .hero { min-height: calc(100vh - var(--top-h) - 48px); padding-top: clamp(48px, 11vh, 110px); }
  .hero-inner {
    width: min(420px, 100%);
    min-height: calc(100vh - var(--top-h) - 64px);
    padding-bottom: 32px;
  }
  .hero-logo { width: 172px; }
  .hero-ring--outer { width: 460px; height: 460px; top: 6%; }
  .hero-ring--mid { width: 380px; height: 380px; top: 9%; }
  .hero-ring--inner { width: 280px; height: 280px; top: 14%; }
  .hero-ticks { width: 380px; height: 380px; top: 9%; }
  .hero-glow { width: 480px; height: 480px; top: 4%; }
  .hero-cta { gap: 28px; margin-bottom: 14px; padding-top: 36px; }
  .btn-tech { width: min(320px, 100%); }
  .card { padding: 18px; }
  .ss-vert { font-size: 16.5px; }
  .cang { font-size: 24.2px; gap: 2px; }
  .cang > span { flex-basis: 1.5em; }
  .cang .ss-vert { font-size: 14.3px; }
  .strip { /* 桌面仍用连续横条，对齐老八云习惯 */ }
  /* 电脑端：一行一条，从上到下编号 */
  .lib-list { grid-template-columns: 1fr; gap: 8px; }
  .lib-open { display: grid; grid-template-columns: minmax(140px, 1.1fr) minmax(170px, 1fr) minmax(0, 2fr); column-gap: 18px; align-items: center; }
  .lib-open .lib-tgdz, .lib-open .lib-meta { margin-top: 0; }
  .lib-open > .lib-meta ~ .lib-meta { grid-column: 1 / -1; }
  .lib-acts { flex-direction: row; align-items: center; }
  .lib-guest { max-width: 480px; }
}
@media (min-width: 1440px) {
  .shell { grid-template-columns: 360px minmax(0, 1fr); gap: 24px; padding: 24px 36px 44px; }
}

/* ---- quick multi-field + guest-only shell ---- */
.quick-gender-wrap { display: flex; align-items: center; gap: 10px; }
.quick-gender-wrap input { width: 96px; flex: 0 0 auto; }
.quick-gender-wrap .seg { flex: 0 0 auto; }
body.quick-only [data-nav="home"],
body.quick-only [data-nav="input"],
body.quick-only [data-nav="about"],
body.quick-only .tab-normal { display: none !important; }
body.quick-only #quick-back { display: none !important; }
body.quick-only #side { display: none !important; }
body.quick-only #tab-quick { display: flex !important; }
body.quick-only[data-view="quick"] #view-quick { display: flex !important; }
#quick-birth { font-variant-numeric: tabular-nums; letter-spacing: .06em; }

/* 凌霄成员进排盘／命盘：隐藏手机底栏；回去＝顶栏「后台」→ #/lingxiao。桌面本就无 .tabbar，勿破坏 #/lingxiao */
body.lx-no-tabbar .tabbar { display: none !important; }
body.lx-no-tabbar .shell { padding-bottom: calc(24px + var(--sab)); }
body.lx-no-tabbar .toast { bottom: calc(var(--sab) + 18px); }


/* PERF 0.7.2: kill all hero FX / intro animations */
.hero-fx { display: none !important; }
body[data-view="home"] .hero-grid,
body[data-view="home"] .hero-ring,
body[data-view="home"] .hero-ring--outer,
body[data-view="home"] .hero-ring--mid,
body[data-view="home"] .hero-ring--inner,
body[data-view="home"] .hero-ticks,
body[data-view="home"] .hero-glow,
body[data-view="home"] .hero-scan,
body[data-view="home"] .hero-scan--alt,
body[data-view="home"] .hero-particles,
body[data-view="home"] .hero-particles span {
  animation: none !important;
  transition: none !important;
  display: none !important;
}
#view-home .hero-cta > *,
body[data-view="home"] .hero-logo,
body[data-view="home"] .hero-about,
body[data-view="home"] .hero .site-slogan {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}
.fade-in { animation: none !important; }

/* ---------- 编辑出生资料弹层 ／ 计算历史抽屉 ---------- */
.xby-modal, .xby-drawer { position: fixed; inset: 0; z-index: 80; }
.xby-modal.hidden, .xby-drawer.hidden { display: none !important; }
.xby-modal-backdrop, .xby-drawer-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
}
.xby-modal-card {
  position: relative; z-index: 1; margin: 4vh auto; max-width: 520px; max-height: 90vh;
  overflow: auto; background: var(--panel, #12141c); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 16px 18px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.xby-modal-head, .xby-drawer-head, .xby-modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.xby-modal-head h3, .xby-drawer-head h3 { margin: 0; font-size: 17px; }
.xby-modal-hint { font-size: 13px; margin: 8px 0 12px; }
.xby-modal-body .frow { margin-bottom: 10px; }
.xby-modal-foot { margin-top: 14px; justify-content: flex-end; }
.xby-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 96vw);
  background: var(--panel, #12141c); border-left: 1px solid rgba(255,255,255,.08);
  padding: 16px; overflow: auto; z-index: 1;
  box-shadow: -12px 0 40px rgba(0,0,0,.35);
}
.calc-hist-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.calc-hist-item {
  border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 10px 12px;
  background: rgba(255,255,255,.03);
}
.calc-hist-item .chi-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.calc-hist-item .chi-sum { margin-top: 6px; font-size: 13px; color: var(--dim, #9aa3b5); }
.calc-hist-item .chi-tgdz { margin-top: 4px; font-family: ui-monospace, monospace; font-size: 13px; }
.calc-hist-item .chi-detail { margin-top: 8px; }
@media (max-width: 640px) {
  .result-bar { flex-wrap: wrap; }
}

/* 0.11 置顶拖排 */
.lib-item.lib-pinned { border-color: rgba(61,126,255,.35); }
.lib-item.dragging { opacity: .55; }
.lib-item.drag-over { border-color: var(--accent, #3d7eff); box-shadow: 0 0 0 1px rgba(61,126,255,.4); }
.lib-acts button.pin.on { color: #5b8cff; }
.lib-no { cursor: default; user-select: none; }
.lib-item[draggable="true"] .lib-no { cursor: grab; color: var(--dim); letter-spacing: -2px; font-size: 12px; }


/* ---- 命盘外壳皮肤 A／B／C／F（凌霄卡 xby_mingpan_skin → html[data-skin]）----
 * 只换壳色；排盘 DOM／算法零改。无 data-skin 时沿用上方 :root 现暗色。
 */
html[data-skin="A"] {
  --bg: #FFFFFF;
  --muted2: #6a6a70;
  --bg2: #F5F5F7;
  --card: #ffffff;
  --card-solid: #ffffff;
  --line: rgba(28, 28, 30, 0.10);
  --line2: rgba(28, 28, 30, 0.16);
  --text: #1c1c1e;
  --muted: #4a4a4e;
  --dim: #6a6a70;
  --accent: #3d7eff;
  --accent-hi: #2f6ae0;
  --wx-木: #3fcf72;
  --wx-火: #ff4f5e;
  --wx-土: #b98552;
  --wx-金: #e8c040;
  --wx-水: #4a7ae8;
  color-scheme: light;
}
html[data-skin="B"] {
  --bg: #F7F1E8;
  --muted2: #7A7168;
  --bg2: #EFE7DB;
  --card: #FBF7F0;
  --card-solid: #FBF7F0;
  --line: rgba(42, 36, 32, 0.12);
  --line2: rgba(42, 36, 32, 0.18);
  --text: #2A2420;
  --muted: #5C534C;
  --dim: #7A7168;
  --accent: #3d7eff;
  --accent-hi: #2f6ae0;
  --wx-木: #3fcf72;
  --wx-火: #ff4f5e;
  --wx-土: #b98552;
  --wx-金: #e8c040;
  --wx-水: #4a7ae8;
  color-scheme: light;
}
/* C：霓虹／墨夜只改壳；五行字色＝五行力计算器正本（全肤同套；法爷钉死 1102） */
html[data-skin="C"] {
  --bg: #0B0C0F;
  --muted2: #BDB8B0;
  --bg2: #101218;
  --card: #16181E;
  --card-solid: #16181E;
  --line: rgba(247, 245, 242, 0.10);
  --line2: rgba(247, 245, 242, 0.16);
  --text: #F7F5F2;
  --muted: #D2CDC6;
  --dim: #BDB8B0;
  --accent: #3d7eff;
  --accent-hi: #5a92ff;
  --wx-木: #3fcf72;
  --wx-火: #ff4f5e;
  --wx-土: #b98552;
  --wx-金: #e8c040;
  --wx-水: #4a7ae8;
  color-scheme: dark;
}
/* F／Frank：壳色同 C；舞台底拼贴；五行＝计算器正本同套 */
html[data-skin="F"] {
  --bg: #0B0C0F;
  --muted2: #BDB8B0;
  --bg2: #101218;
  --card: #16181E;
  --card-solid: #16181E;
  --line: rgba(247, 245, 242, 0.10);
  --line2: rgba(247, 245, 242, 0.16);
  --text: #F7F5F2;
  --muted: #D2CDC6;
  --dim: #BDB8B0;
  --accent: #3d7eff;
  --accent-hi: #5a92ff;
  --wx-木: #3fcf72;
  --wx-火: #ff4f5e;
  --wx-土: #b98552;
  --wx-金: #e8c040;
  --wx-水: #4a7ae8;
  color-scheme: dark;
}
html[data-skin="A"] .strip-label,
html[data-skin="B"] .strip-label { color: var(--text); }
html[data-skin="A"] .topbar,
html[data-skin="B"] .topbar { background: var(--bg); }
html[data-skin="A"] .tabbar,
html[data-skin="B"] .tabbar { background: var(--card); border-top-color: var(--line); }
html[data-skin="C"] .strip-label,
html[data-skin="F"] .strip-label { color: var(--text); }

/* 浅底皮肤：关掉暗色科技底纹，结果／排盘硬编码暗色随壳走 */
html[data-skin="A"] .bg-grid,
html[data-skin="B"] .bg-grid,
html[data-skin="A"] .bg-dots,
html[data-skin="B"] .bg-dots,
html[data-skin="A"] .bg-scan,
html[data-skin="B"] .bg-scan { opacity: 0; visibility: hidden; }
html[data-skin="A"] .panel,
html[data-skin="B"] .panel,
html[data-skin="A"] .card,
html[data-skin="B"] .card {
  box-shadow: 0 1px 0 rgba(28,28,30,.04), 0 8px 24px rgba(28,28,30,.06);
}
html[data-skin="A"] .panel::before,
html[data-skin="B"] .panel::before,
html[data-skin="A"] .card::before,
html[data-skin="B"] .card::before { box-shadow: none; }
html[data-skin="A"] .form-stack,
html[data-skin="B"] .form-stack {
  background: rgba(28,28,30,.03);
  box-shadow: none;
}
html[data-skin="A"] .place-suggest,
html[data-skin="B"] .place-suggest,
html[data-skin="A"] .wp-sheet,
html[data-skin="B"] .wp-sheet { background: var(--card); color: var(--text); }
html[data-skin="A"] .result-logo,
html[data-skin="B"] .result-logo { background: transparent; }
html[data-skin="A"] .seg,
html[data-skin="B"] .seg { background: rgba(28,28,30,.04); }
html[data-skin="A"] .btn,
html[data-skin="B"] .btn {
  background: rgba(28,28,30,.04);
  box-shadow: none;
}
/* body[data-skin] 与 html 同步，防个别选择器只扫 body */
body[data-skin="A"], body[data-skin="B"], body[data-skin="C"], body[data-skin="F"] { background: var(--bg); color: var(--text); }

/* ==== PC／手机非结果页强制科技黑（1102）====
 * 根因：html[data-skin=A/B] 把 --bg 刷白且顶栏／卡片跟白；肤色只应罩结果页。
 * 即使用户停在 library／quick／home 时 html 仍残留 data-skin，亦用 body 级变量＋:has 锁黑。
 * 结果页（body[data-view=result]）不进本段，A／B／C／F 照常。
 */
html:has(body:not([data-view="result"])) {
  --bg: #0a0a0c;
  --bg2: #101014;
  --card: #141418;
  --card-solid: #141418;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --text: #e8e8ed;
  --muted: #8a8a96;
  --dim: #5c5c68;
  --muted2: #8a8a96;
  --accent: #3d7eff;
  --accent-hi: #5a92ff;
  --wx-木: #3fcf72;
  --wx-火: #ff4f5e;
  --wx-土: #b98552;
  --wx-金: #e8c040;
  --wx-水: #4a7ae8;
  color-scheme: dark;
  background: #0a0a0c;
}
body:not([data-view="result"]) {
  --bg: #0a0a0c;
  --bg2: #101014;
  --card: #141418;
  --card-solid: #141418;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --text: #e8e8ed;
  --muted: #8a8a96;
  --dim: #5c5c68;
  --muted2: #8a8a96;
  --accent: #3d7eff;
  --accent-hi: #5a92ff;
  --wx-木: #3fcf72;
  --wx-火: #ff4f5e;
  --wx-土: #b98552;
  --wx-金: #e8c040;
  --wx-水: #4a7ae8;
  color-scheme: dark;
  background: #0a0a0c !important;
  color: #e8e8ed !important;
}
/* 非结果页：即便 html 残留 data-skin=A/B，恢复科技底纹／卡片暗壳 */
html[data-skin="A"] body:not([data-view="result"]) .bg-grid,
html[data-skin="B"] body:not([data-view="result"]) .bg-grid,
html[data-skin="A"] body:not([data-view="result"]) .bg-dots,
html[data-skin="B"] body:not([data-view="result"]) .bg-dots,
html[data-skin="A"] body:not([data-view="result"]) .bg-scan,
html[data-skin="B"] body:not([data-view="result"]) .bg-scan {
  opacity: 1;
  visibility: visible;
}
html[data-skin="A"] body:not([data-view="result"]) .topbar,
html[data-skin="B"] body:not([data-view="result"]) .topbar {
  background: #0a0a0c;
  color: #e8e8ed;
}
html[data-skin="A"] body:not([data-view="result"]) .tabbar,
html[data-skin="B"] body:not([data-view="result"]) .tabbar {
  background: #141418;
  border-top-color: rgba(255,255,255,.08);
}
html[data-skin="A"] body:not([data-view="result"]) .panel,
html[data-skin="B"] body:not([data-view="result"]) .panel,
html[data-skin="A"] body:not([data-view="result"]) .card,
html[data-skin="B"] body:not([data-view="result"]) .card {
  background: #141418;
  color: #e8e8ed;
  border-color: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 0 0 1px rgba(61,126,255,.04), 0 8px 28px rgba(0,0,0,.28);
}
html[data-skin="A"] body:not([data-view="result"]) .panel::before,
html[data-skin="B"] body:not([data-view="result"]) .panel::before,
html[data-skin="A"] body:not([data-view="result"]) .card::before,
html[data-skin="B"] body:not([data-view="result"]) .card::before {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
html[data-skin="A"] body:not([data-view="result"]) .seg,
html[data-skin="B"] body:not([data-view="result"]) .seg {
  background: rgba(255,255,255,.03);
}
html[data-skin="A"] body:not([data-view="result"]) .btn,
html[data-skin="B"] body:not([data-view="result"]) .btn {
  background: transparent;
  box-shadow: none;
}
html[data-skin="A"] body:not([data-view="result"]) .btn-primary,
html[data-skin="B"] body:not([data-view="result"]) .btn-primary {
  background: var(--accent);
  color: #fff;
}
/* 快录：隐藏「导给」 */
body[data-view="quick"] #quick-target-row,
#quick-target-row[aria-hidden="true"] {
  display: none !important;
}

/* 凌霄 · 命盘风格卡 */
.lx-skin-card h3 { margin: 0 0 10px; font-size: 15px; letter-spacing: .06em; }
.lx-skin-card .lx-skin-hint { margin: 0 0 12px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.lx-skin-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.lx-skin-opt {
  flex: 1 1 120px; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line2); background: rgba(255,255,255,.03);
  color: var(--text); cursor: pointer; font: inherit; text-align: left;
}
.lx-skin-opt .lab { display: block; font-weight: 700; font-size: 14px; }
.lx-skin-opt .sub { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.lx-skin-opt.on { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(61,126,255,.45); background: rgba(61,126,255,.12); }
.lx-skin-opt[data-skin="A"] { background: #fff; color: #1c1c1e; border-color: rgba(28,28,30,.16); }
.lx-skin-opt[data-skin="A"] .sub { color: #4a4a4e; }
.lx-skin-opt[data-skin="B"] { background: #FBF7F0; color: #2A2420; border-color: #E4D9CB; }
.lx-skin-opt[data-skin="B"] .sub { color: #5C534C; }
.lx-skin-opt[data-skin="C"] { background: #16181E; color: #F7F5F2; border-color: #2A2D35; }
.lx-skin-opt[data-skin="C"] .sub { color: #D2CDC6; }
.lx-skin-opt[data-skin="F"] { background: #0B0C0F; color: #F7F5F2; border-color: #2A2D35; }
.lx-skin-opt[data-skin="F"] .sub { color: #D2CDC6; }
.lx-skin-opt[data-skin="A"].on,
.lx-skin-opt[data-skin="B"].on,
.lx-skin-opt[data-skin="C"].on,
.lx-skin-opt[data-skin="F"].on { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ==== 0.19.1 定稿 A 结果页／信息页／修改弹层（从零新建；设计宽 1206）==== */
:root {
  --da-bg: #FFFFFF;
  --da-text: #1c1c1e;
  --da-muted: #4a4a4e;
  --da-muted2: #6a6a70;
  --da-sel: #BACBD7;
  --da-qian: #1e5a8a;
  --da-kun: #8a3a5c;
  --da-line: #e6e6ea;
}
html[data-skin="A"] { --da-bg:#FFFFFF; --da-text:#1c1c1e; --da-muted:#4a4a4e; --da-muted2:#6a6a70; --da-sel:#BACBD7; }
html[data-skin="B"] { --da-bg:#F7F1E8; --da-text:#2A2420; --da-muted:#5C534C; --da-muted2:#7A7168; --da-sel:#D9CFC2; }
html[data-skin="C"] { --da-bg:#0B0C0F; --da-text:#F7F5F2; --da-muted:#D2CDC6; --da-muted2:#BDB8B0; --da-sel:#2C3038; }
html[data-skin="F"] { --da-bg:#05070C; --da-text:#F7F5F2; --da-muted:#D2CDC6; --da-muted2:#BDB8B0; --da-sel:#2C3038; }

#view-result.da-result,
#view-result.mp-skel,
#view-info.da-info {
  display: none;
  flex-direction: column;
  background: var(--da-bg);
  color: var(--da-text);
  min-height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
body[data-view="result"] #view-result.da-result,
body[data-view="result"] #view-result.mp-skel,
body[data-view="info"] #view-info.da-info { display: flex !important; }

.da-stage {
  container-type: inline-size;
  container-name: dastage;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  background: var(--da-bg);
  /* 设计 1206×2412 内容区比例；底部再留一点 */
  min-height: calc(100cqw * 2412 / 1206);
  padding-bottom: calc(100cqw * 48 / 1206);
}

/* F／Frank：拼贴底（contain·约七成·顶对齐生辰）；默认隐藏 */
.da-stage-bg,
.da-stage-veil {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.da-stage-bg { z-index: 0; }
.da-stage-veil { z-index: 1; }
.da-shift { z-index: 2; }
html[data-skin="F"] .da-stage { background: #05070C; }
html[data-skin="F"] .da-stage-bg { display: block; }
html[data-skin="F"] .da-stage-veil {
  display: block;
  background: linear-gradient(180deg, rgba(6,10,18,0.42) 0%, rgba(8,12,22,0.28) 40%, rgba(6,10,18,0.48) 100%);
}
html[data-skin="F"] .da-stage-bg img {
  position: absolute;
  left: 50%;
  top: calc(100cqw * 631.3125 / 1206);
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: calc(100cqw * 1780.6875 / 1206);
  object-fit: contain;
  object-position: center top;
  transform: translateX(-50%);
  filter: brightness(0.70) contrast(1.08);
  opacity: 0.55;
}
/* F 对齐定稿 D：日历／四柱／大运流年轨半透明透拼贴；滤镜数值不动 */
html[data-skin="F"] .da-cal,
html[data-skin="F"] .da-pillars,
html[data-skin="F"] .da-yun .mp-rail {
  background: rgba(12,14,18,0.72);
  border: 1px solid rgba(42,45,53,0.85);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
html[data-skin="C"] .da-yun .mp-lk.dayun,
html[data-skin="C"] .da-yun .mp-lk.liunian,
html[data-skin="F"] .da-yun .mp-lk.dayun,
html[data-skin="F"] .da-yun .mp-lk.liunian {
  border: 1px solid rgba(232,230,226,0.14);
}
.da-shift {
  position: relative;
  width: 100%;
  /* 定稿 content-shift top:112 —— margin 而非 padding，绝对子元素才随之下移 */
  margin-top: calc(100cqw * 112 / 1206);
  min-height: calc(100cqw * 2300 / 1206);
}

/* 顶栏：返回／logo／修改 — 相对 da-shift，对齐定稿 */
.da-back {
  position: absolute;
  left: calc(100cqw * 60 / 1206);
  top: calc(100cqw * 133 / 1206);
  height: calc(100cqw * 61.2 / 1206);
  display: flex; align-items: center;
  color: #2a2a2c;
  font-size: calc(100cqw * 61.2 / 1206);
  font-weight: 700;
  line-height: 1;
  border: 0; background: transparent; padding: 0;
  cursor: pointer; z-index: 2;
}
.da-logo {
  position: absolute;
  left: calc(100cqw * 511.5 / 1206);
  top: calc(100cqw * 106 / 1206);
  width: calc(100cqw * 180 / 1206);
  height: calc(100cqw * 115.2 / 1206);
  z-index: 2; pointer-events: none;
}
.da-logo img { width: 100%; height: 100%; object-fit: contain; display: block; -webkit-user-drag: none; }
.da-edit {
  position: absolute;
  right: calc(100cqw * 48 / 1206);
  top: calc(100cqw * 133 / 1206);
  height: calc(100cqw * 61.2 / 1206);
  display: flex; align-items: center; justify-content: flex-end;
  color: #2a2a2c;
  font-size: calc(100cqw * 48 / 1206);
  font-weight: 600;
  line-height: 1;
  border: 0; background: transparent; padding: 0;
  cursor: pointer; z-index: 2;
}
html[data-skin="C"] .da-back,
html[data-skin="C"] .da-edit,
html[data-skin="F"] .da-back,
html[data-skin="F"] .da-edit { color: #F0EDE8; }
html[data-skin="C"] .da-logo img,
html[data-skin="F"] .da-logo img { filter: brightness(0) invert(1) opacity(0.96); }

/* 身份行：乾／姓名／地 — 定稿列位 */
.da-who {
  position: absolute;
  left: 0; right: 0;
  top: calc(100cqw * 410.8125 / 1206);
  height: 0; /* 锚点行；子元素 translateY(-100%) */
  z-index: 1;
}
.da-who .mp-gan {
  position: absolute;
  left: calc(100cqw * 181.5 / 1206);
  top: 0;
  transform: translate(-50%, -100%);
  font-size: calc(100cqw * 72 / 1206);
  font-weight: 700;
  color: var(--da-qian);
  line-height: 1;
}
.da-who .mp-gan.kun { color: var(--da-kun); }
.da-who .mp-name {
  position: absolute;
  left: calc(100cqw * 321 / 1206);
  top: 0;
  transform: translateY(-100%);
  font-size: calc(100cqw * 37.11 / 1206);
  font-weight: 400;
  color: var(--da-muted);
  line-height: 1;
}
.da-who .mp-place {
  position: absolute;
  left: calc(100cqw * 896.078125 / 1206);
  top: 0;
  transform: translateY(-100%);
  font-size: calc(100cqw * 37.11 / 1206);
  font-weight: 400;
  color: var(--da-muted);
  line-height: 1;
  text-align: left;
}

/* 公农历卡 */
.da-cal {
  position: absolute;
  left: calc(100cqw * 41 / 1206);
  top: calc(100cqw * 519.3125 / 1206);
  width: calc(100cqw * 1124 / 1206);
  height: calc(100cqw * 289 / 1206);
  border-radius: calc(100cqw * 31 / 1206);
  background: var(--da-bg);
  overflow: hidden;
}
.da-cal .cal-row {
  position: absolute; left: 0; width: 100%;
  height: calc(100cqw * 144.5 / 1206);
}
.da-cal .cal-row.cal-solar { top: 0; }
.da-cal .cal-row.cal-lunar { top: calc(100cqw * 144.5 / 1206); }
.da-cal .cal-label {
  position: absolute;
  left: calc(100cqw * 140.5 / 1206);
  top: 50%; transform: translate(-50%, -50%);
  font-size: calc(100cqw * 37.11 / 1206);
  font-weight: 500; color: var(--da-muted); line-height: 1;
}
.da-cal .cal-date {
  position: absolute;
  left: calc(100cqw * 280 / 1206);
  top: 50%; transform: translateY(-50%);
  font-size: calc(100cqw * 37.11 / 1206);
  font-weight: 500; color: var(--da-text); line-height: 1;
}
.da-cal .cal-time {
  position: absolute;
  right: calc(100cqw * 102 / 1206);
  top: 50%; transform: translateY(-50%);
  font-size: calc(100cqw * 37.11 / 1206);
  font-weight: 500; color: var(--da-muted); line-height: 1; text-align: right;
}

/* 四柱卡 1124×647 @ top 834.3125 */
.da-pillars {
  position: absolute;
  left: calc(100cqw * 41 / 1206);
  top: calc(100cqw * 834.3125 / 1206);
  width: calc(100cqw * 1124 / 1206);
  height: calc(100cqw * 647 / 1206);
  border-radius: calc(100cqw * 12 / 1206);
  background: var(--da-bg);
  overflow: visible;
}
.da-pillars .mp-pillars-card { position: relative; width: 100%; height: 100%; container-type: inline-size; }
.da-pillars .mp-abs {
  position: absolute;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.da-pillars .top-shishen {
  font-size: calc(100cqw * 40.821 / 1206);
  font-weight: 500; color: var(--da-muted);
}
.da-pillars .mp-ganzhi {
  font-size: calc(100cqw * 71.191 / 1206);
  font-weight: 500;
}
.da-pillars .mp-cang-gan {
  font-size: calc(100cqw * 40.821 / 1206);
  font-weight: 500;
}
.da-pillars .canggan-shishen {
  font-size: calc(100cqw * 40.821 / 1206) !important;
  font-weight: 500 !important;
  color: var(--da-muted2) !important;
}
.da-pillars .mp-seal {
  transform: translate(-50%, -50%);
  z-index: 1;
}
.da-pillars .mp-seal img.riyuan-mark {
  width: calc(100cqw * 95 / 1206);
  height: auto; display: block;
  pointer-events: none; border: 0; background: transparent;
}

/* 大运／流年 */
.da-yun { position: absolute; left: 0; right: 0; top: 0; height: 0; pointer-events: none; }
.da-yun .mp-rail-block { pointer-events: auto; }
.da-yun .mp-rail-label {
  position: absolute;
  left: calc(100cqw * 41 / 1206);
  font-size: calc(100cqw * 34.02 / 1206);
  font-weight: 500; color: var(--da-text); line-height: 1;
}
.da-yun .mp-rail-label.dayun { top: calc(100cqw * 1521.3125 / 1206); }
.da-yun .mp-rail-label.liunian { top: calc(100cqw * 1883.3125 / 1206); }
.da-yun .mp-rail {
  position: absolute;
  left: calc(100cqw * 41 / 1206);
  width: calc(100cqw * 1124 / 1206);
  background: var(--da-bg);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  display: block;
  scrollbar-width: none;
}
.da-yun .mp-rail::-webkit-scrollbar { display: none; }
.da-yun .mp-rail.dayun {
  top: calc(100cqw * 1565.3125 / 1206);
  height: calc(100cqw * 280 / 1206);
}
.da-yun .mp-rail.liunian {
  top: calc(100cqw * 1933.3125 / 1206);
  height: calc(100cqw * 260 / 1206);
}
.da-yun .mp-rail-inner { position: relative; height: 100%; }
.da-yun .mp-lk {
  position: absolute; top: 0; height: 100%;
  border: 0; outline: 0; box-shadow: none;
  background: transparent;
  padding: 0; margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* 表列感：低圆角近矩形，禁大胶囊 */
  border-radius: calc(100cqw * 10 / 1206);
}
.da-yun .mp-lk.dayun {
  border: 1px solid rgba(42,42,44,0.10);
  box-sizing: border-box;
  border-radius: calc(100cqw * 10 / 1206);
}
.da-yun .mp-lk.dayun.on {
  border-color: transparent;
  background: var(--da-sel);
}
.da-yun .mp-lk.liunian {
  /* 法爷 PC 目视 1102：流年同大运有格（细边框＋同圆角，圆角露底成格缝） */
  border: 1px solid rgba(42,42,44,0.10);
  box-sizing: border-box;
  border-radius: calc(100cqw * 10 / 1206);
  background: transparent;
}
.da-yun .mp-lk.liunian.on {
  border-color: transparent;
  background: var(--da-sel);
  border-radius: calc(100cqw * 10 / 1206);
}
.da-yun .mp-lk .y,
.da-yun .mp-lk .a {
  position: absolute; left: 0; width: 100%;
  text-align: center; line-height: 1;
  transform: translateY(-50%);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}
.da-yun .mp-lk.dayun .y {
  top: calc(100% * 42.5 / 280);
  font-size: calc(100cqw * 34.02 / 1206);
  color: var(--da-muted);
}
.da-yun .mp-lk.dayun .a {
  top: calc(100% * 86.5 / 280);
  font-size: calc(100cqw * 30.92 / 1206);
  color: var(--da-muted2);
}
.da-yun .mp-lk.liunian .y {
  top: calc(100% * 35.5 / 260);
  font-size: calc(100cqw * 30.92 / 1206);
  color: var(--da-muted);
}
.da-yun .mp-lk.liunian .a {
  top: calc(100% * 76 / 260);
  font-size: calc(100cqw * 27.83 / 1206);
  color: var(--da-muted2);
}
.da-yun .pair-row {
  position: absolute; left: 0; width: 100%;
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  transform: translateY(-50%);
  line-height: 1; white-space: nowrap; pointer-events: none;
}
.da-yun .mp-lk.dayun .pair-row { column-gap: calc(100cqw * 6 / 1206); }
.da-yun .mp-lk.liunian .pair-row { column-gap: calc(100cqw * 4 / 1206); }
.da-yun .mp-lk.dayun .pair-gan { top: calc(100% * 166.5 / 280); }
.da-yun .mp-lk.dayun .pair-zhi { top: calc(100% * 224.5 / 280); }
.da-yun .mp-lk.liunian .pair-gan { top: calc(100% * 156 / 260); }
.da-yun .mp-lk.liunian .pair-zhi { top: calc(100% * 210 / 260); }
.da-yun .pair-row .gz { font-weight: 400; line-height: 1; }
.da-yun .pair-row .ss { color: var(--da-muted2); font-weight: 400; line-height: 1; }
.da-yun .mp-lk.dayun .pair-row .gz { font-size: calc(100cqw * 48.243 / 1206); }
.da-yun .mp-lk.dayun .pair-row .ss { font-size: calc(100cqw * 24.74 / 1206); }
.da-yun .mp-lk.liunian .pair-row .gz { font-size: calc(100cqw * 44.226 / 1206); }
.da-yun .mp-lk.liunian .pair-row .ss { font-size: calc(100cqw * 23.19 / 1206); }
.da-yun .mp-yun-empty {
  position: absolute;
  left: calc(100cqw * 41 / 1206);
  top: calc(100cqw * 1565.3125 / 1206);
  font-size: calc(100cqw * 28 / 1206);
  color: var(--da-muted2);
}

/* 五行字色＝五行力计算器正本（全肤同套；法爷钉死 1102） */
.da-pillars .wx-木, .da-yun .gz.wx-木 { color: #3fcf72; }
.da-pillars .wx-火, .da-yun .gz.wx-火 { color: #ff4f5e; }
.da-pillars .wx-土, .da-yun .gz.wx-土 { color: #b98552; }
.da-pillars .wx-金, .da-yun .gz.wx-金 { color: #e8c040; }
.da-pillars .wx-水, .da-yun .gz.wx-水 { color: #4a7ae8; }

/* —— 信息页（线框） —— */
.di-title {
  position: absolute;
  left: calc(100cqw * 41 / 1206);
  top: calc(100cqw * 280 / 1206);
  font-size: calc(100cqw * 48 / 1206);
  font-weight: 700; color: var(--da-text); line-height: 1;
}
.di-sub {
  position: absolute;
  left: calc(100cqw * 41 / 1206);
  top: calc(100cqw * 350 / 1206);
  width: calc(100cqw * 1124 / 1206);
  font-size: calc(100cqw * 28 / 1206);
  font-weight: 400; color: var(--da-muted2); line-height: 1.3;
}
.di-panel {
  position: absolute;
  left: calc(100cqw * 41 / 1206);
  top: calc(100cqw * 430 / 1206);
  width: calc(100cqw * 1124 / 1206);
  border-radius: calc(100cqw * 24 / 1206);
  border: 1px solid var(--da-line);
  background: #fff;
  overflow: hidden;
}
html[data-skin="B"] .di-panel { background: #FBF7F0; border-color: #E4D9CB; }
html[data-skin="C"] .di-panel { background: #16181E; border-color: #2A2D35; }
html[data-skin="F"] .di-panel { background: rgba(12,14,18,0.72); border-color: #2A2D35; }
.di-panel .info-row {
  display: flex; align-items: flex-start;
  min-height: calc(100cqw * 112 / 1206);
  padding: calc(100cqw * 28 / 1206) calc(100cqw * 40 / 1206);
  border-bottom: 1px solid var(--da-line);
}
.di-panel .info-row:last-child { border-bottom: 0; }
.di-panel .label {
  width: calc(100cqw * 350 / 1206);
  flex-shrink: 0;
  font-size: calc(100cqw * 34 / 1206);
  font-weight: 500; color: var(--da-muted); line-height: 1.35;
  padding-top: calc(100cqw * 4 / 1206);
}
.di-panel .value {
  flex: 1;
  font-size: calc(100cqw * 36 / 1206);
  font-weight: 500; color: var(--da-text); line-height: 1.4;
}
.di-panel .hint {
  font-size: calc(100cqw * 26 / 1206);
  font-weight: 400; color: var(--da-muted2);
  margin-top: calc(100cqw * 8 / 1206);
}
.di-note {
  position: absolute;
  left: calc(100cqw * 41 / 1206);
  top: calc(100cqw * 1520 / 1206);
  width: calc(100cqw * 1124 / 1206);
  font-size: calc(100cqw * 28 / 1206);
  color: var(--da-muted2); line-height: 1.5;
  margin: 0;
}

/* —— 修改弹层（0.19.3 线框四字段紧凑；设计宽 1206 比例用 vw） —— */
.di-modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
}
.di-modal.hidden { display: none !important; }
.di-modal-mask {
  position: absolute; inset: 0;
  background: rgba(28,28,30,0.42);
}
.di-modal-card {
  position: relative;
  z-index: 1;
  /* 线框：宽 920／1206 ≈ ¾；高约 ⅓ 画幅；偏中部（flex center ≈ top 50～52%） */
  width: calc(100vw * 920 / 1206);
  max-width: calc(100vw * 920 / 1206);
  max-height: 42vh;
  overflow: auto;
  background: #fff;
  border-radius: calc(100vw * 28 / 1206);
  box-shadow: 0 18px 60px rgba(0,0,0,0.18);
  padding: calc(100vw * 48 / 1206) calc(100vw * 56 / 1206) calc(100vw * 56 / 1206);
}
.di-modal-title {
  font-size: calc(100vw * 44 / 1206);
  font-weight: 700; color: #1c1c1e; line-height: 1;
  margin: 0 calc(100vw * 80 / 1206) calc(100vw * 36 / 1206) 0;
}
.di-modal-close {
  position: absolute;
  right: calc(100vw * 40 / 1206);
  top: calc(100vw * 40 / 1206);
  font-size: calc(100vw * 36 / 1206);
  font-weight: 500; color: #6a6a70;
  border: 0; background: transparent; cursor: pointer;
  padding: 0; line-height: 1;
}
.di-modal-field {
  display: flex; align-items: center;
  min-height: calc(100vw * 88 / 1206);
  border-bottom: 1px solid var(--da-line);
  padding: calc(100vw * 12 / 1206) 0;
  gap: calc(100vw * 12 / 1206);
}
.di-modal-field:last-of-type { border-bottom: 0; }
.di-modal-label {
  width: calc(100vw * 220 / 1206);
  flex-shrink: 0;
  font-size: calc(100vw * 32 / 1206);
  font-weight: 500; color: var(--da-muted);
}
.di-modal-input {
  flex: 1; min-width: 0;
  font-size: calc(100vw * 34 / 1206);
  font-weight: 500; color: var(--da-text);
  padding: calc(100vw * 16 / 1206) calc(100vw * 20 / 1206);
  border: 1px solid var(--da-line);
  border-radius: calc(100vw * 14 / 1206);
  background: #f7f8fa;
}
/* 0.19.4：出生地 type=search 被全局 input[type=search] 盖掉；抬特异度对齐姓名行 */
#edit-birth-modal .di-modal-input,
#edit-birth-modal input.di-modal-input[type=search],
#edit-birth-modal #eb-place {
  /* 对齐命盘输入页 .fctl input：字号／圆角／高度；禁 vw 缩字 */
  flex: 1; min-width: 0;
  width: 100%;
  min-height: 44px;
  height: auto;
  font-size: 15px;
  font-weight: 500; color: var(--da-text);
  padding: 10px 12px;
  border: 1px solid var(--da-line);
  border-radius: 8px;
  background: #f7f8fa;
  box-shadow: none;
  -webkit-appearance: none; appearance: none;
  outline: none;
  box-sizing: border-box;
}
#edit-birth-modal .di-modal-input:focus,
#edit-birth-modal input.di-modal-input[type=search]:focus,
#edit-birth-modal #eb-place:focus {
  border-color: var(--da-line);
  box-shadow: none;
  background: #f7f8fa;
}
#edit-birth-modal #eb-place-combo.place-combo {
  flex: 1; min-width: 0;
  min-height: 0;
  height: auto;
  display: flex; align-items: stretch;
}
.di-modal-seg { display: none !important; } /* 0.19.3：性别改单值，禁蓝底双选 */
.di-modal-hm { display: flex; gap: 8px; flex: 1; }
.di-modal-hm input { flex: 1; min-height: 40px; border-radius: 12px; border: 1px solid var(--da-line); padding: 8px; background: #f7f8fa; }
.di-modal-adv { display: none !important; } /* 历法／真太阳／夏令视觉删除 */
.di-modal-hidden-state { display: none !important; }
.di-modal-actions {
  display: flex; justify-content: flex-end;
  gap: calc(100vw * 20 / 1206);
  margin-top: calc(100vw * 40 / 1206);
}
.di-modal-btn {
  min-width: calc(100vw * 160 / 1206);
  height: calc(100vw * 72 / 1206);
  border-radius: calc(100vw * 16 / 1206);
  font-size: calc(100vw * 32 / 1206);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; line-height: 1;
}
.di-modal-btn.cancel { background: #f0f1f4; color: #4a4a4e; }
.di-modal-btn.ok { background: #1e5a8a; color: #fff; }

/* 桌面加宽结果舞台 */
@media (min-width: 720px) {
  .da-stage { max-width: 430px; }
}

/* 0.19.1 full-bleed result/info vs dinggao A */
body[data-view="result"] .topbar,
body[data-view="info"] .topbar,
body[data-view="quick"] .topbar,
body[data-view="result"] .tabbar,
body[data-view="info"] .tabbar,
body[data-view="quick"] .tabbar { display: none !important; }
body[data-view="result"] .shell,
body[data-view="info"] .shell,
body[data-view="quick"] .shell {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  display: block !important;
  grid-template-columns: none !important;
}
body[data-view="result"] #main,
body[data-view="info"] #main,
body[data-view="quick"] #main {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
body[data-view="result"] .da-stage,
body[data-view="info"] .da-stage {
  max-width: none;
  width: 100%;
}
body[data-view="result"],
body[data-view="info"] {
  background: var(--da-bg, #fff);
}

/* ==== PHASE1 SHELL 1102 ==== */
/* ② 全站去底栏 */
.tabbar { display: none !important; }
body.xby-no-tabbar .tabbar,
body.lx-no-tabbar .tabbar { display: none !important; }
body.xby-no-tabbar .shell,
body.lx-no-tabbar .shell { padding-bottom: calc(24px + var(--sab)); }
body.xby-no-tabbar .toast,
body.lx-no-tabbar .toast { bottom: calc(var(--sab) + 18px); }

/* 排盘／快录：藏管理／改密码顶栏钮（保留用户芯片／退出／后台回凌霄） */
body.xby-hide-admin-top .xby-admin-only { display: none !important; }
body[data-view="input"] .topbar .topnav { display: none !important; }

/* ② 未登录／凌霄／输入／登录相关：锁科技黑（皮肤变量不泄漏到非结果页） */
body:not([data-view="result"]) {
  background: #0a0a0c !important;
  color: #e8e8ed !important;
}
body:not([data-view="result"]) {
  --bg: #0a0a0c;
  --bg2: #101014;
  --card: #141418;
  --card-solid: #141418;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --text: #e8e8ed;
  --muted: #8a8a96;
  --dim: #5c5c68;
  --accent: #3d7eff;
  --accent-hi: #5a92ff;
}
/* 信息页：科技黑壳（风格只罩结果页） */
body[data-view="info"] #view-info.da-info,
body[data-view="info"] .da-stage {
  background: #05070C !important;
  color: #F0EDE8 !important;
  --da-bg: #05070C;
  --da-text: #F0EDE8;
  --da-muted: #9a9aa3;
  --da-muted2: #6a6a70;
  --da-sel: #2C3038;
}
body[data-view="info"] .di-panel {
  background: rgba(20, 22, 28, 0.92) !important;
  border-color: rgba(255,255,255,0.12) !important;
}
body[data-view="info"] {
  background: #05070C !important;
  overflow: hidden;
  overscroll-behavior: none;
  height: 100dvh;
}
body[data-view="info"] .da-back,
body[data-view="info"] .da-edit { color: #F0EDE8 !important; }
body[data-view="info"] .da-logo img { filter: brightness(0) invert(1) opacity(0.96); }
body[data-view="info"] .di-title,
body[data-view="info"] .di-panel,
body[data-view="info"] .info-row .label,
body[data-view="info"] .info-row .value { color: #F0EDE8; }
body[data-view="info"] .info-row .label { color: #9a9aa3; }
body[data-view="info"] .da-stage-bg { opacity: 0.18; }
body[data-view="info"] .da-stage-veil { background: rgba(5,7,12,0.72); }
/* 禁拖拽 */
body[data-view="info"] img,
body[data-view="info"] .da-stage,
body[data-view="info"] .da-shift {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
body[data-view="info"] .di-panel { user-select: text; -webkit-user-select: text; }

/* ④ 结果页返回字号＝原「修改」档；右上更多信息 */
body[data-view="result"] .da-back {
  font-size: calc(100cqw * 48 / 1206);
  font-weight: 600;
}
body[data-view="result"] .da-edit {
  font-size: calc(100cqw * 48 / 1206);
  font-weight: 600;
  max-width: 42%;
  white-space: nowrap;
}

/* ④ 一屏定死（手机主视口；键盘顶起时浏览器自理，松手回固定） */
@media (max-width: 1023px) {
  body[data-view="home"],
  body[data-view="input"],
  body[data-view="result"],
  body[data-view="info"] {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }
  body[data-view="home"] .shell,
  body[data-view="input"] .shell {
    height: calc(100dvh - var(--top-h) - var(--sat));
    max-height: calc(100dvh - var(--top-h) - var(--sat));
    overflow: hidden;
    padding-bottom: calc(16px + var(--sab));
  }
  body[data-view="home"] .hero {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  body[data-view="input"] .side {
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  body[data-view="result"] .shell,
  body[data-view="info"] .shell {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  body[data-view="result"] .da-stage,
  body[data-view="info"] .da-stage {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
}

/* ④ 输入：主钮白字／淡框对比；出生地选定不展开经纬（已 hidden，强化） */
#view-input .btn-primary,
#view-input #btn-submit {
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 22px rgba(61,126,255,.28);
}
#view-input .btn-ghost {
  color: #e8e8ed;
  border-color: rgba(255,255,255,0.18);
}
#view-input .place-coord-hint,
#view-input #lon:not([type=hidden]),
#view-input #lat:not([type=hidden]) { display: none !important; }
.place-suggest { max-height: 40vh; }
/* 选定后联想收起由 JS hidePlaceSuggest；禁止经纬行展开 */
#eb-coord-hint { display: none !important; }

/* ⑤ 修改弹层拉大；出生时间触发器；顶说明已删（无 hint 节点） */
#edit-birth-modal .di-modal-hint,
#edit-birth-modal .xby-modal-hint { display: none !important; }
#edit-birth-modal .di-modal-card {
  width: min(94vw, 440px);
  max-width: min(94vw, 440px);
  max-height: 82vh;
  padding: 26px 22px 22px;
}
#edit-birth-modal .di-modal-title {
  font-size: 18px;
  margin-bottom: 16px;
}
#edit-birth-modal .di-modal-field { min-height: 52px; }
#edit-birth-modal .di-modal-label { width: 5.5em; font-size: 14px; }
#edit-birth-modal .di-modal-input,
#edit-birth-modal .di-modal-birth-trigger {
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
  display: flex; align-items: center;
}
#edit-birth-modal .di-modal-birth-trigger {
  width: 100%;
  box-sizing: border-box;
}
#edit-birth-modal .di-modal-actions { margin-top: 18px; }
#edit-birth-modal .di-modal-btn {
  min-width: 96px;
  height: 44px;
  font-size: 15px;
  border-radius: 12px;
}

/* 凌霄不跟结果页换肤：显式锁暗（选肤只写 localStorage＋结果页） */
body[data-view="lingxiao"],
body[data-view="lingxiao"] #view-lingxiao {
  background: #0a0a0c !important;
  color: #e8e8ed !important;
}
body[data-view="lingxiao"][data-skin],
html[data-skin] body[data-view="lingxiao"] {
  /* 即使误挂 data-skin 也不吃命盘浅底 */
  background: #0a0a0c !important;
}


/* ==== XBY LIBRARY ORAL 1102 ==== */
/* 目录页全屏科技黑壳（非结果页）；共用顶栏模板对齐 da-shift／da-logo／da-back／da-edit */
body[data-view="library"] .topbar,
body[data-view="library"] .tabbar { display: none !important; }
body[data-view="library"] .bg-grid,
body[data-view="library"] .bg-dots,
body[data-view="library"] .bg-scan { display: none !important; }
body[data-view="library"] .shell {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  display: block !important;
  grid-template-columns: none !important;
}
body[data-view="library"] #main {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
body[data-view="library"] {
  background: #0a0b0d !important;
  color: #e8eaef !important;
  overflow: hidden;
}
#view-library.library {
  --lib-safe-top: env(safe-area-inset-top, 0px);
  --lib-safe-bottom: env(safe-area-inset-bottom, 0px);
  --lib-accent: #6ea8ff;
  --lib-star: #f5c542;
  --lib-danger: #ff6b6b;
  --lib-line: rgba(255,255,255,0.08);
  --lib-muted: #8b90a0;
  --lib-placeholder: #5c6170;
  --lib-bg: #0a0b0d;
  --lib-elev: #12141a;
  /* 对齐结果页 da-shift：定稿 top 112 即灵动岛留白，勿再叠 safe-area */
  --xby-topbar-h: calc(100cqw * 112 / 1206 + 100cqw * 230 / 1206);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--lib-bg);
  color: #e8eaef;
  container-type: inline-size;
  overflow: hidden;
}
#view-library .lib-guest {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  max-width: none;
}
#view-library .lib-guest.hidden { display: none !important; }
#view-library .lib-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: var(--xby-topbar-h) auto auto minmax(0, 1fr);
  height: 100%;
  max-height: 100%;
  overflow: hidden; /* 列表区自己滚，整页禁分页 */
  background: var(--lib-bg);
  container-type: inline-size;
}
#view-library .lib-main.hidden { display: none !important; }

/* 共用顶栏（目录页专用 class；尺寸锁死结果页公式） */
.xby-topbar {
  position: relative;
  width: 100%;
  height: var(--xby-topbar-h, calc(100cqw * 112 / 1206 + 100cqw * 230 / 1206));
  background: #0a0b0d;
  border-bottom: 0; /* 口播：logo 勿压线／拆多余行 */
  container-type: inline-size;
  overflow: hidden;
}
.xby-topbar-shift {
  position: relative;
  width: 100%;
  height: 100%;
  /* 同 .da-shift：定稿 content-shift top:112 */
  margin-top: calc(100cqw * 112 / 1206);
}
.xby-topbar-logo {
  position: absolute;
  left: calc(100cqw * 511.5 / 1206);
  top: calc(100cqw * 106 / 1206);
  width: calc(100cqw * 180 / 1206);
  height: calc(100cqw * 115.2 / 1206);
  z-index: 2; pointer-events: none;
}
.xby-topbar-logo img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  filter: brightness(0) invert(1) opacity(0.96);
  -webkit-user-drag: none;
}
.xby-topbar-side {
  position: absolute;
  top: calc(100cqw * 133 / 1206);
  height: calc(100cqw * 61.2 / 1206);
  width: calc(100cqw * 61.2 / 1206);
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; padding: 0;
  color: #F0EDE8; cursor: pointer; z-index: 2;
}
.xby-topbar-side svg {
  width: calc(100cqw * 64 / 1206);
  height: calc(100cqw * 64 / 1206);
}
/* 口播续：齿轮＋铅笔相对当前目录肉眼尺寸各约＋50%（槽＋svg 同比例；logo／da-shift 留白不动） */
#view-library .xby-topbar-side {
  height: calc(100cqw * 114 / 1206); /* was 76 */
  width: calc(100cqw * 114 / 1206);
}
#view-library .xby-topbar-side svg {
  width: calc(100cqw * 96 / 1206); /* was 64 */
  height: calc(100cqw * 96 / 1206);
}
.xby-topbar-left { left: calc(100cqw * 60 / 1206); }
.xby-topbar-right {
  right: calc(100cqw * 48 / 1206);
  width: auto; min-width: calc(100cqw * 61.2 / 1206);
  justify-content: flex-end;
}
#view-library .xby-topbar-right {
  width: calc(100cqw * 114 / 1206);
  min-width: calc(100cqw * 114 / 1206);
  justify-content: center;
}
.xby-topbar-side:active { opacity: 0.7; }
.xby-topbar-side[aria-pressed="true"] { color: #9ec4ff; }

#view-library .lib-search-row {
  display: flex; align-items: center; gap: 8px;
  /* 口播续：再加宽约20%＋再略下压（左右再收；高度／字号约＋20%） */
  padding: 24px 4px 12px;
}
#view-library .lib-search {
  flex: 1; display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px; /* was 40 */
  background: #12141a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  color: #8b90a0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
#view-library .lib-search-ico { width: 18px; height: 18px; flex-shrink: 0; color: #8b90a0; }
#view-library .lib-search input {
  flex: 1; min-width: 0; border: 0; outline: 0;
  background: transparent; color: #e8eaef;
  font-size: 16px; line-height: 1.2;
}
#view-library .lib-search input::placeholder { color: #5c6170; font-weight: 400; }

#view-library .lib-list-wrap {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 0; /* 口播拆多余行 */
  min-height: 0;
  height: auto;
  max-height: none; /* 禁锁死高度导致滚不动；占 grid 1fr */
  flex: 1 1 auto;
}
#view-library .lib-file-list { list-style: none; margin: 0; padding: 0; }
#view-library .lib-file-row {
  display: grid;
  /* 撑满：星约+50%；编号 6 位槽显约 4；档名／备注留足宽 */
  grid-template-columns: 44px 60px minmax(0, 1.1fr) minmax(0, 1.4fr);
  align-items: center;
  column-gap: 10px;
  min-height: 54px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
#view-library .lib-file-row:active { background: rgba(255,255,255,0.03); }
#view-library .lib-lead {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}
#view-library .lib-star-btn {
  width: 44px; height: 44px; border: 0; background: transparent;
  color: #8b90a0; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
#view-library .lib-star-btn svg { width: 33px; height: 33px; }
#view-library .lib-star-btn.on { color: #f5c542; }
#view-library .lib-chk {
  width: 28px; height: 28px; border-radius: 7px;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: transparent; color: #6ea8ff;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; font-size: 16px; line-height: 1;
}
#view-library .lib-chk.on { background: rgba(110,168,255,0.22); border-color: #6ea8ff; }
body.lib-select-mode #view-library .lib-star-btn { display: none; }
body.lib-select-mode #view-library .lib-chk { display: inline-flex; }
#view-library .lib-col-no {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; color: #8b90a0;
  text-align: left; letter-spacing: 0.02em;
  white-space: nowrap;
}
#view-library .lib-col-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 15px; line-height: 1.3; min-width: 0;
  color: #e8eaef; font-weight: 500;
}
/* 口播②：备注超 8 字折行，最多约 16 字两行 */
#view-library .lib-col-remark {
  color: #8b90a0; font-size: 13px; line-height: 1.35; min-width: 0;
  max-width: 8.2em;
  white-space: normal;
  word-break: break-all;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
}
#view-library .lib-row-hit {
  border: 0; background: transparent; padding: 0; margin: 0;
  text-align: left; color: inherit; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0; width: 100%;
  font: inherit;
}
#view-library .lib-row-hit.lib-col-remark {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-width: 8.2em;
  word-break: break-all;
}
#view-library .lib-trail {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; min-width: 0; min-height: 28px;
}
#view-library .lib-act {
  border: 0; background: transparent; color: #6ea8ff;
  font-size: 14px; padding: 4px 2px; cursor: pointer; white-space: nowrap;
  display: none;
}
#view-library .lib-act.del { color: #ff6b6b; }
body.lib-select-mode #view-library .lib-col-remark { display: none; }
body.lib-select-mode #view-library .lib-act { display: inline; }
#view-library .lib-list-tail {
  text-align: center; color: #5c6170;
  font-size: 12px; padding: 18px 12px 8px; margin: 0;
}
#view-library .lib-empty {
  text-align: center; color: #8b90a0; padding: 40px 16px; font-size: 14px; margin: 0;
}
#view-library .lib-empty:empty { display: none; }



/* 口播③：搜索下方靠右「特殊点选」（多选唯一入口；顶栏大铅笔已删） */
#view-library .lib-special-row {
  display: flex !important;
  justify-content: flex-end;
  align-items: center;
  visibility: visible !important;
  opacity: 1 !important;
  /* 随搜索下压后再略向下 */
  padding: 14px 14px 16px;
  min-height: 40px;
  box-sizing: border-box;
}
#view-library .lib-special-btn {
  display: inline-block !important;
  border: 0; background: transparent;
  color: #9ec4ff; font-size: 15px; font-weight: 600;
  padding: 8px 4px; cursor: pointer; line-height: 1.2;
  letter-spacing: 0.06em;
  -webkit-tap-highlight-color: transparent;
}
#view-library .lib-special-btn[aria-pressed="true"],
body.lib-select-mode #view-library .lib-special-btn { color: #6ea8ff; }

/* 口播⑤：目录页修改弹层跟黑页（复用同一 di-modal，勿白壳） */
body[data-view="library"] #edit-birth-modal .di-modal-mask {
  background: rgba(0,0,0,0.62);
}
body[data-view="library"] #edit-birth-modal .di-modal-card {
  background: #12141a;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e8eaef;
}
body[data-view="library"] #edit-birth-modal .di-modal-title { color: #e8eaef; }
body[data-view="library"] #edit-birth-modal .di-modal-close { color: #8b90a0; }
body[data-view="library"] #edit-birth-modal .di-modal-label { color: #8b90a0; }
body[data-view="library"] #edit-birth-modal .di-modal-field {
  border-bottom-color: rgba(255,255,255,0.08);
}
body[data-view="library"] #edit-birth-modal .di-modal-input,
body[data-view="library"] #edit-birth-modal input.di-modal-input[type=search],
body[data-view="library"] #edit-birth-modal #eb-place,
body[data-view="library"] #edit-birth-modal .di-modal-birth-trigger {
  background: #0a0b0d !important;
  color: #e8eaef !important;
  border-color: rgba(255,255,255,0.14) !important;
  font-size: 15px !important; /* 跟输入页 .fctl input，禁缩小 */
  min-height: 44px;
  border-radius: 8px;
  padding: 10px 12px;
  box-sizing: border-box;
}
body[data-view="library"] #edit-birth-modal .di-modal-input:focus,
body[data-view="library"] #edit-birth-modal input.di-modal-input[type=search]:focus,
body[data-view="library"] #edit-birth-modal #eb-place:focus {
  background: #0a0b0d !important;
  border-color: rgba(110,168,255,0.45) !important;
}
body[data-view="library"] #edit-birth-modal .di-modal-btn.cancel {
  background: #1a1c22; color: #c8cad0;
}
body[data-view="library"] #edit-birth-modal .di-modal-btn.ok {
  background: #1e5a8a; color: #fff;
}
body[data-view="library"] #edit-birth-modal .place-suggest {
  background: #12141a; color: #e8eaef;
  border: 1px solid rgba(255,255,255,0.12);
}

/* ==== QUICK onescreen 1102（去顶栏／一屏） ==== */
/* 对外域名口径：kekeke.masterfa.com（五字母 kekeke；kekeek 作废／非 quick.masterfa.com）；本改勿装机 */
body[data-view="quick"] .topbar,
body[data-view="quick"] .tabbar { display: none !important; }
body[data-view="quick"] #view-quick .about-bar { display: none !important; }
body[data-view="quick"] {
  --bg: #0a0a0c;
  --bg2: #101014;
  --card: #141418;
  --card-solid: #141418;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --text: #e8e8ed;
  --muted: #8a8a96;
  --dim: #5c5c68;
  background: #0a0a0c !important;
  color: #e8e8ed !important;
  color-scheme: dark;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
html:has(body[data-view="quick"]) {
  background: #0a0a0c;
  color-scheme: dark;
}
body[data-view="quick"] .shell {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
}
body[data-view="quick"] #view-quick.quick {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column;
}
body[data-view="quick"] #quick-form.quick-card {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100dvh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  gap: 6px;
  padding: 8px 12px calc(8px + var(--sab));
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: #0a0a0c !important;
  color: #e8e8ed !important;
}
html[data-skin="A"] body[data-view="quick"] #quick-form.quick-card,
html[data-skin="B"] body[data-view="quick"] #quick-form.quick-card {
  background: #0a0a0c !important;
  color: #e8e8ed !important;
  box-shadow: none !important;
}
body[data-view="quick"] .quick-title { color: #e8e8ed; }
body[data-view="quick"] .quick-row .lab { color: #8a8a96; }
body[data-view="quick"] #quick-form input[type=text],
body[data-view="quick"] #quick-form select {
  background: rgba(255,255,255,.03);
  color: #e8e8ed;
  border: 1px solid rgba(255,255,255,.10);
  text-align: left;
}
body[data-view="quick"] #quick-form input[type=text]::placeholder {
  color: #5c5c68;
}
body[data-view="quick"] .quick-preview {
  background: rgba(255,255,255,.03);
  color: #8a8a96;
  border-color: rgba(255,255,255,.12);
}
body[data-view="quick"] .quick-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
}
body[data-view="quick"] .quick-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
}
body[data-view="quick"] .quick-back-lx {
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1;
  color: var(--dim, #5c5c68);
  text-decoration: none;
  padding: 2px 0;
  opacity: .7;
}
body[data-view="quick"] .quick-back-lx:hover,
body[data-view="quick"] .quick-back-lx:focus {
  color: var(--muted, #8a8a96);
  opacity: 1;
}
body[data-view="quick"] .quick-hint {
  font-size: 10px;
  line-height: 1.25;
  margin: 0;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body[data-view="quick"] .quick-hint code {
  font-size: 10px;
  padding: 0 3px;
}
body[data-view="quick"] .quick-row {
  gap: 6px;
  margin: 0;
  padding: 0;
  min-height: 0;
}
body[data-view="quick"] .quick-row .lab {
  min-width: 52px;
  font-size: 11px;
}
body[data-view="quick"] .quick-row .fctl input[type=text],
body[data-view="quick"] .quick-row .fctl select,
body[data-view="quick"] #quick-form input[type=text],
body[data-view="quick"] #quick-form select {
  min-height: 34px !important;
  height: 34px;
  padding: 4px 8px !important;
  font-size: 13px;
  border-radius: 7px;
}
body[data-view="quick"] .quick-gender-wrap {
  gap: 6px;
}
body[data-view="quick"] .quick-gender-wrap input {
  width: 64px;
  min-height: 34px !important;
  height: 34px;
}
body[data-view="quick"] .quick-gender-wrap .seg button {
  min-height: 28px;
  font-size: 12px;
  padding: 0 8px;
}
body[data-view="quick"] .quick-preview {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 7px;
  margin: 0;
}
body[data-view="quick"] .quick-actions {
  gap: 6px;
  margin: 0;
}
body[data-view="quick"] .quick-actions .btn,
body[data-view="quick"] .quick-actions .btn-lg {
  min-height: 38px !important;
  height: 38px;
  font-size: 14px;
  border-radius: 8px;
  padding: 0 14px;
}
body[data-view="quick"] #view-quick > .site-slogan,
body[data-view="quick"] .site-slogan {
  display: none !important;
}
body[data-view="quick"] .error {
  margin-top: 4px;
  padding: 6px 8px;
  font-size: 12px;
}
body[data-view="quick"] .toggle {
  transform: scale(0.88);
  transform-origin: left center;
}
@media (max-width: 1023px) {
  body[data-view="quick"] {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }
  body[data-view="quick"] .shell {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
}


/* ---- library: 左上「快速排盘」文字钮 ---- */
.xby-topbar-side.xby-topbar-text {
  width: auto;
  min-width: calc(100cqw * 120 / 1206);
  padding: 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #c9ceda;
}
.xby-topbar-side.xby-topbar-text:hover { color: #e8eaef; }

/* ---- 我的命盘：点档弹层预览（≈ iPhone 18 Pro 框） ---- */
.lib-chart-preview {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  /* 容器／遮罩不拦截：目录列表可点下一档快翻；手机框与 × 自管事件 */
  pointer-events: none;
}
.lib-chart-preview.hidden { display: none !important; }
.lib-chart-preview-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  pointer-events: none; /* 仅视觉压暗；空白关闭见 JS 捕获 */
}
.lib-chart-preview-phone {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  width: min(393px, 92vw);
  height: min(852px, 90dvh);
  border-radius: 36px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 18px 56px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  background: #FFFFFF; /* 法爷更正：预览默认白底 A */
  display: flex;
  flex-direction: column;
}
.lib-chart-preview-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.lib-chart-preview-phone .da-stage {
  max-width: none;
  width: 100%;
  margin: 0;
}
/* 预览顶栏只留 ×；藏返回／更多（若误留） */
.lib-chart-preview-phone .da-back,
.lib-chart-preview-phone .da-edit { display: none !important; }
.lib-chart-preview-x {
  pointer-events: auto;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.lib-chart-preview-x:hover { background: rgba(20, 24, 36, 0.85); }
/* 预览肤色只罩手机框（勿再刷 html[data-skin] 把目录／壳刷白） */
body.lib-preview-open { overflow: hidden; }
.lib-chart-preview-phone[data-skin="A"] {
  --bg: #FFFFFF; --bg2: #F5F5F7; --card: #ffffff; --card-solid: #ffffff;
  --line: rgba(28,28,30,.10); --line2: rgba(28,28,30,.16);
  --text: #1c1c1e; --muted: #4a4a4e; --dim: #6a6a70; --muted2: #6a6a70;
  --wx-木: #3fcf72; --wx-火: #ff4f5e; --wx-土: #b98552; --wx-金: #e8c040; --wx-水: #4a7ae8;
  --da-bg:#FFFFFF; --da-text:#1c1c1e; --da-muted:#4a4a4e; --da-muted2:#6a6a70; --da-sel:#BACBD7;
  color-scheme: light; background: #FFFFFF; color: #1c1c1e;
}
.lib-chart-preview-phone[data-skin="B"] {
  --bg: #F7F1E8; --bg2: #EFE7DB; --card: #FBF7F0; --card-solid: #FBF7F0;
  --line: rgba(42,36,32,.12); --line2: rgba(42,36,32,.18);
  --text: #2A2420; --muted: #5C534C; --dim: #7A7168; --muted2: #7A7168;
  --wx-木: #3fcf72; --wx-火: #ff4f5e; --wx-土: #b98552; --wx-金: #e8c040; --wx-水: #4a7ae8;
  --da-bg:#F7F1E8; --da-text:#2A2420; --da-muted:#5C534C; --da-muted2:#7A7168; --da-sel:#D9CFC2;
  color-scheme: light; background: #F7F1E8; color: #2A2420;
}
.lib-chart-preview-phone[data-skin="C"],
.lib-chart-preview-phone[data-skin="F"] {
  --bg: #0B0C0F; --bg2: #101218; --card: #16181E; --card-solid: #16181E;
  --line: rgba(247,245,242,.10); --line2: rgba(247,245,242,.16);
  --text: #F7F5F2; --muted: #D2CDC6; --dim: #BDB8B0; --muted2: #BDB8B0;
  /* 五行＝计算器正本；C／F 只换壳 */
  --wx-木: #3fcf72; --wx-火: #ff4f5e; --wx-土: #b98552; --wx-金: #e8c040; --wx-水: #4a7ae8;
  /* 口播：预览框自带 --da-*（目录页 html 已 lockTechBlack，无 html[data-skin]） */
  --da-bg:#0B0C0F; --da-text:#F7F5F2; --da-muted:#D2CDC6; --da-muted2:#BDB8B0; --da-sel:#2C3038;
  color-scheme: dark; background: #0B0C0F; color: #F7F5F2;
}
.lib-chart-preview-phone[data-skin="F"] .da-stage { background: #05070C; }


/* —— PC 快录：520 水平居中＋整块垂直置中（oral2；压过全屏 quick 皮）—— */
@media (min-width: 1024px) {
  body[data-view="quick"] .shell {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 100dvh !important;
    grid-template-columns: none !important;
  }
  body[data-view="quick"] #view-quick.quick {
    width: min(520px, calc(100vw - 64px)) !important;
    max-width: 520px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: auto !important;
    margin-bottom: auto !important;
    height: auto !important;
    max-height: min(92dvh, 900px) !important;
    justify-content: center !important;
    align-items: stretch !important;
    overflow: auto !important;
  }
  body[data-view="quick"] #quick-form.quick-card {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 520px !important;
    height: auto !important;
    max-height: min(92dvh, 900px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    box-sizing: border-box;
    border-radius: 14px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    overflow: auto !important;
  }
}

.news-img{max-width:min(100%,480px);height:auto;border-radius:10px;margin:12px 0;display:block}
