/* ============ 星语占卜 · 主题样式 ============ */
:root {
  --bg: #0d0b1a;
  --bg2: #141021;
  --bg3: #1c1730;
  --card: rgba(28, 23, 48, 0.72);
  --card-solid: #1c1730;
  --line: rgba(255, 255, 255, 0.08);
  --violet: #7b5cff;
  --violet2: #a855f7;
  --violet-soft: rgba(123, 92, 255, 0.18);
  --gold: #f5c84c;
  --gold2: #e0a53c;
  --gold-soft: rgba(245, 200, 76, 0.14);
  --text: #f2eefc;
  --muted: #a89ec9;
  --muted2: #7d739e;
  --danger: #ff6b8a;
  --ok: #4ce0b3;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  --font-serif: "Cinzel", "Noto Serif SC", serif;
  --font-cn: "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-cn);
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ============ 星空背景 ============ */
.starfield {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 800px at 70% -10%, rgba(123, 92, 255, 0.22), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(168, 85, 247, 0.16), transparent 55%),
    linear-gradient(180deg, #0d0b1a 0%, #0f0c1e 55%, #0a0814 100%);
}
.star { position: absolute; background: #fff; border-radius: 50%; opacity: 0.7; animation: twinkle 4s infinite ease-in-out; }
@keyframes twinkle { 0%,100% { opacity: .25; } 50% { opacity: .9; } }

/* ============ 屏幕 ============ */
.screen {
  position: fixed; inset: 0; z-index: 1;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.screen::-webkit-scrollbar { display: none; }

/* ============ SPLASH ============ */
.splash { display: flex; align-items: center; justify-content: center; z-index: 50; }
.splash-inner { text-align: center; animation: fadeUp 1s ease; }
.splash-moon { font-size: 64px; filter: drop-shadow(0 0 30px rgba(245, 200, 76, 0.6)); animation: floaty 3s ease-in-out infinite; }
.splash-title { font-family: var(--font-serif); font-size: 34px; letter-spacing: 8px; margin-top: 16px; color: var(--gold); text-shadow: 0 0 30px rgba(245,200,76,.4); }
.splash-sub { color: var(--muted); letter-spacing: 6px; margin-top: 8px; font-size: 14px; }
.splash-loading { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.splash-loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--violet2); animation: bounce 1.2s infinite ease-in-out; }
.splash-loading span:nth-child(2) { animation-delay: .15s; background: var(--gold); }
.splash-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,100% { transform: translateY(0); opacity:.5; } 50% { transform: translateY(-10px); opacity:1; } }
@keyframes floaty { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-8px);} }
@keyframes fadeUp { from { opacity:0; transform: translateY(20px);} to { opacity:1; transform: translateY(0);} }

