/* 天赋星图 · 样式（浅色主界面 + 紫色星图品牌时刻） */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #7c4dff;
  --primary-2: #9b6bff;
  --primary-dark: #6a3ce0;
  --bg: #f5f4fb;
  --card: #ffffff;
  --text: #241b3a;
  --text-2: #5b5273;
  --text-3: #9a94ad;
  --border: #ece9f5;
  --ok: #4caf7d;
  --warn: #e6a23c;
  --danger: #ef5350;
  --shadow: 0 8px 26px rgba(96, 62, 190, .08);
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 720px; margin: 0 auto; min-height: 100vh; }
.screen { display: none; }
.screen.active { display: block; animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pad { padding: 16px; }

/* 顶部渐变头 */
.hd {
  background: linear-gradient(135deg, #7c4dff 0%, #9b6bff 55%, #b18cff 100%);
  color: #fff; padding: 26px 20px 22px; text-align: center; position: relative; overflow: hidden;
}
.hd::after {
  content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
  top: -80px; right: -60px;
}
.hd h1 { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.hd .sub { font-size: 13px; opacity: .9; margin-top: 8px; }
.hd .pill {
  display: inline-block; margin-top: 12px; padding: 5px 14px; border-radius: 999px;
  background: rgba(255,255,255,.2); font-size: 12.5px; backdrop-filter: blur(4px);
}

/* 卡片 */
.card { background: var(--card); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); margin: 14px 16px; }
.card.tight { padding: 16px; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 12px; padding: 14px 20px; font-size: 15.5px; font-weight: 700;
  cursor: pointer; transition: .16s; width: 100%; font-family: inherit; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 8px 18px rgba(124,77,255,.28); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-link { background: none; color: var(--text-3); font-weight: 600; width: auto; padding: 8px; font-size: 14px; }
.btn-row { display: flex; gap: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 12px; line-height: 1.6; }

/* 首页维度芯片 */
.dims { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 4px; }
.dchip { background: #faf9ff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 2px; text-align: center; font-size: 11.5px; color: var(--text-2); }
.dchip .e { font-size: 20px; display: block; margin-bottom: 3px; }
.meta { display: flex; justify-content: center; gap: 18px; margin-top: 16px; }
.meta .m { text-align: center; }
.meta .m b { display: block; font-size: 20px; color: var(--primary); }
.meta .m span { font-size: 12px; color: var(--text-3); }

/* 答题 */
.prog-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.prog-top b { font-size: 15px; color: var(--primary); }
.prog-top .num b { font-size: 20px; }
.pbar { height: 7px; background: #eeeaf8; border-radius: 999px; overflow: hidden; }
.pbar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--primary-2)); transition: width .3s; }
.q-title { font-size: 19px; font-weight: 800; margin: 18px 0 6px; line-height: 1.5; }
.q-ctx { font-size: 13.5px; font-weight: 500; color: var(--text-3); background: #faf9ff; border-left: 3px solid var(--border); padding: 8px 12px; border-radius: 8px; margin: 16px 0 4px; line-height: 1.6; }
.q-note { font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.opts { display: flex; flex-direction: column; gap: 11px; }
.opt { display: flex; align-items: flex-start; gap: 12px; padding: 14px 15px; border: 1.5px solid var(--border);
  border-radius: 14px; cursor: pointer; transition: .14s; background: #fff; }
.opt:hover { border-color: #c9b6ff; background: #faf8ff; }
.opt.sel { border-color: var(--primary); background: #f4f0ff; }
.opt .k { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: #f0ecfb; color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.opt.sel .k { background: var(--primary); color: #fff; }
.opt .t { font-size: 15px; color: var(--text); line-height: 1.55; }
.q-nav { display: flex; gap: 12px; margin-top: 20px; }
.q-nav .btn { width: auto; flex: 1; }
.q-nav .btn.only { flex: 0 0 auto; padding: 12px 22px; }

/* 星图加载（紫色品牌时刻） */
#screen-loading.active { display: block; }
.star-stage {
  position: fixed; inset: 0; z-index: 10;
  background: radial-gradient(circle at 50% 34%, #3a2470 0%, #251346 55%, #180a33 100%);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px 24px; text-align: center;
}
.star-stage .brandtop { position: absolute; top: 42px; font-size: 15px; letter-spacing: 2px; opacity: .92; }
.star-stage .brandtop .g { color: #c9a8ff; }
#starCanvas { width: 300px; height: 300px; }
.star-stage h2 { font-size: 23px; font-weight: 800; margin-top: 6px; }
.star-stage .evi { font-size: 14px; opacity: .8; margin-top: 10px; }
.star-stage .evi b { color: #cdb0ff; font-size: 16px; }
.star-stage .pb { width: 78%; max-width: 420px; height: 5px; background: rgba(255,255,255,.16); border-radius: 999px; margin: 16px 0 12px; overflow: hidden; }
.star-stage .pb > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b18cff, #e0c8ff); border-radius: 999px; transition: width .3s; }
.star-stage .tip1 { font-size: 14px; color: #cdb0ff; }
.star-stage .tip2 { font-size: 12px; opacity: .55; margin-top: 26px; }

/* ====== 报告 ====== */
.rpt-hd { background: linear-gradient(135deg, #7c4dff 0%, #9b6bff 60%, #b18cff 100%); color: #fff; padding: 30px 20px 40px; text-align: center; }
.rpt-hd h1 { font-size: 22px; font-weight: 800; }
.rpt-hd .badge { display: inline-block; margin-top: 12px; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,.2); font-size: 12.5px; }
.rpt-body { margin-top: -26px; }

.ring-card { text-align: center; padding-top: 24px; }
.ring { position: relative; width: 150px; height: 150px; margin: 0 auto 14px; }
.ring canvas { width: 150px; height: 150px; }
.ring .val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; color: var(--primary); }
.ring .val i { font-size: 18px; font-style: normal; margin-top: 12px; }
.ring-card .cap { font-size: 13px; color: var(--text-3); }
.type-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 20px; border-radius: 999px;
  background: #f4f0ff; color: var(--primary); font-weight: 800; font-size: 17px; }
.type-desc { margin-top: 16px; font-size: 14.5px; color: var(--text-2); text-align: left; line-height: 1.75; }
.type-desc b { color: var(--text); }

.sec-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sec-hd .ic { width: 30px; height: 30px; border-radius: 9px; background: #f1ecff; color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.sec-hd h3 { font-size: 16.5px; font-weight: 800; }
.sec-hd .r { margin-left: auto; font-size: 12px; color: var(--text-3); }

.dradar { text-align: center; }
.dradar canvas { max-width: 100%; }

.dlist .row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #f4f2fb; }
.dlist .row:first-child { border-top: none; }
.dlist .lt { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.dlist .nm { width: 68px; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.dlist .tk { flex: 1; height: 8px; background: #f0edf9; border-radius: 999px; overflow: hidden; }
.dlist .tk > i { display: block; height: 100%; border-radius: 999px; }
.dlist .sc { font-size: 13.5px; font-weight: 800; color: var(--primary); width: 44px; text-align: right; flex-shrink: 0; }
.dlist .badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; flex-shrink: 0; }
.bd-top { background: #efe6ff; color: #7c4dff; }
.bd-good { background: #eaf6ff; color: #3f8cff; }
.bd-mid { background: #fff5e6; color: #d99425; }
.bd-low { background: #f2f2f5; color: #9a94ad; }
.dnote { font-size: 13px; color: var(--text-2); background: #faf9ff; border-radius: 10px; padding: 10px 12px; margin: 8px 0 4px; line-height: 1.7; }

details.ansbox { margin-top: 12px; }
details.ansbox summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--primary); padding: 10px 0; list-style: none; }
details.ansbox summary::-webkit-details-marker { display: none; }
details.ansbox summary::before { content: '▸ '; }
details.ansbox[open] summary::before { content: '▾ '; }
.ansitem { font-size: 13px; color: var(--text-2); padding: 9px 0; border-top: 1px dashed #eeeaf8; }
.ansitem b { color: var(--text); }
.ansitem .ok { color: var(--ok); font-weight: 800; }
.ansitem .no { color: var(--danger); font-weight: 800; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: #f4f0ff; color: var(--primary); padding: 5px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.tags .tag.dim { background: #faf9ff; border: 1px solid var(--border); color: var(--text-2); }
.blk-t { font-size: 14px; font-weight: 800; margin: 18px 0 8px; display: flex; align-items: center; gap: 7px; }
.uline li { margin: 7px 0 7px 22px; font-size: 14px; color: var(--text-2); line-height: 1.7; }
.syn { background: #f4fbf7; border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.syn .s { font-size: 14px; color: #2f7d55; margin: 5px 0; line-height: 1.7; }
.syn .s b { color: #1f6b45; }
.warnbox { background: #fff8e8; border-radius: 12px; padding: 12px 14px; }
.warnbox .w { font-size: 14px; color: #9a6b12; margin: 5px 0; line-height: 1.7; }

.career { border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.career .t { display: flex; align-items: center; gap: 8px; }
.career .t .idx { width: 22px; height: 22px; border-radius: 50%; background: #f4f0ff; color: var(--primary); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.career .t .cn { font-weight: 800; font-size: 15px; }
.career .t .mk { margin-left: auto; font-weight: 800; color: var(--primary); font-size: 14px; }
.career .mbar { height: 6px; background: #f0edf9; border-radius: 999px; margin: 8px 0 10px; overflow: hidden; }
.career .mbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); }
.career .dm { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.career .dm span { font-size: 12px; background: #faf9ff; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; color: var(--text-2); }
.career .cd { font-size: 13.5px; color: var(--text-2); }

.plan-blk { border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.plan-blk .ph { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14.5px; margin-bottom: 8px; }
.plan-blk .ph span { font-size: 12px; font-weight: 600; opacity: .75; }
.plan-blk li { font-size: 13.5px; margin: 6px 0 6px 4px; list-style: none; padding-left: 20px; position: relative; color: var(--text-2); line-height: 1.65; }
.plan-blk li::before { content: '✓'; position: absolute; left: 0; font-weight: 800; }
.p-short { background: #f6f1ff; } .p-short .ph, .p-short li::before { color: #7c4dff; }
.p-mid { background: #f1f7ff; } .p-mid .ph, .p-mid li::before { color: #3f8cff; }
.p-long { background: #f2fbf5; } .p-long .ph, .p-long li::before { color: #4caf7d; }

.weak { font-size: 13.5px; color: var(--text-2); line-height: 1.75; margin-top: 6px; }
.readnote { display: flex; gap: 10px; background: #f7f6fb; border-radius: 14px; padding: 14px; margin-top: 4px; }
.readnote .i { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: #d9d2ef; color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; font-style: italic; }
.readnote p { font-size: 12.5px; color: var(--text-2); line-height: 1.75; }
.readnote .stamp { font-size: 12px; color: var(--text-3); margin-top: 8px; }

.foot-cta { padding: 4px 16px 30px; }
.foot-cta .btn { margin-top: 10px; }
.scrim { position: fixed; inset: 0; background: rgba(36,27,58,.5); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 60; }
.scrim.on { display: flex; }
.modal { background: #fff; border-radius: 18px; padding: 24px; width: 100%; max-width: 380px; }
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.modal p { font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.field { width: 100%; padding: 14px; border: 1.5px solid var(--border); border-radius: 12px; font-size: 17px; letter-spacing: 3px; text-align: center; text-transform: uppercase; outline: none; font-family: inherit; }
.field:focus { border-color: var(--primary); }
.modal .btn-row { margin-top: 16px; }

@media (max-width: 480px) {
  .dims { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .dchip { padding: 8px 1px; font-size: 10.5px; }
  .dchip .e { font-size: 17px; }
  .hd h1 { font-size: 21px; }
  .dlist .nm { width: 58px; font-size: 13px; }
  .dlist .badge { display: none; }
}
