/* 完整版网页。底色沿用免费版的暗红加金；红鸾宫粉白和红，卧星宫靛青和银。神和宫殿还没画，全部用光和线条。 */
:root {
  --bg: #0B0605; --ink: #F3E3CF; --dim: rgba(243,227,207,.55); --gold: #E2B24A; --gold2: #FFE3A3; --red: #9E2A22;
  --panel: rgba(30,12,10,.78); --line: rgba(217,165,74,.4);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body { color: var(--ink); font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif; }
html[data-page="hongluan"], html[data-page="accept"] { --bg: #1A070D; --gold: #F4A6B8; --gold2: #FFE1E8; --line: rgba(244,166,184,.42); --panel: rgba(42,10,20,.8); }
html[data-page="woxing"] { --bg: #070B1E; --gold: #BFD0EE; --gold2: #F1F5FF; --line: rgba(191,208,238,.4); --panel: rgba(14,20,48,.82); }
html { background: var(--bg); }
body { min-height: 100%; background: radial-gradient(120% 70% at 50% 0%, #4A1A12 0%, transparent 62%) no-repeat; background-size: 100% 100vh; }
html[data-page="hongluan"] body, html[data-page="accept"] body { background-image: radial-gradient(120% 70% at 50% 0%, #4A1426 0%, transparent 62%); }
html[data-page="woxing"] body { background-image: radial-gradient(120% 70% at 50% 0%, #1B2A5C 0%, transparent 62%); }
#app { max-width: 560px; min-height: 100%; margin: 0 auto; padding: calc(var(--safe-t) + 18px) 16px calc(var(--safe-b) + 24px); }
.boot { text-align: center; padding-top: 40vh; color: var(--dim); }
button { font: inherit; border: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
p { line-height: 1.75; }
.fine { margin-top: 28px; font-size: 11px; color: var(--dim); text-align: center; }
.note { margin: 10px 0; font-size: 13px; color: var(--dim); }
.err { margin: 6px 0; font-size: 13px; color: #FF9E8E; }
.link { color: var(--gold); font-size: 14px; padding: 6px 0; }

.btn { display: inline-block; min-width: 140px; padding: 13px 24px; border-radius: 6px; font-size: 16px; font-weight: 800; letter-spacing: 3px; }
.btn.gold { color: #1E0A08; background: linear-gradient(180deg, var(--gold2), var(--gold)); box-shadow: 0 0 24px color-mix(in srgb, var(--gold) 40%, transparent); }
.btn.gold:active:not(:disabled) { transform: scale(.97); }
.btn.ghost { color: var(--ink); border: 1px solid var(--line); background: rgba(0,0,0,.25); font-weight: 600; letter-spacing: 1px; font-size: 14px; padding: 10px 16px; min-width: 0; }
.btn.wide { display: block; width: 100%; margin-top: 14px; }
.row-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.row-btns.small { gap: 22px; }

/* 落地页 */
.land { min-height: calc(100vh - 60px); display: flex; flex-direction: column; justify-content: center; text-align: center; }
.eyebrow { font-size: 13px; letter-spacing: 4px; color: var(--gold); margin-bottom: 10px; }
.title { font: 900 52px/1.1 var(--serif); letter-spacing: 8px; padding-left: 8px; background: linear-gradient(180deg, #FFE7B0, #E2B24A 50%, #B23A2E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.title small { display: block; font-size: 20px; letter-spacing: 14px; margin-top: 8px; }
.lead { margin: 18px 0 28px; color: #EAD3BA; }
.stars7 { position: relative; height: 90px; margin-bottom: 10px; }
.stars7 i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #FFF4D6; box-shadow: 0 0 12px #FFD98A; animation: tw 3s ease-in-out infinite; animation-delay: calc(var(--k) * .35s); }
.stars7 i:nth-child(1) { left: 18%; top: 22%; } .stars7 i:nth-child(2) { left: 30%; top: 30%; } .stars7 i:nth-child(3) { left: 41%; top: 44%; }
.stars7 i:nth-child(4) { left: 53%; top: 50%; } .stars7 i:nth-child(5) { left: 60%; top: 78%; } .stars7 i:nth-child(6) { left: 78%; top: 74%; } .stars7 i:nth-child(7) { left: 82%; top: 46%; }
@keyframes tw { 50% { opacity: .35; transform: scale(.7); } }

/* 爪印簿 */
.book { margin-top: 4vh; padding: 24px 18px; background: linear-gradient(180deg, #2B1410, #1A0B09); border: 1px solid var(--red); border-radius: 8px; box-shadow: 0 0 0 4px rgba(158,42,34,.2); }
.book-h { font: 900 26px var(--serif); letter-spacing: 12px; color: var(--gold); text-align: center; }
.book-sub { margin: 6px 0 16px; font-size: 13px; color: #CDAE92; text-align: center; }
.field { display: block; margin: 12px 0; }
.field > span { display: block; margin-bottom: 6px; font-size: 13px; color: var(--dim); }
.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; font: 600 16px inherit; font-family: inherit; color: var(--ink); background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 6px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field textarea { resize: none; line-height: 1.6; }
.field input:disabled { opacity: .4; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); }
select option, select optgroup { background: #1A0B09; color: #F3E3CF; }

/* 对话 */
.say { position: relative; margin: 14px 0; padding: 22px 16px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font: 600 16px/1.8 var(--serif); }
.say .who { position: absolute; top: -11px; left: 12px; padding: 2px 12px; font: 800 13px var(--serif); letter-spacing: 4px; color: #1E0A08; background: var(--gold); border-radius: 3px; }
.say p + p { margin-top: 8px; }

/* 玉衡殿 */
.hall-title { font: 900 30px var(--serif); letter-spacing: 14px; text-align: center; color: var(--gold); margin: 6px 0 6px; }
.guardian { font-size: 14px; color: var(--dim); text-align: center; margin: 4px 0 16px; }
.gates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gate { position: relative; padding: 16px 12px 14px; border-radius: 10px; text-align: center; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.25)); overflow: hidden; }
.gate h3 { font: 900 26px var(--serif); letter-spacing: 6px; margin: 8px 0 2px; }
.gate .gate-top { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--dim); }
.gate .star { letter-spacing: 3px; }
.gate .gline { font-size: 13px; color: #E6D2BC; min-height: 3.4em; }
.gate .gleft { font-size: 12px; color: var(--dim); margin: 6px 0 10px; }
.gate .btn { min-width: 0; width: 100%; padding: 10px; font-size: 15px; }
.g-hongluan { border-color: rgba(244,166,184,.55); background: linear-gradient(180deg, rgba(244,166,184,.16), rgba(60,10,24,.5)); }
.g-hongluan h3 { color: #FFC4D2; } .g-hongluan .btn.gold { --gold: #F4A6B8; --gold2: #FFE1E8; }
.g-woxing { border-color: rgba(191,208,238,.55); background: linear-gradient(180deg, rgba(150,175,230,.16), rgba(14,20,60,.55)); }
.g-woxing h3 { color: #D7E2F8; } .g-woxing .btn.gold { --gold: #BFD0EE; --gold2: #F1F5FF; }
.gate.shut { filter: saturate(.5); }
.gate.shut::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, rgba(255,227,163,.7), transparent); box-shadow: 0 0 14px 3px rgba(255,220,150,.25); animation: crack 3.5s ease-in-out infinite; }
.gate.shut > * { position: relative; }
@keyframes crack { 50% { opacity: .35; } }

/* 宫殿通用 */
.pal-head { display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.pal-head .left { font-size: 12px; color: var(--dim); }
.pal-title { font: 900 28px var(--serif); letter-spacing: 8px; text-align: center; color: var(--gold); margin: 10px 0 6px; }
.sec { margin: 22px 0 10px; font: 800 15px var(--serif); letter-spacing: 4px; color: var(--gold); }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.choice b { font: 800 18px var(--serif); letter-spacing: 3px; color: var(--gold2); }
.choice span { font-size: 13px; color: var(--dim); }
.choice:active { transform: scale(.985); }
.past { display: flex; flex-direction: column; gap: 6px; }
.past-item { text-align: left; padding: 10px 12px; font-size: 14px; color: var(--ink); background: rgba(0,0,0,.25); border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q { margin: 10px 0 0; font: 600 15px var(--serif); color: var(--dim); text-align: center; }
.plain { font-size: 15px; }
.follow, .locked { margin-top: 18px; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; font-size: 14px; color: var(--dim); }
.follow b, .locked b { display: block; margin-bottom: 4px; color: var(--gold2); font-family: var(--serif); letter-spacing: 2px; }

/* 传送门 */
.door { min-height: calc(100vh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transition: opacity .8s; }
.door-title { font: 900 28px var(--serif); letter-spacing: 10px; color: var(--gold); }
.door-hint { margin: 16px 8px 8px; font-size: 14px; color: var(--dim); max-width: 360px; }
.door-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.door.lit { animation: doorOpen 1.1s ease forwards; }
@keyframes doorOpen { 60% { filter: brightness(2.2); } to { filter: brightness(3); opacity: 0; transform: scale(1.12); } }

.door-stage { position: relative; width: min(100%, calc((100vh - 230px) * .5625)); aspect-ratio: 9 / 16; margin-top: 14px; border-radius: 12px; border: 1px solid var(--line); background: #000 center / cover no-repeat; box-shadow: 0 12px 40px rgba(0,0,0,.5); overflow: hidden; touch-action: none; }
.knob-wrap { position: absolute; left: 50.5%; top: 57.8%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%); touch-action: none; cursor: grab; }
.knob { width: 100%; height: 100%; overflow: visible; }
.knob .rings { transform-origin: 100px 100px; transform: rotate(var(--spin, 0deg)); }
.knob .glow { fill: rgba(255,120,150,.18); filter: blur(6px); animation: knotPulse 2.2s ease-in-out infinite; }
@keyframes knotPulse { 50% { fill: rgba(255,150,175,.4); } }
.knob .ring { fill: none; stroke: #FF4D66; stroke-width: 2.6; stroke-dasharray: 5 4; opacity: .85; filter: drop-shadow(0 0 4px #ff4060); transition: opacity .5s, stroke-width .5s; }
.knob .ring.off { opacity: 0; stroke-width: 0; }
.door-hl.lit .knob .glow { fill: rgba(255,240,245,.9); }
.petals { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.petal { position: absolute; top: 45%; width: 14px; height: 14px; background: #FF8FA8; clip-path: path("M7 13 C-3 6 2 -1 7 4 C12 -1 17 6 7 13 Z"); animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translate(var(--dx), 220px) rotate(var(--rot)); opacity: 0; } }

.pad-wrap { position: absolute; left: 31%; top: 27%; width: 41%; height: 56%; border-radius: 4px; background: rgba(10,16,40,.18); box-shadow: inset 0 0 0 1px rgba(191,208,238,.25); overflow: hidden; touch-action: none; }
.pad { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .9s; }
.pad.fade { opacity: 0; }
.constel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.constel .cl { stroke: rgba(220,232,255,.75); stroke-width: 1.2; vector-effect: non-scaling-stroke; opacity: 0; animation: show .5s forwards; }
.constel .cs { fill: #fff; filter: drop-shadow(0 0 2px #cfe0ff); opacity: 0; animation: show .5s forwards; }
@keyframes show { to { opacity: 1; } }

/* 红鸾：洗牌和翻牌 */
.draw { text-align: center; }
.draw-hint { margin: 6px 0 14px; font: 700 17px var(--serif); letter-spacing: 3px; color: var(--gold2); }
.draw-count { margin-top: 12px; color: var(--dim); font-size: 14px; }
.deck { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.cback { aspect-ratio: 2 / 3; border-radius: 6px; border: 1px solid rgba(255,200,215,.5); background:
  repeating-linear-gradient(45deg, rgba(224,52,74,.55) 0 2px, transparent 2px 9px), repeating-linear-gradient(-45deg, rgba(224,52,74,.55) 0 2px, transparent 2px 9px), #3A0F1C;
  box-shadow: inset 0 0 0 3px #3A0F1C, inset 0 0 0 4px rgba(255,200,215,.35); transition: transform .3s, opacity .3s; }
.shuffling .cback { animation: shuf .7s ease-in-out 2; animation-delay: calc(var(--i) * 18ms); }
@keyframes shuf { 50% { transform: translate(calc((var(--i) - 11) * -4px), -10px) rotate(calc((var(--i) - 11) * 2deg)); } }
.deck .cback.picked { transform: translateY(-8px) scale(.92); opacity: .35; box-shadow: 0 0 16px #ff8fa8; }
.spread { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; perspective: 800px; }
.slot > span { font-size: 12px; color: var(--dim); text-align: center; line-height: 1.4; }
.flip { position: relative; width: 100%; aspect-ratio: 2 / 3; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3,.7,.3,1); }
.flip > * { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .cface { transform: rotateY(180deg); }
.slot.open .flip { transform: rotateY(180deg); }
.slot.next:not(.open) .flip { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-5px); filter: drop-shadow(0 0 10px #ff8fa8); } }
.cface { border-radius: 6px; background: linear-gradient(180deg, #FFF3F5, #F6D4DC); color: #5A0E1E; padding: 5px; }
.cinner { height: 100%; border: 1px solid #C8324A; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 8px 4px; text-align: center; }
.cinner small { font-size: 10px; letter-spacing: 1px; }
.cinner b { font: 900 clamp(15px, 4.6vw, 22px)/1.2 var(--serif); writing-mode: vertical-rl; letter-spacing: 4px; }
.cinner i { font-style: normal; font-size: 9px; color: #9A3A4E; }
.cface.rev .cinner { transform: rotate(180deg); }
.tap-hint { text-align: center; margin-top: 10px; font-size: 13px; color: var(--dim); }
.ctext { margin-top: 16px; padding: 14px; background: var(--panel); border-left: 3px solid var(--gold); border-radius: 6px; animation: rise .5s both; }
.ctext h4 { font: 800 15px var(--serif); color: var(--gold2); letter-spacing: 1px; }
.ctext .pos-line { margin-top: 6px; font: 600 16px/1.7 var(--serif); }
.ctext details { margin-top: 8px; font-size: 14px; color: #E6D2BC; }
.ctext summary { color: var(--gold); font-size: 13px; cursor: pointer; }
.ctext details p { margin-top: 6px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* 卧星：签筒和签 */
.shake { text-align: center; }
.tube { position: relative; width: 130px; height: 230px; margin: 30px auto 10px; }
.can { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; border-radius: 10px 10px 16px 16px; background: linear-gradient(90deg, #1B2A5C, #34477F 45%, #1B2A5C); border: 1px solid #BFD0EE; display: flex; align-items: center; justify-content: center; }
.can span { font: 900 20px var(--serif); writing-mode: vertical-rl; letter-spacing: 6px; color: #E5ECFA; }
.sticks i { position: absolute; bottom: 120px; left: calc(18px + var(--k) * 11px); width: 7px; height: 90px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #E9D7A8, #B99A5E); transform: rotate(calc((var(--k) - 4) * 3deg)); transform-origin: bottom; }
.tube.jig { animation: jig .45s ease; }
@keyframes jig { 20% { transform: rotate(-9deg) translateY(-6px); } 50% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.tube.out .sticks i:nth-child(5) { animation: pop 1s ease forwards; box-shadow: 0 0 16px #FFE7A8; }
@keyframes pop { to { transform: translateY(-120px) rotate(14deg); } }
.stick-card { position: relative; margin-top: 14px; padding: 18px 16px 20px; text-align: center; border-radius: 10px; background: linear-gradient(180deg, #F4EAD2, #E3D2AC); color: #23180A; box-shadow: 0 0 30px rgba(191,208,238,.25); }
.stick-no { font-size: 13px; letter-spacing: 2px; color: #6A5530; }
.stamp { position: absolute; top: 12px; right: 12px; min-width: 46px; padding: 4px 6px; font: 900 18px var(--serif); color: #B5261E; border: 2px solid #B5261E; border-radius: 4px; transform: rotate(8deg); }
.lv-low .stamp { color: #46516B; border-color: #46516B; }
.lv-mid .stamp { color: #7A5A1E; border-color: #7A5A1E; }
.stick-title { margin: 10px 0 12px; font: 900 26px var(--serif); letter-spacing: 8px; }
.poem { display: flex; flex-direction: row-reverse; justify-content: center; gap: 14px; }
.poem span { writing-mode: vertical-rl; font: 700 19px/1.2 var(--serif); letter-spacing: 5px; }
.steps { position: relative; }
.starpath { display: block; width: 100%; height: 50px; }
.starpath polyline { fill: none; stroke: #BFD0EE; stroke-width: 1.5; stroke-dasharray: 300; stroke-dashoffset: 300; }
.starpath circle { fill: #fff; opacity: .2; filter: drop-shadow(0 0 6px #BFD0EE); }
.reading.lit .starpath polyline { animation: draw 2.4s .4s ease forwards; }
.reading.lit .starpath circle { animation: show .4s forwards; }
.reading.lit .starpath circle:nth-of-type(1) { animation-delay: .3s; } .reading.lit .starpath circle:nth-of-type(2) { animation-delay: 1.2s; } .reading.lit .starpath circle:nth-of-type(3) { animation-delay: 2.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.open { margin: 6px 0; font: 700 16px var(--serif); color: var(--gold2); }
.step { margin: 10px 0; padding: 12px 14px; background: var(--panel); border-radius: 8px; font-size: 15px; animation: rise .6s both; animation-delay: calc(.4s + var(--d) * .9s); }
.step b { display: block; color: var(--gold2); font-family: var(--serif); margin-bottom: 2px; }
.items { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 15px; }
.items dt { color: var(--gold); font-family: var(--serif); font-weight: 800; white-space: nowrap; }
.items dd { line-height: 1.65; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.land .btn { align-self: center; min-width: 220px; }

/* 主线：守护者揭晓、当一天猫、成形、玉衡结论 */
.journey { padding-top: 6px; }
.reveal .eyebrow { text-align: center; margin-top: 10px; }
.gcat, .ftype { text-align: center; margin: 18px 0 6px; }
.gcat small, .ftype small { font-size: 13px; letter-spacing: 3px; color: var(--dim); }
.gcat h1, .ftype h1 { font: 900 46px/1.2 var(--serif); letter-spacing: 10px; padding-left: 10px; background: linear-gradient(180deg, #FFE7B0, #E2B24A 55%, #B23A2E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gcat p, .ftype p { font-size: 14px; color: #E6D2BC; }
.shine { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.shine li { padding: 10px 14px; background: var(--panel); border-left: 3px solid var(--gold); border-radius: 6px; font-size: 15px; }
.qtop { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); }
.qbar { height: 3px; margin: 8px 0 4px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.qbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); transition: width .5s; }
.qorb { display: flex; justify-content: center; margin: 8px 0 4px; }
.orb { position: relative; width: 120px; height: 120px; }
.orb i { position: absolute; inset: 0; border-radius: 50% 50% 46% 46% / 56% 56% 44% 44%; background: radial-gradient(circle at 50% 40%, #fff 0%, var(--col) 38%, transparent 70%);
  filter: blur(calc((1 - var(--lv)) * 22px + 2px)); opacity: calc(.35 + var(--lv) * .65); transform: scale(calc(.6 + var(--lv) * .45)); transition: filter 1s, transform 1s, opacity 1s; animation: breath 3.2s ease-in-out infinite; }
.orb i::before, .orb i::after { content: ""; position: absolute; top: -6%; width: 26%; height: 30%; background: var(--col); clip-path: polygon(50% 0, 100% 100%, 0 100%); opacity: calc(var(--lv) * 1.4 - .4); }
.orb i::before { left: 14%; } .orb i::after { right: 14%; }
.orb.burst i { animation: burst 1.4s ease forwards; }
@keyframes breath { 50% { transform: scale(calc(.62 + var(--lv) * .47)); } }
@keyframes burst { 40% { filter: blur(0) brightness(2.5); transform: scale(1.35); } to { filter: blur(0); transform: scale(1.1); } }
.qmile { text-align: center; font: 700 15px var(--serif); color: var(--gold2); margin: 4px 0 8px; }
.qmile.pop { animation: rise .6s both; }
.scene { margin: 10px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.2); }
.scene b { display: block; font: 800 16px var(--serif); letter-spacing: 4px; color: var(--gold); margin-bottom: 4px; }
.scene p { font-size: 14px; color: #E6D2BC; }
.qpre { font-size: 14px; color: var(--dim); }
.qq { margin: 10px 0 14px; font: 800 21px/1.5 var(--serif); }
.ends { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.end { padding: 12px 10px; min-height: 92px; font-size: 14px; line-height: 1.6; text-align: left; color: #E6D2BC; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; transition: border-color .2s, background .2s, transform .2s; }
.end.r { text-align: right; }
.end.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, var(--panel)); color: var(--ink); transform: translateY(-2px); }
.end { cursor: default; }
.dots { display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; margin: 18px 0 4px; }
.dot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0; background: none; border: 0; color: var(--dim); font-size: 11px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dot i { display: block; border-radius: 50%; border: 2px solid var(--gold); transition: background .15s, transform .15s, box-shadow .15s; }
.dot.d0 i, .dot.d5 i { width: 40px; height: 40px; }
.dot.d1 i, .dot.d4 i { width: 31px; height: 31px; }
.dot.d2 i, .dot.d3 i { width: 23px; height: 23px; opacity: .85; }
.dot.d3 { margin-left: 4px; }
.dot:active i { transform: scale(.9); }
.dot.on i { background: var(--gold); box-shadow: 0 0 14px var(--gold); }
.dot.on span { color: var(--gold2); }
.dot.hint i { animation: dotHint .7s ease 2; }
@keyframes dotHint { 50% { transform: scale(1.18); box-shadow: 0 0 16px var(--gold); } }
.qhint { text-align: center; font-size: 12px; color: var(--dim); }
.formed .qorb { margin-top: 4vh; }
.formed-body { animation: rise .8s both; }

/* 命书 */
.mingshu .bk { margin-top: 6px; }
.timeline { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.timeline li { padding: 12px 14px; background: var(--panel); border-radius: 8px; border-left: 3px solid var(--gold); }
.timeline b { font-family: var(--serif); color: var(--gold2); margin-right: 8px; }
.timeline span { font-size: 13px; color: var(--dim); }
.timeline p { margin-top: 4px; font-size: 15px; }
.paytag { margin-left: 8px; padding: 1px 8px; font: 600 11px var(--sans, sans-serif); letter-spacing: 1px; color: var(--dim); border: 1px solid var(--line); border-radius: 99px; vertical-align: middle; }
.pojun ol { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.pojun li b { display: block; color: var(--gold2); font-family: var(--serif); }

/* 玉衡每日 */
.daily { margin: 6px 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, rgba(226,178,74,.10), rgba(0,0,0,.2)); }
.daily-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--dim); }
.daily-top b { font-family: var(--serif); color: var(--gold); letter-spacing: 2px; font-size: 13px; }
.daily-one { margin: 8px 0 2px; font: 800 20px/1.6 var(--serif); color: var(--gold2); }
.daily-detail dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin-top: 8px; font-size: 14px; }
.daily-detail dt { color: var(--gold); font-family: var(--serif); font-weight: 800; white-space: nowrap; }
.daily-detail .paytag { margin-left: 0; }
.choices.hh { margin-top: 10px; }
.hehun .score { text-align: center; margin: 10px 0 4px; }
.hehun .score small { display: block; font-size: 13px; color: var(--dim); letter-spacing: 2px; }
.hehun .score b { display: block; font: 900 64px/1.1 var(--serif); color: var(--gold2); font-variant-numeric: tabular-nums; }
.hehun .score span { font: 800 18px var(--serif); letter-spacing: 6px; color: var(--gold); }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: linear-gradient(90deg, rgba(244,166,184,.22), rgba(244,166,184,.08)); border: 1px solid rgba(244,166,184,.5); font-size: 14px; }
.banner .btn { min-width: 0; padding: 8px 14px; font-size: 14px; letter-spacing: 1px; --gold: #F4A6B8; --gold2: #FFE1E8; }
.linkbox input { width: 100%; padding: 10px 12px; font-size: 14px; color: var(--ink); background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 6px; }

/* 守护者日常（12-02 换成定稿家猫图） */
.gd { display: flex; gap: 14px; align-items: center; margin: 4px 0 14px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.gd-cat { position: relative; flex: 0 0 86px; height: 72px; }
.gd-cat svg { width: 100%; height: 100%; }
.gd-cat svg path:first-child { fill: #2A1A14; stroke: var(--gold); stroke-width: 2; }
.gd-cat .tail { stroke: var(--gold); transform-origin: 90px 72px; animation: tail 2.4s ease-in-out infinite; }
.gd-cat .eye { fill: var(--gold2); animation: blink 5s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes tail { 50% { transform: rotate(-14deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.gd-cat.hop { animation: hop .5s ease; } .gd-cat.wiggle { animation: wiggle .6s ease; } .gd-cat.munch { animation: munch .6s ease; }
@keyframes hop { 40% { transform: translateY(-10px); } }
@keyframes wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes munch { 30%, 70% { transform: scale(1.06, .94); } }
.gd-heart { position: absolute; left: 50%; top: 0; width: 16px; height: 16px; background: #FF8FA8; clip-path: path("M8 15 C-3 7 2 -1 8 4 C14 -1 19 7 8 15 Z"); opacity: 0; }
.gd-heart.up { animation: heartUp 1s ease forwards; }
@keyframes heartUp { 0% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -34px); } }
.gd-body { flex: 1; min-width: 0; }
.gd-body b { font-family: var(--serif); color: var(--gold); letter-spacing: 2px; }
.gd-say { margin: 4px 0 6px; font-size: 14px; min-height: 3.2em; }
.gd-stats { display: flex; gap: 12px; font-size: 12px; color: var(--dim); margin-bottom: 8px; }
.gd-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.gd-btns .btn { padding: 6px 10px; font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); transform: translateX(-50%); max-width: min(90vw, 460px); padding: 12px 16px; border-radius: 10px; background: rgba(20,10,8,.95); border: 1px solid var(--line); color: var(--ink); font-size: 14px; z-index: 20; animation: rise .3s both; }

/* 图鉴 */
.al-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.al-grid.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.al-item { padding: 8px 4px; text-align: center; border-radius: 6px; border: 1px dashed var(--line); color: var(--dim); min-width: 0; }
.al-item b { display: block; font: 800 13px/1.3 var(--serif); }
.al-item small { display: block; font-size: 10px; }
.al-item.on { border-style: solid; color: var(--gold2); background: rgba(226,178,74,.1); }
.al-count { font-size: 14px; color: var(--dim); margin: 6px 0; }
.al-sticks { display: flex; flex-wrap: wrap; gap: 6px; }
.al-sticks span { font-size: 12px; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line); }
.al-sticks .lv-high { color: #F5C26B; } .al-sticks .lv-mid { color: var(--ink); } .al-sticks .lv-low { color: #9AA6C6; }
@media (max-width: 420px) { .al-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.daily-jq { margin: 2px 0 6px; font-size: 13px; color: var(--dim); }
.daily-jq b { margin-right: 6px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--gold); font-weight: 700; }

/* 分享卡片弹层 */
.sheet { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.75); }
.sheet-in { width: min(420px, 100%); max-height: 100%; overflow: auto; text-align: center; }
.sheet-in img { width: 100%; max-width: 100%; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.sheet .btn { text-decoration: none; }

/* 定稿美术（12-02）：殿和宫的头图、四扇门的门卡 */
.hero { position: relative; margin: -4px -16px 10px; aspect-ratio: 9 / 11; background: center 30% / cover no-repeat; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.hero.tall { aspect-ratio: 9 / 13; }
.hero + .hall-title, .hero + .pal-title { margin-top: -54px; position: relative; text-shadow: 0 2px 12px #000, 0 0 2px #000; }
.gate.art { padding-top: 0; background: #0A0605; }
.gate-pic { margin: 0 -12px 2px; aspect-ratio: 1; background: center 60% / 170% auto no-repeat; -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); }
.gate.art.shut .gate-pic { filter: brightness(.75); }
.gate.art > * { position: relative; z-index: 1; }
.gate.art.shut::before { z-index: 1; }

/* 测验分三幕（12-02）：四神预告、幕间页、守护者插话、提前进殿 */
.gods4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 14px; }
.g4 { text-align: center; font-size: 12px; color: var(--dim); }
.g4 i { display: block; aspect-ratio: 3 / 4; border-radius: 8px; border: 1px solid var(--line); background: center 60% / 190% auto no-repeat; margin-bottom: 4px; }
.g4 b { display: block; font: 800 15px var(--serif); letter-spacing: 2px; color: var(--gold2); }
.actend { text-align: center; animation: rise .6s both; }
.actend .say { text-align: left; }
.act-head { font: 700 14px var(--serif); letter-spacing: 6px; color: var(--dim); margin-top: 6px; }
.act-big { font: 900 34px var(--serif); letter-spacing: 10px; margin: 6px 0 4px; text-shadow: 0 0 18px currentColor; }
.act-note { font-size: 14px; color: #E6D2BC; margin-top: 10px; }
.act-note.small { font-size: 12px; color: var(--dim); }
.actend .btn + .btn { margin-top: 10px; }
.qchat { animation: rise .5s both; }
.qchat .say { margin: 6px 0 10px; font-size: 15px; }
.early-box { margin: 14px 0; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; }
.early-box p { font: 600 15px/1.8 var(--serif); margin-bottom: 10px; }
.early-box .link { margin-top: 8px; }
.eyes2 { display: flex; justify-content: center; gap: 46px; margin: 22px 0 18px; }
.eyes2 i { position: relative; width: 74px; height: 46px; border-radius: 80% 10% 80% 10% / 90% 10% 90% 10%; background: radial-gradient(circle at 50% 50%, #fff 0 6%, var(--eye) 30%, color-mix(in srgb, var(--eye) 40%, #000) 100%); box-shadow: 0 0 26px var(--eye), 0 0 60px color-mix(in srgb, var(--eye) 50%, transparent); transform: rotate(-8deg) scaleY(.05); animation: eyeOpen 1.2s .3s cubic-bezier(.2,.8,.2,1) forwards; }
.eyes2 i + i { transform: rotate(8deg) scaleY(.05) scaleX(-1); animation-name: eyeOpenR; }
.eyes2 i::after { content: ""; position: absolute; left: 50%; top: 8%; bottom: 8%; width: 8px; margin-left: -4px; border-radius: 50%; background: #0B0605; }
@keyframes eyeOpen { to { transform: rotate(-8deg) scaleY(1); } }
@keyframes eyeOpenR { to { transform: rotate(8deg) scaleY(1) scaleX(-1); } }

/* 你每一面有多明显 */
.dims { margin: 6px 0 4px; }
.dim { margin: 12px 0; }
.dim-ends { display: flex; justify-content: space-between; font: 700 14px var(--serif); color: var(--dim); margin-bottom: 5px; }
.dim-ends .on { color: var(--gold2); }
.dim-bar { position: relative; height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.dim-bar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--gold2)); }
.dim-bar i.l { left: 0; }
.dim-bar i.r { right: 0; background: linear-gradient(270deg, var(--gold), var(--gold2)); }
.dim.mid .dim-bar i { opacity: .55; }
.dim p { font-size: 13px; color: #E6D2BC; margin-top: 5px; }

/* 卧星翻到的一句（孙子兵法点缀） */
.sunzi { margin: 18px 0 6px; padding: 14px 16px; border-left: 2px solid var(--gold); background: rgba(191,208,238,.06); border-radius: 0 8px 8px 0; }
.sunzi b { display: block; font: 800 13px var(--serif); letter-spacing: 4px; color: var(--dim); margin-bottom: 6px; }
.sunzi .sz-line { font: 700 17px/1.7 var(--serif); color: var(--gold2); }
.sunzi .sz-line small { display: inline-block; margin-left: 8px; font: 400 11px var(--serif); color: var(--dim); }
.sunzi p + p { margin-top: 6px; font-size: 15px; }
.sunzi .sz-todo { color: var(--gold2); font-size: 14px; }

/* 守护者定稿图 */
.gd-cat { flex: 0 0 92px; height: 124px; display: flex; align-items: flex-end; justify-content: center; }
.gd-cat img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: 50% 100%; animation: breathe 3.6s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
@keyframes breathe { 50% { transform: scale(1.012, 1.03); } }
.gpic { position: relative; width: min(72vw, 300px); margin: 6px auto -6px; aspect-ratio: 3 / 4; display: flex; align-items: flex-end; justify-content: center; animation: rise 1s both; }
.gpic::before { content: ""; position: absolute; left: 10%; right: 10%; top: 18%; bottom: 4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,220,150,.32), transparent); filter: blur(10px); }
.gpic img { position: relative; max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); }
.al-g { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; margin-bottom: 4px; }
.al-none { background: center / 60% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100'%3E%3Cpath d='M30 36 L36 10 L50 28 Q60 25 70 28 L84 10 L90 36 Q98 50 92 66 Q86 86 60 88 Q34 86 28 66 Q22 50 30 36 Z' fill='%23ffffff' fill-opacity='.08'/%3E%3C/svg%3E"); }

/* 做题时：守护者陪在旁边，中间是成形中的猫的虚影 */
.qorb { align-items: flex-end; gap: 10px; }
.qguard { width: 70px; height: 96px; object-fit: contain; object-position: bottom; margin-bottom: 4px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); animation: breathe 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
.forming { position: relative; width: 150px; height: 176px; display: flex; align-items: center; justify-content: center; }
.forming .orb { position: absolute; inset: 0; margin: auto; width: 150px; height: 150px; }
.fm-pic { position: relative; width: 126px; height: 168px; border-radius: 50% 50% 46% 46% / 56% 56% 44% 44%; background: center / 100% auto no-repeat;
  filter: blur(calc((1 - var(--lv)) * 9px)) brightness(calc(.38 + var(--lv) * .55)) grayscale(calc(1 - var(--lv)));
  opacity: calc(.6 + var(--lv) * .4); transition: filter .8s, opacity .8s;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent); mask-image: radial-gradient(closest-side, #000 70%, transparent); }
/* 成形页：从虚影一下子清楚，变成完整的猫格图 */
.formed .forming { width: min(66vw, 260px); height: auto; aspect-ratio: 3 / 4; }
.formed .forming .orb { width: 100%; height: auto; aspect-ratio: 1; }
.formed .fm-pic { width: 100%; height: 100%; border-radius: 14px; filter: blur(14px) brightness(.25) grayscale(1); opacity: .4; transition: filter 1.4s ease .4s, opacity 1.4s ease .4s, border-radius 1.4s; -webkit-mask-image: none; mask-image: none; box-shadow: 0 0 30px var(--col); }
.formed .forming.shown .fm-pic { filter: none; opacity: 1; }

/* 成形页「当猫的你，是这个形状」：五边形雷达，不写百分比（审阅 #6） */
.dims.radar { margin: 10px 0 6px; text-align: center; }
.rd { display: block; width: 100%; max-width: 360px; margin: 0 auto; overflow: visible; }
.rd-ring { fill: none; stroke: rgba(255,227,163,.14); stroke-width: 1; }
.rd-ring:last-of-type { stroke: rgba(255,227,163,.28); }
.rd-spoke { stroke: rgba(255,227,163,.12); stroke-width: 1; }
.rd-shape { fill: rgba(226,178,74,.28); stroke: var(--gold2); stroke-width: 2; stroke-linejoin: round; transform-origin: 180px 158px; animation: rdIn 1.1s cubic-bezier(.2,.8,.2,1) both .2s; filter: drop-shadow(0 0 10px rgba(255,210,120,.35)); }
.rd-dot { fill: var(--gold2); animation: rdIn 1.1s cubic-bezier(.2,.8,.2,1) both .2s; transform-origin: 180px 158px; }
@keyframes rdIn { from { transform: scale(.1); opacity: 0; } }
.rd-lab { cursor: pointer; outline: none; }
.rd-lab text { font: 800 15px var(--serif); fill: #FFF1D6; letter-spacing: 1px; transition: fill .2s; }
.rd-lab .rd-sub { font: 600 11px var(--serif); fill: var(--dim); letter-spacing: 0; }
.rd-lab.both > text:first-of-type { fill: var(--dim); font-size: 13px; }
.rd-lab.on > text:first-of-type, .rd-lab:focus-visible > text:first-of-type { fill: var(--gold2); }
.rd-say { min-height: 1.8em; margin: 2px 8px 0; font: 600 14px/1.7 var(--serif); color: var(--dim); }
.rd-say.said { color: #E6D2BC; }
@media (prefers-reduced-motion: reduce) { .rd-shape, .rd-dot { animation: none; } }

/* 成形：光影散开（审阅 #7）。旧的软光团不要了，换成 canvas 粒子；图从光里显出来，显完一道光从左上扫到右下 */
.formed .forming .orb { display: none; }
.formed .forming { overflow: visible; }
.formed .burst-fx { position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; pointer-events: none; z-index: 2; }
.formed .fm-pic { filter: blur(18px) brightness(2.2) saturate(.2); opacity: 0; transform: scale(.94); transition: filter 1.6s cubic-bezier(.2,.8,.2,1), opacity .5s ease, transform 1.6s cubic-bezier(.2,.8,.2,1), box-shadow 1.6s; box-shadow: 0 0 60px var(--col); overflow: hidden; }
.formed .forming.shown .fm-pic { filter: none; opacity: 1; transform: none; box-shadow: 0 0 26px var(--col); }
.formed .fm-pic::after { content: ''; position: absolute; inset: -20%; background: linear-gradient(115deg, transparent 38%, rgba(255,250,235,.55) 50%, transparent 62%); transform: translateX(-120%); }
.formed .forming.shown .fm-pic::after { animation: picSweep 1.4s ease 1.3s both; }
@keyframes picSweep { to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .formed .forming.shown .fm-pic::after { animation: none; } }