/* ============ ONBOARDING ============ */
.ob-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ob-card {
  width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; padding: 32px 24px; backdrop-filter: blur(16px); box-shadow: var(--shadow);
}
.ob-progress { display: flex; gap: 8px; margin-bottom: 28px; }
.ob-progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: .3s; }
.ob-progress i.on { background: linear-gradient(90deg, var(--violet), var(--gold)); }
.ob-title { font-family: var(--font-serif); font-size: 24px; letter-spacing: 4px; margin-bottom: 8px; }
.ob-desc { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.input {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-sm); padding: 14px 16px; font-size: 15px; font-family: inherit; outline: none; transition: .2s;
}
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.input::placeholder { color: var(--muted2); }
.gender-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.gender-btn {
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); padding: 22px 0; font-size: 16px; font-family: inherit; cursor: pointer; transition: .2s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.gender-btn .gender-ico { font-size: 26px; color: var(--gold); }
.gender-btn.active { border-color: var(--violet); background: var(--violet-soft); box-shadow: 0 0 0 3px var(--violet-soft); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; padding: 13px 22px; font-size: 15px; font-family: inherit;
  cursor: pointer; transition: .2s; font-weight: 600; letter-spacing: 1px;
}
.btn:active { transform: scale(.97); }
.btn-block { width: 100%; margin-top: 12px; }
.btn-primary { background: linear-gradient(135deg, var(--violet), var(--violet2)); color: #fff; box-shadow: 0 8px 24px rgba(123,92,255,.4); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #3a2504; box-shadow: 0 8px 24px rgba(245,200,76,.3); }
.btn-outline { background: transparent; color: var(--gold); border: 1px solid rgba(245,200,76,.5); }
.btn-ghost { background: rgba(255,255,255,0.05); color: var(--muted); border: 1px solid var(--line); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.icon-btn { background: rgba(255,255,255,0.06); border: 1px solid var(--line); border-radius: 50%; width: 40px; height: 40px; font-size: 18px; cursor: pointer; color: var(--text); }

/* ============ 布局 ============ */
.view { padding: 0 16px; max-width: 520px; margin: 0 auto; }
.bottom-space { height: 110px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 14px; position: sticky; top: 0; z-index: 5; background: linear-gradient(180deg, rgba(13,11,26,.96), rgba(13,11,26,.85)); backdrop-filter: blur(10px); }
.topbar-brand { font-family: var(--font-serif); font-size: 19px; letter-spacing: 2px; color: var(--gold); }
.brand-dot { color: var(--violet2); }
.topbar-title { font-family: var(--font-serif); font-size: 20px; letter-spacing: 4px; color: var(--text); }
.section-title { font-family: var(--font-serif); font-size: 16px; letter-spacing: 3px; color: var(--gold); margin: 22px 0 12px; padding-left: 10px; border-left: 3px solid var(--gold); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; backdrop-filter: blur(14px); }

/* ============ HERO ============ */
.hero { position: relative; border-radius: var(--radius); padding: 20px; overflow: hidden; background: linear-gradient(140deg, rgba(123,92,255,.28), rgba(168,85,247,.14) 60%, rgba(245,200,76,.1)); border: 1px solid var(--line); }
.hero-glow { position: absolute; top: -60px; right: -40px; width: 180px; height: 180px; background: radial-gradient(circle, rgba(245,200,76,.4), transparent 70%); border-radius: 50%; }
.hero-top { display: flex; justify-content: space-between; align-items: baseline; position: relative; }
.hero-greeting { font-size: 15px; color: var(--text); }
.hero-date { font-size: 12px; color: var(--muted); }
.hero-sign-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; position: relative; }
.hero-sign-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; background: var(--gold-soft); border: 1px solid rgba(245,200,76,.4); color: var(--gold); }
.hero-sign-name { font-size: 20px; font-weight: 700; }
.hero-sign-date { font-size: 12px; color: var(--muted); }
.hero-sign-row .btn { margin-left: auto; }
.hero-luck { display: flex; gap: 14px; margin-top: 16px; position: relative; flex-wrap: wrap; }
.luck-chip { background: rgba(255,255,255,0.06); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 12px; color: var(--muted); }
.luck-chip b { color: var(--gold); font-weight: 600; }

/* ============ TODAY CARD ============ */
.today-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 14px; backdrop-filter: blur(14px); }
.today-head { display: flex; justify-content: space-between; align-items: center; }
.today-label { font-size: 13px; color: var(--muted); }
.today-score { font-family: var(--font-serif); font-size: 26px; color: var(--gold); }
.today-score small { font-size: 13px; color: var(--muted); }
.today-text { margin-top: 10px; font-size: 14px; line-height: 1.8; }
.today-tags { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ============ 工具网格 ============ */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tool-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 10px; text-align: center; cursor: pointer; transition: .2s; }
.tool-card:active { transform: scale(.96); border-color: var(--violet); }
.tool-ico { font-size: 28px; }
.tool-name { font-size: 13px; font-weight: 600; margin-top: 6px; }
.tool-sub { font-size: 11px; color: var(--muted2); margin-top: 2px; }

/* ============ 每日一签 ============ */
.daily-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(120deg, rgba(123,92,255,.2), rgba(245,200,76,.08)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.daily-card-back { width: 52px; height: 52px; border-radius: 10px; background: linear-gradient(135deg, var(--violet), var(--violet2)); display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; }
.daily-card-info { flex: 1; }
.daily-card-name { font-size: 15px; font-weight: 600; }
.daily-card-sub { font-size: 12px; color: var(--muted); }

/* ============ 星座轮盘 ============ */
.zodiac-wheel-wrap { display: flex; justify-content: center; margin: 8px 0; }
.zodiac-wheel { width: 100%; max-width: 340px; }
.zodiac-wheel .zseg { cursor: pointer; transition: .2s; }
.zodiac-wheel .zseg text { font-size: 22px; fill: #fff; }
.zodiac-wheel .zseg:hover { opacity: .85; }
.zodiac-wheel .zseg.active { filter: drop-shadow(0 0 12px rgba(245,200,76,.9)); }
.zodiac-wheel .zring { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 1; }
.zodiac-wheel .zring-inner { fill: rgba(20,16,33,.9); stroke: rgba(245,200,76,.4); stroke-width: 1.5; }
.zodiac-wheel .zcenter { fill: rgba(123,92,255,.15); stroke: rgba(123,92,255,.5); stroke-width: 1.5; }

.zodiac-tabs { display: flex; gap: 6px; margin: 14px 0; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.ztab { flex: 1; background: transparent; border: none; color: var(--muted); padding: 9px 0; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 13px; transition: .2s; }
.ztab.active { background: linear-gradient(135deg, var(--violet), var(--violet2)); color: #fff; }

.zodiac-detail .zd-head { display: flex; align-items: center; gap: 12px; }
.zd-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--violet-soft); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.zd-name { font-size: 18px; font-weight: 700; }
.zd-range { font-size: 12px; color: var(--muted); }
.zd-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.zd-score { text-align: right; }
.zd-score-num { font-family: var(--font-serif); font-size: 28px; color: var(--gold); }
.zd-score-label { font-size: 11px; color: var(--muted); }
.zd-text { font-size: 14px; line-height: 1.8; margin-top: 4px; }
.zd-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ============ 配对 ============ */
.compat-card { margin-top: 16px; }
.compat-head { margin-bottom: 6px; }
.compat-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 10px 0; }
.compat-sign { width: 60px; height: 60px; border-radius: 50%; background: var(--violet-soft); display: flex; align-items: center; justify-content: center; font-size: 30px; border: 1px solid var(--line); }
.compat-vs { color: var(--muted); font-family: var(--font-serif); letter-spacing: 2px; }
.compat-scorebar { height: 8px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; margin: 12px 0 6px; }
.compat-score-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--violet), var(--gold)); transition: width .8s ease; width: 0; }
.compat-score-num { text-align: center; font-family: var(--font-serif); font-size: 30px; color: var(--gold); }
.compat-text { font-size: 13px; line-height: 1.8; margin: 10px 0 14px; color: var(--muted); }

/* ============ 塔罗 ============ */
.tarot-banner { text-align: center; padding: 20px 10px; }
.tarot-banner-title { font-family: var(--font-serif); font-size: 19px; letter-spacing: 3px; color: var(--gold); }
.tarot-banner-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.spread-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.spread-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 14px; text-align: center; cursor: pointer; transition: .2s; }
.spread-card:active { transform: scale(.96); }
.spread-ico { font-size: 32px; }
.spread-name { font-size: 15px; font-weight: 600; margin-top: 8px; }
.spread-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dict-hint { color: var(--muted2); font-size: 13px; text-align: center; }

/* ============ 占卜页 ============ */
.div-tabs { display: flex; gap: 6px; margin: 4px 0 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.dtab { flex: 1; background: transparent; border: none; color: var(--muted); padding: 10px 0; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 14px; transition: .2s; }
.dtab.active { background: linear-gradient(135deg, var(--violet), var(--violet2)); color: #fff; }
.dtab-panel { animation: fadeUp .3s ease; }
.panel-card { padding: 20px; }
.panel-title { font-family: var(--font-serif); font-size: 20px; letter-spacing: 3px; color: var(--gold); margin-bottom: 8px; }
.panel-desc { font-size: 13px; color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
.upload-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed rgba(245,200,76,.35); border-radius: var(--radius); padding: 30px 16px; cursor: pointer; background: rgba(255,255,255,0.03); transition: .2s; }
.upload-box:active { background: rgba(245,200,76,.08); }
.upload-ico { font-size: 40px; }
.upload-text { font-size: 15px; font-weight: 600; color: var(--gold); }
.upload-hint { font-size: 12px; color: var(--muted2); }
.stage-frame { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 3/4; margin-bottom: 12px; }
.stage-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.overlay-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scan-line { position: absolute; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent); box-shadow: 0 0 16px rgba(245,200,76,.9); animation: scanY 2.2s ease-in-out infinite; }
@keyframes scanY { 0% { top: 4%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 96%; opacity: 0; } }
.scan-status { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.65); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 12px; color: var(--gold); white-space: nowrap; }

.result-box { margin-top: 14px; animation: fadeUp .4s ease; }
.result-title { font-family: var(--font-serif); font-size: 18px; color: var(--gold); letter-spacing: 2px; margin-bottom: 12px; }
.r-item { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; }
.r-item-head { display: flex; justify-content: space-between; align-items: center; }
.r-item-name { font-size: 15px; font-weight: 600; }
.r-item-rate { font-size: 12px; color: var(--gold); }
.r-item-desc { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.r-bar { height: 5px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 8px; }
.r-bar-fill { height: 100%; background: linear-gradient(90deg, var(--violet), var(--gold)); border-radius: 5px; }

.face-traits { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.trait-chip { background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: 13px; cursor: pointer; color: var(--muted); transition: .2s; }
.trait-chip.active { background: var(--violet-soft); border-color: var(--violet); color: var(--text); }

.num-result { margin-bottom: 14px; padding: 20px; text-align: center; }
.num-big { font-family: var(--font-serif); font-size: 60px; color: var(--gold); line-height: 1; }
.num-name { font-size: 14px; color: var(--muted); margin-top: 6px; }
.num-desc { font-size: 13px; line-height: 1.8; margin-top: 12px; text-align: left; }
.num-inputs { margin-bottom: 6px; }
.num-field { margin-bottom: 12px; }
.num-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* ============ 我的 ============ */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--violet2)); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.profile-name { font-size: 20px; font-weight: 700; }
.profile-sub { font-size: 13px; color: var(--muted); }
.profile-edit { margin-bottom: 14px; }
.pe-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pe-row:last-of-type { border-bottom: none; }
.pe-label { color: var(--muted); }
.premium-card { text-align: center; margin-bottom: 14px; background: linear-gradient(140deg, rgba(245,200,76,.12), rgba(123,92,255,.12)); }
.premium-ico { font-size: 40px; }
.premium-title { font-family: var(--font-serif); font-size: 18px; color: var(--gold); margin-top: 6px; }
.premium-desc { font-size: 12px; color: var(--muted); margin: 8px 0 14px; }
.menu-list { padding: 6px 18px; }
.menu-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.menu-item:last-child { border-bottom: none; }
.menu-arrow { color: var(--muted2); font-size: 20px; }

/* ============ 底部导航 ============ */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px;
  display: flex; z-index: 20; background: rgba(16,12,28,.92); backdrop-filter: blur(20px);
  border-top: 1px solid var(--line); padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; background: transparent; border: none; color: var(--muted2); cursor: pointer; font-family: inherit; font-size: 11px; transition: .2s; }
.tab-ico { font-size: 20px; }
.tab.active { color: var(--gold); }
.tab.active .tab-ico { filter: drop-shadow(0 0 8px rgba(245,200,76,.6)); }

/* ============ 弹层 ============ */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(6,4,12,.7); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; background: var(--bg2); border-radius: 24px 24px 0 0; border-top: 1px solid var(--line); padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; animation: sheetUp .3s ease; }
.sheet::-webkit-scrollbar { display: none; }
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 14px; }
.sheet-title { font-family: var(--font-serif); font-size: 19px; letter-spacing: 3px; color: var(--gold); text-align: center; }
.sheet-sub { font-size: 13px; color: var(--muted); text-align: center; margin: 6px 0 16px; }

/* 塔罗桌面 */
.tarot-table { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 16px; min-height: 120px; }
.tarot-slot { position: relative; }
.tarot-card { position: relative; width: 92px; height: 156px; border-radius: 12px; cursor: pointer; perspective: 800px; flex-shrink: 0; }
.tarot-card-inner { position: absolute; inset: 0; transition: transform .6s cubic-bezier(.2,.7,.3,1); transform-style: preserve-3d; }
.tarot-card.flipped .tarot-card-inner { transform: rotateY(180deg); }
.tarot-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tarot-back { background: linear-gradient(135deg, #2a1f5e, #4a2a8f); border: 2px solid var(--gold); box-shadow: inset 0 0 0 4px rgba(245,200,76,.25); }
.tarot-back::before { content: "✦"; font-size: 30px; color: var(--gold); }
.tarot-front { background: linear-gradient(160deg, #1c1730, #0f0c1e); border: 2px solid var(--gold); transform: rotateY(180deg); padding: 8px; }
.tarot-front .tf-num { font-family: var(--font-serif); font-size: 13px; color: var(--gold); }
.tarot-front .tf-sym { font-size: 34px; margin: 2px 0; }
.tarot-front .tf-name { font-size: 12px; color: var(--text); text-align: center; }
.tarot-front.reversed .tf-sym { transform: rotate(180deg); }
.tarot-slot-label { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.tarot-reading { margin-top: 4px; }
.tr-item { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px; margin-bottom: 10px; }
.tr-item-head { display: flex; align-items: center; gap: 10px; }
.tr-item-sym { font-size: 22px; }
.tr-item-name { font-size: 14px; font-weight: 600; }
.tr-item-pos { font-size: 11px; color: var(--gold); }
.tr-item-text { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 6px; }

/* 牌详情 */
.card-detail .cd-head { text-align: center; margin-bottom: 12px; }
.cd-sym { font-size: 60px; }
.cd-sym.reversed { transform: rotate(180deg); display: inline-block; }
.cd-name { font-family: var(--font-serif); font-size: 20px; color: var(--gold); letter-spacing: 2px; }
.cd-num { font-size: 12px; color: var(--muted); }
.cd-sec { margin-bottom: 12px; }
.cd-sec-title { font-size: 13px; color: var(--gold); font-weight: 600; margin-bottom: 4px; }
.cd-sec-text { font-size: 13px; color: var(--muted); line-height: 1.7; }
.cd-keywords { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cd-kw { background: var(--violet-soft); border: 1px solid var(--violet); border-radius: 999px; padding: 4px 10px; font-size: 12px; }

/* 配对选择器 */
.sign-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.sign-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 4px; cursor: pointer; transition: .2s; }
.sign-pick:active { transform: scale(.94); }
.sign-pick .sp-ico { font-size: 24px; }
.sign-pick .sp-name { font-size: 11px; color: var(--muted); }
.sign-pick.active { border-color: var(--gold); background: var(--gold-soft); }
.sign-pick.active .sp-name { color: var(--gold); }

/* ============ 付费墙 ============ */
.paywall { text-align: center; padding: 8px 0; }
.paywall-crown { font-size: 56px; }
.paywall-title { font-family: var(--font-serif); font-size: 22px; color: var(--gold); letter-spacing: 3px; margin-top: 4px; }
.paywall-desc { font-size: 13px; color: var(--muted); margin: 6px 0 18px; }
.pay-plans { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.pay-plan { position: relative; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 6px; cursor: pointer; transition: .2s; }
.pay-plan.active { border-color: var(--gold); background: var(--gold-soft); }
.pay-name { font-size: 13px; color: var(--muted); }
.pay-price { font-family: var(--font-serif); font-size: 22px; color: var(--gold); margin-top: 4px; }
.pay-price span { font-size: 11px; color: var(--muted); }
.pay-badge { position: absolute; top: -9px; right: 50%; transform: translateX(50%); background: var(--gold); color: #3a2504; font-size: 10px; border-radius: 999px; padding: 2px 8px; font-weight: 700; }
.pay-restore { font-size: 12px; color: var(--muted2); margin-top: 12px; text-decoration: underline; cursor: pointer; }

/* ============ TOAST ============ */
.toast { position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%); background: rgba(30,25,50,.95); border: 1px solid var(--gold); color: var(--text); border-radius: 999px; padding: 11px 22px; font-size: 13px; z-index: 60; box-shadow: var(--shadow); animation: toastIn .3s ease; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============ 语言选择 ============ */
.ob-lang-row { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; color: var(--text); font-size: 13px; cursor: pointer; font-family: inherit;
}
.lang-btn:active { border-color: var(--gold); }
.lang-ico { font-size: 15px; }
.lang-arrow { color: var(--muted2); }
.lang-picker { margin: 4px 0 8px; }
.lang-option {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 10px; color: var(--text); font-size: 15px; cursor: pointer; font-family: inherit; transition: .15s;
}
.lang-option:active { transform: scale(.98); }
.lang-option.active { border-color: var(--gold); background: var(--gold-soft); }
.lang-flag { font-size: 22px; }
.lang-native { font-weight: 600; }
.lang-name { color: var(--muted2); font-size: 12px; margin-left: auto; }
.menu-lang-cur { color: var(--gold); font-size: 13px; }
.menu-item .menu-arrow { margin-left: 8px; }

/* ============ RTL（阿拉伯语等） ============ */
html[dir="rtl"] body,
html[dir="rtl"] .screen,
html[dir="rtl"] .view,
html[dir="rtl"] .card,
html[dir="rtl"] .sheet {
  font-family: "Noto Naskh Arabic", "Noto Serif SC", sans-serif;
}
html[dir="rtl"] .section-title { border-left: none; border-right: 3px solid var(--gold); padding-left: 0; padding-right: 10px; }
html[dir="rtl"] .hero-sign-row .btn,
html[dir="rtl"] .zd-score { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .lang-name { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .menu-item .menu-arrow { margin-left: 0; margin-right: 8px; }
html[dir="rtl"] .compat-vs,
html[dir="rtl"] .ob-desc,
html[dir="rtl"] .panel-desc,
html[dir="rtl"] .today-text,
html[dir="rtl"] .zd-text,
html[dir="rtl"] .r-item-desc,
html[dir="rtl"] .num-desc,
html[dir="rtl"] .compat-text,
html[dir="rtl"] .cd-sec-text,
html[dir="rtl"] .tr-item-text,
html[dir="rtl"] .tarot-banner-sub,
html[dir="rtl"] .tarot-banner-title,
html[dir="rtl"] .ob-title,
html[dir="rtl"] .panel-title,
html[dir="rtl"] .result-title {
  direction: rtl;
  text-align: right;
}
html[dir="rtl"] .topbar,
html[dir="rtl"] .hero-top,
html[dir="rtl"] .hero-sign-row,
html[dir="rtl"] .today-head,
html[dir="rtl"] .zd-head,
html[dir="rtl"] .compat-row,
html[dir="rtl"] .r-item-head,
html[dir="rtl"] .tr-item-head,
html[dir="rtl"] .pe-row {
  direction: rtl;
}
html[dir="rtl"] .zd-score-num,
html[dir="rtl"] .compat-score-num,
html[dir="rtl"] .r-item-rate {
  direction: ltr;
}

/* ============ 响应式 ============ */
@media (min-width: 521px) {
  body { display: flex; justify-content: center; }
  .screen, .tabbar, .sheet { max-width: 520px; }
  body::before { content: ""; position: fixed; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.015), transparent); pointer-events: none; }
}
