:root {
  --u: 4px;
  --font: Georgia, "Times New Roman", serif;
  --gold: #e8c27a;
  --gold2: #f8e3a8;
  --gold3: #a8803c;
  --cream: #f6ead0;
  --muted: #d9c7a3;
  --ink: #1b0907;
  --red: #8a1a14;
  --panel-img: none;
  --btn-img: none;
  --sym: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #050303; color: var(--cream); font-family: var(--font); }
#app { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #241009 0%, #0b0504 55%, #030202 100%); }
#shell { position: absolute; left: 0; top: 0; width: 100vw; height: 100vh; overflow: hidden; background: #140806; font-size: calc(var(--u) * 4); font-family: var(--font); will-change: transform; }
#bg, #fx { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
#bg { z-index: 0; }
#ui { position: absolute; inset: 0; z-index: 2; }
#fx { z-index: 4; pointer-events: none; }
#flash { position: absolute; inset: 0; z-index: 5; background: #fff3d0; opacity: 0; pointer-events: none; mix-blend-mode: screen; }
#cut { position: absolute; left: 0; top: 0; display: none; overflow: hidden; z-index: 20; background: #000 url("assets/cover-bg.webp") center / cover no-repeat; font-size: calc(var(--u) * 4); font-family: var(--font); }
#cut video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; }
#cutsub { position: absolute; left: 6%; right: 6%; bottom: 9%; text-align: center; font-size: 1.08em; line-height: 1.6; font-weight: 700; color: var(--cream); text-shadow: 0 0 3px #000, 0 0 6px #000, 0 2px 0 #000; opacity: 0; transition: opacity .4s; padding: .5em .8em; background: linear-gradient(90deg, transparent, rgba(10, 4, 2, .55) 15%, rgba(10, 4, 2, .55) 85%, transparent); }
#cutsub.on { opacity: 1; }
#skip { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 3; min-width: 5.4em; }
#fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 1000; transition: opacity .32s ease; }
#fade.on { opacity: 1; pointer-events: auto; }

/* ---------- generic pieces ---------- */
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.top { flex: 0 0 auto; height: 3.6em; display: flex; align-items: center; gap: .5em; padding: .45em 64px .2em .55em; position: relative; z-index: 3; }
.ttl { flex: 1 1 auto; min-width: 0; font-weight: 900; font-size: 1.22em; color: var(--gold2); letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 4px 0 rgba(0,0,0,.45); }
.ttl small { display: block; font-size: .56em; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin-top: .1em; overflow: hidden; text-overflow: ellipsis; }
.dots { display: flex; gap: 5px; align-items: center; flex: 0 0 auto; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(232, 194, 122, .25); border: 1px solid rgba(232, 194, 122, .55); }
.dots i.on { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.back { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: radial-gradient(circle at 40% 35%, #5a1912, #2a0907 70%); border: 2px solid var(--gold); box-shadow: 0 3px 8px rgba(0,0,0,.6), inset 0 0 0 2px rgba(0,0,0,.35); transition: transform .09s, filter .12s; }
.back svg { width: 22px; height: 22px; fill: var(--gold2); filter: drop-shadow(0 1px 1px #000); }
.back:active, .back.press { transform: scale(.92); }

.stage { flex: 1 1 auto; position: relative; min-height: 0; z-index: 1; }
.dlg { flex: 0 0 auto; position: relative; margin: .9em .6em 0; padding: 1.05em 1.15em .9em; min-height: 5.6em; z-index: 2; cursor: pointer;
  background: linear-gradient(180deg, rgba(48, 16, 10, .96), rgba(26, 8, 6, .97)); border: 2px solid var(--gold3); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.55); }
.skinned .dlg, .skinned .panel, .skinned .opt, .skinned .sec, .skinned .btn.alt, .skinned .spanel { background: transparent; border-radius: 0; }
.skinned .dlg { border-style: solid; border-color: transparent; border-width: 20px; padding: .25em .45em .05em; border-image: var(--panel-img) 50 fill / 24px stretch; }
.dlg .who { position: absolute; left: .6em; top: -1.55em; padding: .18em .9em; font-size: .9em; font-weight: 900; letter-spacing: .1em; color: var(--gold2); background: linear-gradient(#9b2018, #5d0e0b); border: 2px solid var(--gold); border-radius: 6px;
  text-shadow: 0 0 2px #000, 0 2px 0 #000; box-shadow: 0 3px 6px rgba(0,0,0,.5); }
.skinned .dlg .who { left: -.2em; top: -2.1em; }
.dlg .txt { font-size: 1.04em; line-height: 1.62; color: var(--cream); min-height: 3.2em; white-space: pre-line; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.dlg .note { margin-top: .35em; font-size: .86em; line-height: 1.55; color: var(--gold2); opacity: .92; white-space: pre-line; }
.dlg .more { position: absolute; right: .3em; bottom: -.1em; color: var(--gold); font-size: .8em; animation: bob 1s ease-in-out infinite; opacity: 0; }
.dlg.done .more { opacity: .9; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

.act { flex: 0 0 auto; position: relative; z-index: 2; padding: .7em .6em calc(.9em + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: .55em; }
.row { display: flex; gap: .55em; }
.row > * { flex: 1 1 0; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .55em; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5em; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .42em; }
.col { display: flex; flex-direction: column; gap: .5em; }

/* buttons */
.btn { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 3.05em; padding: .5em .9em; cursor: pointer; user-select: none;
  font-weight: 900; font-size: 1.02em; letter-spacing: .06em; line-height: 1.25; color: #fff1c6;
  text-shadow: -1.5px -1.5px 0 #3a0705, 1.5px -1.5px 0 #3a0705, -1.5px 1.5px 0 #3a0705, 1.5px 1.5px 0 #3a0705, 0 3px 0 rgba(0,0,0,.45);
  background: linear-gradient(180deg, #b52a1f, #7d130e 55%, #5f0d0a); border: 2px solid var(--gold); border-radius: 9px; box-shadow: 0 4px 0 #2c0605, 0 6px 12px rgba(0,0,0,.45);
  transition: transform .09s ease-out, filter .12s ease-out; }
.skinned .btn { background: transparent; border-radius: 0; box-shadow: none; border-style: solid; border-color: transparent; border-width: 9px 12px; padding: .2em .5em; border-image: var(--btn-img) 22 26 fill / 11px 13px stretch; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.btn small { display: block; font-size: .72em; font-weight: 700; letter-spacing: .02em; color: #f3d9a6; margin-top: .15em; }
.btn .bi { display: block; }
.btn:hover { filter: brightness(1.12); }
.skinned .btn:hover { filter: brightness(1.12) drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.btn.press, .btn:active { transform: scale(.955) translateY(1px); }
.btn.alt { color: var(--gold2); background: linear-gradient(180deg, #3b1d12, #1f0c08); border: 2px solid var(--gold3); text-shadow: 0 0 2px #000, 0 2px 0 #000; }
.skinned .btn.alt { border-width: 10px; border-image: var(--panel-img) 50 fill / 14px stretch; }
.btn.dim { filter: grayscale(.8) brightness(.55) !important; pointer-events: none; }
.btn.small { min-height: 2.6em; font-size: .92em; }
.btn.big { min-height: 3.5em; font-size: 1.12em; }
.kbd .fz.focus { filter: brightness(1.22) drop-shadow(0 0 7px rgba(255, 214, 120, .95)) !important; z-index: 3; }
.kbd .btn.fz.focus, .kbd .opt.fz.focus { transform: translateY(-2px); }
.kbd .fz.focus.opt, .kbd .fz.focus.tcard, .kbd .fz.focus.pile { outline: 3px solid var(--gold2); outline-offset: 2px; }

/* option tiles */
.opt { position: relative; cursor: pointer; padding: .7em .9em; min-height: 3.2em; display: flex; flex-direction: column; justify-content: center; gap: .15em; min-width: 0;
  background: linear-gradient(180deg, rgba(58, 22, 13, .95), rgba(30, 10, 7, .96)); border: 2px solid var(--gold3); border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,.5); transition: transform .09s, filter .12s; }
.skinned .opt { border-style: solid; border-color: transparent; border-width: 14px; padding: .15em .35em; border-image: var(--panel-img) 50 fill / 16px stretch; filter: drop-shadow(0 4px 5px rgba(0,0,0,.5)); }
.opt .t { font-weight: 900; font-size: 1.04em; color: var(--gold2); letter-spacing: .05em; text-shadow: 0 0 2px #000, 0 2px 0 #000; overflow-wrap: anywhere; }
.opt .d { font-size: .8em; line-height: 1.4; color: var(--muted); }
.opt.sel { filter: brightness(1.25) drop-shadow(0 0 8px rgba(255, 210, 120, .9)); }
.opt.sel .t::before { content: "◆ "; color: #ffd36b; }
.opt:hover { filter: brightness(1.1); }
.opt.press, .opt:active { transform: scale(.97); }
.opt.center { align-items: center; text-align: center; }
.opt.wide { grid-column: 1 / -1; }
.grid4 .opt { padding: .35em .15em; min-height: 2.9em; }
.skinned .grid4 .opt { border-width: 9px; padding: .1em 0; }
.grid4 .opt .t { font-size: .88em; letter-spacing: 0; line-height: 1.2; }
.grid4 .opt.sel .t::before { content: none; }
.grid4.hours { gap: .32em; }
.grid4.hours .opt { min-height: 2.6em; }
.grid4.hours .opt .t { font-size: .8em; }
.grid4.hours .opt .d { font-size: .64em; line-height: 1.2; }
.grid4.hours .opt.unk { grid-column: span 2; }
.plines { gap: .4em; }
.plines .opt { min-height: 2.75em; padding: .35em .6em; gap: .05em; }
.skinned .plines .opt { border-width: 11px; padding: 0 .25em; }
.plines .opt .t { font-size: .95em; }
.plines .opt .d { font-size: .72em; line-height: 1.25; }

/* method cards in the hall */
.mcard { display: flex; flex-direction: row; align-items: center; gap: .55em; padding: .45em .5em; min-height: 4.6em; }
.skinned .mcard { padding: 0 .1em; }
.mcard img { width: 3.1em; height: 3.1em; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 3px 4px rgba(0,0,0,.7)); }
.mcard .tx { min-width: 0; display: flex; flex-direction: column; gap: .12em; }
.mcard .t { font-size: 1em; }
.mcard .d { font-size: .72em; }

/* reading */
.reading { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; padding: .3em .6em 1.4em; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 26px), transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 26px), transparent 100%); position: relative; z-index: 2; }
.reading::-webkit-scrollbar { display: none; }
.reading * { touch-action: pan-y; }
.sec { position: relative; margin: .2em 0 .8em; padding: 1em 1.05em; background: linear-gradient(180deg, rgba(44, 16, 10, .95), rgba(24, 8, 6, .96)); border: 2px solid var(--gold3); border-radius: 10px; box-shadow: 0 6px 16px rgba(0,0,0,.5); }
.skinned .sec { border-style: solid; border-color: transparent; border-width: 20px; padding: .2em .35em .1em; border-image: var(--panel-img) 50 fill / 24px stretch; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); }
.sec h3 { margin: .1em 0 .55em; display: flex; align-items: center; gap: .6em; font-size: 1.08em; font-weight: 900; letter-spacing: .1em; color: var(--gold2); text-align: center; justify-content: center; text-shadow: 0 0 2px #000, 0 2px 0 #000; }
.sec h3::before, .sec h3::after { content: ""; flex: 1 1 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); min-width: 1em; }
.sec h3::after { background: linear-gradient(270deg, transparent, var(--gold)); }
.sec p { margin: .45em 0; font-size: .97em; line-height: 1.72; color: var(--cream); white-space: pre-line; overflow-wrap: anywhere; }
.sec p.em { color: var(--gold2); font-weight: 700; }
.sec p.sm { font-size: .84em; color: var(--muted); }
.sec p.ctr, .ctr { text-align: center; }
.sec .big { font-size: 1.6em; font-weight: 900; color: var(--gold2); text-align: center; letter-spacing: .08em; text-shadow: 0 0 2px #000, 0 3px 0 #000; margin: .1em 0 .2em; }
.sec .big.sm { font-size: 1.2em; letter-spacing: .04em; }
.sec .sub { text-align: center; color: var(--muted); font-size: .9em; letter-spacing: .06em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .35em .8em; margin: .5em 0; font-size: .95em; line-height: 1.5; }
.kv b { color: var(--gold); font-weight: 800; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: .4em; justify-content: center; margin: .5em 0; }
.chip { padding: .25em .7em; border-radius: 999px; border: 1px solid var(--gold3); background: rgba(232, 194, 122, .1); color: var(--gold2); font-size: .86em; font-weight: 700; }
.chip.revc { border-color: #d0604a; color: #ffb09a; background: rgba(200, 60, 40, .18); }
.seal { display: inline-block; padding: .05em .4em; border: 2px solid #d23a2a; color: #ff6a50; border-radius: 4px; font-weight: 900; letter-spacing: .1em; transform: rotate(-4deg); background: rgba(120, 10, 5, .25); }
.stars { color: #ffd36b; letter-spacing: .1em; text-shadow: 0 0 4px rgba(255, 200, 80, .6); white-space: nowrap; }
.stars i { color: rgba(255, 211, 107, .25); font-style: normal; }
.disc { text-align: center; font-size: .8em; color: var(--muted); opacity: .85; margin: .2em .5em 1em; line-height: 1.6; }
.hintp { text-align: center; font-size: .82em !important; color: var(--muted) !important; margin: .1em 0 .5em; text-shadow: 0 1px 2px #000; }
.bar { height: .7em; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; border: 1px solid rgba(232, 194, 122, .3); }
.bar i { display: block; height: 100%; border-radius: 3px; transition: width .8s cubic-bezier(.3, 1.3, .5, 1); }
.strbar { margin: .4em 0 .6em; height: .9em; }
.elrow { display: grid; grid-template-columns: 2.4em 1fr 1.6em; align-items: center; gap: .5em; margin: .3em 0; font-weight: 800; }
.el0 { color: #79c26b; } .el1 { color: #ff7055; } .el2 { color: #e0b259; } .el3 { color: #f1efe6; } .el4 { color: #6fb2ff; }
.elb0 { background: linear-gradient(90deg, #2f6b2a, #79c26b); } .elb1 { background: linear-gradient(90deg, #8c2015, #ff7055); } .elb2 { background: linear-gradient(90deg, #7d5a1c, #e0b259); }
.elb3 { background: linear-gradient(90deg, #8a8576, #f1efe6); } .elb4 { background: linear-gradient(90deg, #1d4a85, #6fb2ff); }
.calc { white-space: pre-line; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* pickers */
.pickers { display: flex; gap: .5em; justify-content: center; }
.picker { flex: 1 1 0; display: flex; flex-direction: column; align-items: stretch; gap: .3em; min-width: 0; }
.picker .lab { text-align: center; font-size: .86em; color: var(--gold); font-weight: 800; letter-spacing: .1em; }
.picker .val { text-align: center; font-size: 1.55em; font-weight: 900; color: #fff3cf; padding: .25em 0; border-radius: 8px; background: rgba(0,0,0,.45); border: 1px solid rgba(232, 194, 122, .5); box-shadow: inset 0 2px 8px rgba(0,0,0,.7);
  touch-action: none; cursor: ns-resize; text-shadow: 0 2px 0 #000; font-variant-numeric: tabular-nums; }
.picker .btn { min-height: 2.75em; padding: 0; }
.picker .btn svg { width: 1.1em; height: 1.1em; fill: #fff1c6; filter: drop-shadow(0 1px 0 #3a0705); }

/* hold button */
.holdw { display: flex; flex-direction: column; align-items: center; gap: .4em; }
.hold { position: relative; width: 6.4em; height: 6.4em; border-radius: 50%; cursor: pointer; touch-action: none; user-select: none; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 42% 35%, #c2382a, #7a120d 60%, #4a0907); border: 3px solid var(--gold); box-shadow: 0 6px 0 #2a0504, 0 10px 18px rgba(0,0,0,.6), inset 0 0 18px rgba(0,0,0,.5); transition: transform .1s; }
.hold.on { transform: scale(.94); filter: brightness(1.15); }
.hold svg.ring { position: absolute; inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); transform: rotate(-90deg); pointer-events: none; }
.hold svg.ring circle { fill: none; stroke-width: 5; }
.hold .lbl { font-weight: 900; font-size: 1em; color: #fff1c6; text-align: center; line-height: 1.2; padding: 0 .4em; text-shadow: 0 0 2px #3a0705, 0 2px 0 #3a0705; }
.holdw .hint { font-size: .82em; color: var(--muted); text-align: center; }

/* modal */
.modal { position: absolute; inset: 0; z-index: 30; background: rgba(5, 2, 1, .78); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1em; padding: 1.2em; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.mname { font-weight: 900; font-size: 1.3em; color: var(--gold2); text-align: center; letter-spacing: .06em; text-shadow: 0 0 3px #000, 0 2px 0 #000; }
.modal .btn { min-width: 8em; }

/* title */
.title { position: absolute; inset: 0; cursor: pointer; }
.title .logo { position: absolute; left: 50%; top: 4.5%; width: 84%; max-height: 32%; object-fit: contain; transform: translateX(-50%); filter: drop-shadow(0 6px 10px rgba(0,0,0,.7)); }
.title .logo.dropin { animation-name: dincx; }
.title .prompt { position: absolute; left: 0; right: 0; bottom: 8.5%; text-align: center; font-size: 1.08em; font-weight: 800; letter-spacing: .14em; color: #fbe7b5;
  text-shadow: 0 0 3px #000, 0 0 8px #000, 0 2px 0 #000; animation: pulse 1.8s ease-in-out infinite; }
.title .tagline { position: absolute; left: 0; right: 0; bottom: 4.2%; text-align: center; font-size: .78em; color: var(--muted); letter-spacing: .1em; text-shadow: 0 0 3px #000, 0 1px 0 #000; opacity: .85; }
@keyframes pulse { 0%, 100% { opacity: .55; transform: scale(.98); } 50% { opacity: 1; transform: scale(1.02); } }

/* in-stage things */
.obj { position: absolute; pointer-events: none; user-select: none; -webkit-user-drag: none; }
canvas.guide { transition: opacity .5s, left .5s, height .5s; }
canvas.guide.gfade { opacity: .22; }
canvas.guide.side { left: 18%; height: 52%; }
.stamp { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) rotate(-8deg); padding: .1em .45em; font-size: 2.6em; font-weight: 900; letter-spacing: .12em; color: #ff5a3e; z-index: 3;
  border: 4px solid #e2402c; border-radius: 8px; background: rgba(60, 5, 2, .55); text-shadow: 0 0 2px #000, 0 3px 0 #000; box-shadow: 0 0 20px rgba(255, 80, 40, .35); pointer-events: none; white-space: nowrap; }
.stamp.gold { color: #ffd875; border-color: #e8c27a; box-shadow: 0 0 22px rgba(255, 210, 110, .45); }
.plaque { position: absolute; left: 50%; transform: translateX(-50%); padding: .3em 1em; font-weight: 900; font-size: 1.4em; letter-spacing: .12em; color: #ffe7a6; white-space: nowrap; z-index: 3;
  background: linear-gradient(#8f1d15, #530c09); border: 2px solid var(--gold); border-radius: 8px; text-shadow: 0 0 2px #000, 0 2px 0 #000; box-shadow: 0 6px 14px rgba(0,0,0,.6); }
.list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .3em; }
.list li { display: flex; gap: .5em; align-items: center; font-size: .98em; line-height: 1.45; color: var(--muted); transition: color .3s; }
.list li i { width: 1.25em; height: 1.25em; flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--gold3); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: .8em; color: transparent; }
.list li.cur { color: #fff3cf; font-weight: 800; }
.list li.cur i { border-color: var(--gold2); box-shadow: 0 0 8px rgba(255, 210, 110, .8); }
.list li.ok { color: var(--gold2); }
.list li.ok i { background: var(--gold); border-color: var(--gold2); color: #3a0705; }

/* ---------- temple oracle ---------- */
.qian .incense { left: 22%; width: 56%; bottom: 1%; transition: left .6s cubic-bezier(.3,1.1,.5,1), width .6s cubic-bezier(.3,1.1,.5,1), bottom .6s; filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)); }
.qian .incense.aside { left: 1%; width: 38%; bottom: 3%; }
.spanel { position: absolute; right: 3%; top: 5%; width: 60%; padding: .8em .9em; z-index: 2; background: linear-gradient(180deg, rgba(48,16,10,.94), rgba(26,8,6,.95)); border: 2px solid var(--gold3); border-radius: 10px; box-shadow: 0 6px 14px rgba(0,0,0,.5); }
.skinned .spanel { border: 18px solid transparent; padding: .1em .3em; border-image: var(--panel-img) 50 fill / 22px stretch; box-shadow: none; filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
.spanel .list li { font-size: .92em; }
.jiao { width: 27%; bottom: 13%; z-index: 2; filter: drop-shadow(0 8px 8px rgba(0,0,0,.55)); }
.jiao.j0 { left: 17%; }
.jiao.j1 { right: 17%; }
.qtong { position: absolute; left: 0; right: 0; bottom: 3%; height: 74%; display: flex; justify-content: center; pointer-events: none; z-index: 2; }
.qtong .cupimg { position: relative; height: 100%; width: auto; transform-origin: 50% 92%; transition: transform .12s; filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)); }
.qstick { width: 24%; left: 38%; top: 12%; z-index: 3; filter: drop-shadow(0 4px 5px rgba(0,0,0,.6)); }
.qpaper { position: absolute; left: 50%; top: 3%; height: 94%; aspect-ratio: 2 / 3; max-width: 92%; transform: translateX(-50%); background: url("assets/qian-paper.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 10px 16px rgba(0,0,0,.65)); z-index: 2; }
.qpaper.popin { animation-name: popcx; }
.qpaper .in { position: absolute; left: 16%; right: 16%; top: 11%; bottom: 11%; display: flex; flex-direction: column; align-items: center; color: #2a0d06; }
.qpaper .no { font-weight: 900; font-size: 1.05em; letter-spacing: .12em; color: #3a0f06; }
.qpaper .gr { margin: .2em 0 .3em; font-weight: 900; font-size: .9em; padding: .05em .5em; border: 2px solid #4a1206; border-radius: 4px; color: #4a1206; }
.qpaper .poem { flex: 1 1 auto; min-height: 0; writing-mode: vertical-rl; text-orientation: upright; font-weight: 900; font-size: 1.12em; line-height: 1.9; letter-spacing: .08em; color: #1c0904; white-space: pre; margin: .3em 0; }
.qpaper .ms { font-weight: 800; font-size: .78em; letter-spacing: .1em; color: #3a0f06; }
.poemh { display: flex; flex-direction: column; align-items: center; gap: .25em; margin: .6em 0 .3em; font-size: 1.22em; font-weight: 900; color: var(--gold2); letter-spacing: .22em; text-shadow: 0 0 2px #000, 0 2px 0 #000; }

/* ---------- tarot ---------- */
.tcard { position: absolute; width: var(--cw, 4em); height: calc(var(--cw, 4em) * 1.5); perspective: 700px; cursor: pointer; }
.tcard .in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .65s cubic-bezier(.3, 1.2, .5, 1); }
.tcard.up .in { transform: rotateY(180deg); }
.tcard .f, .tcard .b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 6px; overflow: hidden; border: 1.5px solid #c9a35a; box-shadow: 0 4px 10px rgba(0,0,0,.6); background: #0d1630; }
.tcard .f { transform: rotateY(180deg); }
.tcard.rev .f > .art { transform: rotate(180deg); }
.tcard img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tcard .art { position: absolute; inset: 0; }
.tcard .num { position: absolute; left: 0; right: 0; top: 3%; text-align: center; font-weight: 900; font-size: calc(var(--cw, 4em) * .17); color: #ffe6a6; text-shadow: 0 0 2px #000, 0 1px 0 #000; }
.tcard .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 2% 2% 4%; text-align: center; font-weight: 800; font-size: calc(var(--cw, 4em) * .12); line-height: 1.15; color: #ffe6a6; background: linear-gradient(transparent, rgba(0,0,0,.8) 40%); text-shadow: 0 1px 0 #000; }
.tcard .pn { position: absolute; left: 50%; top: -1.35em; transform: translateX(-50%); font-size: .7em; font-weight: 800; color: var(--gold2); white-space: nowrap; text-shadow: 0 0 2px #000, 0 1px 0 #000; }
.tcard.cross { z-index: 2; }
.tcard.cross .in { transform: rotate(90deg); }
.tcard.cross.up .in { transform: rotate(90deg) rotateY(180deg); }
.tcard.cross .pn { top: auto; bottom: -1.3em; }
.tcard.thumb { position: relative; --cw: 5.2em; flex: 0 0 auto; }
.tcard.big { position: relative; --cw: min(62vw, 15em); }
.pile { position: absolute; cursor: pointer; }
.pile img { position: absolute; width: 100%; border-radius: 6px; border: 1.5px solid #c9a35a; box-shadow: 0 3px 8px rgba(0,0,0,.6); }
.tread { display: flex; gap: .8em; align-items: flex-start; margin: .5em 0; }
.tread .tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .35em; align-items: flex-start; }
.tname { font-weight: 900; font-size: 1.15em; color: var(--gold2); letter-spacing: .04em; text-shadow: 0 0 2px #000, 0 2px 0 #000; }
.sec p.kwl { margin: 0; font-size: .84em; line-height: 1.5; color: var(--muted); }

/* ---------- I Ching ---------- */
.hex { display: flex; flex-direction: column-reverse; gap: .42em; align-items: center; }
.hex .ln { position: relative; width: 6.6em; height: .78em; display: flex; justify-content: space-between; }
.hex .ln b { display: block; height: 100%; border-radius: 2px; background: linear-gradient(180deg, #fbe4a2, #c99a45); box-shadow: 0 1px 0 #3a1a08, 0 0 6px rgba(255, 210, 110, .35); }
.hex .ln.y b { width: 100%; }
.hex .ln.n b { width: 43%; }
.hex .ln.e b { background: rgba(232, 194, 122, .12); box-shadow: none; border: 1px dashed rgba(232, 194, 122, .35); width: 100%; }
.hex .ln .mk { position: absolute; right: -1.6em; top: 50%; transform: translateY(-50%); font-weight: 900; color: #ff7a5a; font-size: .95em; text-shadow: 0 0 2px #000; }
.hex .ln.new { animation: lnIn .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes lnIn { from { transform: scaleX(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.hexbox { position: absolute; left: 0; right: 0; top: 5%; display: flex; justify-content: center; z-index: 2; }
.hexbox .hex { padding: .7em 2.2em .7em 1.2em; border-radius: 10px; background: radial-gradient(ellipse at center, rgba(30, 10, 6, .75), rgba(30, 10, 6, 0) 75%); }
.hexbox .hex .ln { width: 7.2em; height: .88em; }
.hexs { display: flex; justify-content: space-around; align-items: flex-end; gap: .6em; margin: .4em 0 .2em; }
.hexs .hx { display: flex; flex-direction: column; align-items: center; gap: .35em; min-width: 0; }
.hexs .hx .nm { font-weight: 900; color: var(--gold2); font-size: .95em; text-align: center; }
.hexs .hx .lb { font-size: .75em; color: var(--muted); letter-spacing: .1em; }
.hexs .hex .ln { width: 4.2em; height: .55em; }
.hexs .hex { gap: .3em; }
.coin { position: absolute; width: 5.2em; height: 5.2em; margin-left: 3.5%; z-index: 2; filter: drop-shadow(0 6px 6px rgba(0,0,0,.55)); }
.coin img { width: 100%; height: 100%; display: block; }
.coin .ch { position: absolute; font-weight: 900; font-size: 1.05em; color: #22170c; text-shadow: 0 1px 0 rgba(255, 240, 200, .35), 0 -1px 0 rgba(0,0,0,.4); transform: translate(-50%, -50%); }
.coin.back img { filter: brightness(.8) sepia(.25); }
.coin .tag { position: absolute; left: 50%; bottom: -1.6em; transform: translateX(-50%); font-weight: 900; color: var(--gold2); font-size: .9em; text-shadow: 0 0 2px #000, 0 2px 0 #000; white-space: nowrap; }

/* ---------- BaZi ---------- */
.bazi canvas.guide, .astro canvas.guide { height: 56%; }
.obj.luopan { left: 27%; width: 46%; top: 2%; filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); }
.obj.luopan.spin { animation: spin 2.6s cubic-bezier(.25, .1, .2, 1) both; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(1080deg); } }
.bz { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35em; margin: .3em 0 .5em; }
.bz .pl { display: flex; flex-direction: column; align-items: center; gap: .15em; padding: .45em .1em; border-radius: 8px; background: rgba(0,0,0,.28); border: 1px solid rgba(232,194,122,.3); min-width: 0; }
.bz .pl.dmc { border: 2px solid var(--gold); box-shadow: 0 0 10px rgba(255,210,110,.35); background: rgba(120, 30, 15, .35); }
.bz .pl.unk { opacity: .55; }
.bz .lb { font-size: .78em; color: var(--muted); letter-spacing: .08em; }
.bz .gd { font-size: .76em; color: var(--gold); font-weight: 800; text-align: center; line-height: 1.2; min-height: 1.2em; overflow-wrap: anywhere; }
.bz .gd.sm2 { font-size: .62em; color: var(--muted); font-weight: 700; }
.bz .ch { font-size: 2.1em; font-weight: 900; line-height: 1.12; text-shadow: 0 0 2px #000, 0 2px 0 #000; }
.bz .hd { font-size: .86em; font-weight: 800; display: flex; gap: .15em; flex-wrap: wrap; justify-content: center; text-align: center; }
.bz .ny { font-size: .62em; color: var(--muted); text-align: center; line-height: 1.25; overflow-wrap: anywhere; }
.luck { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4em; margin-top: .5em; }
.luck > div { display: flex; flex-direction: column; align-items: center; padding: .35em .1em; border-radius: 8px; background: rgba(0,0,0,.25); border: 1px solid rgba(232,194,122,.25); }
.luck b { font-size: 1.35em; font-weight: 900; text-shadow: 0 2px 0 #000; }
.luck small { font-size: .74em; color: var(--muted); }

/* ---------- stars & numbers ---------- */
.orb { position: absolute; left: 50%; top: 7%; height: 42%; aspect-ratio: 1; transform: translateX(-50%); z-index: 2; }
.orb .fl { position: absolute; inset: 0; animation: floaty 4.5s ease-in-out infinite; }
.orb .astrolabe { left: 0; top: 0; width: 100%; height: 100%; animation: idlespin 90s linear infinite; filter: drop-shadow(0 0 14px rgba(150, 170, 255, .35)); }
.orb .astrolabe.spin { animation: spin 2.4s cubic-bezier(.25, .1, .2, 1) both; }
.zg { position: absolute; transform: translate(-50%, -50%); font-size: 1.05em; line-height: 1; color: rgba(240, 225, 190, .6); text-shadow: 0 0 4px #000, 0 0 2px #000; font-family: var(--sym); transition: transform .3s, color .3s, text-shadow .3s; }
.zg.pre { color: #fff1c6; text-shadow: 0 0 7px rgba(255, 210, 120, .95), 0 0 2px #000; }
.zg.blink { color: #d6e0ff; text-shadow: 0 0 9px rgba(160, 180, 255, 1); transform: translate(-50%, -50%) scale(1.4); }
.zg.on { color: #ffd875; transform: translate(-50%, -50%) scale(1.9); text-shadow: 0 0 10px rgba(255, 200, 90, 1), 0 0 2px #000; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4%); } }
@keyframes idlespin { to { transform: rotate(360deg); } }
.astro .plaque { font-family: var(--font); }
.glyph { text-align: center; font-size: 3.2em; line-height: 1.15; color: #ffd875; text-shadow: 0 0 14px rgba(255, 200, 90, .7), 0 2px 0 #000; font-family: var(--sym); }
.numb { width: 3.6em; height: 3.6em; margin: .2em auto .3em; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--gold);
  background: radial-gradient(circle at 40% 35%, #4a2c5c, #160c26 70%); box-shadow: 0 0 14px rgba(255, 210, 120, .35), inset 0 0 10px rgba(0,0,0,.6); }
.numb b { font-size: 1.9em; font-weight: 900; color: #ffe6a6; text-shadow: 0 2px 0 #000; }
.daygrid { display: flex; flex-direction: column; }
.daygrid .dr { display: flex; justify-content: space-between; align-items: center; margin-top: .45em; padding-top: .4em; border-top: 1px solid rgba(232, 194, 122, .2); }
.daygrid .dr:first-child { border-top: 0; margin-top: .1em; }
.daygrid .dr b { color: var(--gold2); font-weight: 900; letter-spacing: .08em; }
.daygrid .dr .stars { font-size: 1.05em; }
.sec .daygrid p { margin: .1em 0; font-size: .9em; line-height: 1.55; }
.mglyphs { display: flex; justify-content: center; gap: 1.3em; margin: .3em 0 .5em; }
.mglyphs div { display: flex; flex-direction: column; align-items: center; gap: .15em; }
.mglyphs i { font-style: normal; font-size: 2em; line-height: 1.1; color: #ffd875; text-shadow: 0 0 8px rgba(255, 200, 90, .6); font-family: var(--sym); }
.mglyphs small { font-size: .78em; color: var(--muted); }

/* ---------- palm ---------- */
.palm { position: absolute; }
.palm img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); }
.palm svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 2px rgba(255, 230, 170, .85)); }
.palmscr .stage .palm { top: 2%; height: 96%; aspect-ratio: 683 / 1024; left: 61%; transform: translateX(-50%); z-index: 2; }
.palmscr .stage .palm.mirror { transform: translateX(-50%) scaleX(-1); }
.palmscr .stage .palm.popin { animation-name: popcx; }
.palmscr .stage .palm.mirror.popin { animation-name: popcxm; }
.palm path.ln { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.palm path.cur { stroke-width: 1.6; }
.palm path.old { stroke-width: 1.15; opacity: .55; }
.palm path.hint { stroke-width: 1.3; stroke-dasharray: 2 2.4; animation: hintp 1.2s ease-in-out infinite; }
.palm path.ghost { stroke-width: 1; stroke-dasharray: 1.5 2.5; opacity: .5; }
@keyframes hintp { 0%, 100% { opacity: .3; } 50% { opacity: .95; } }
.palm.mini { position: relative; width: 46%; aspect-ratio: 683 / 1024; margin: .2em auto .5em; }
.palm.mini.mirror { transform: scaleX(-1); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: .4em .6em; margin: .3em 0; }
.legend span { display: flex; align-items: center; gap: .35em; font-size: .88em; min-width: 0; flex-wrap: wrap; line-height: 1.3; }
.legend i { width: .8em; height: .8em; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 6px rgba(255, 220, 150, .7); }
.legend b { color: var(--gold2); font-weight: 900; }
.legend small { color: var(--muted); font-size: .88em; }
.pline h3 { color: var(--lc, var(--gold2)); }

/* ---------- animations ---------- */
.fadein { animation: fin .35s ease-out both; }
.popin { animation: pop .38s cubic-bezier(.3, 1.6, .5, 1) both; }
.slidein { animation: sin .34s cubic-bezier(.25, 1.3, .5, 1) both; }
.dropin { animation: din .5s cubic-bezier(.3, 1.5, .5, 1) both; }
.plaque.popin, .orb.popin { animation-name: popcx; }
@keyframes fin { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes popcx { from { opacity: 0; transform: translateX(-50%) scale(.6); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes popcxm { from { opacity: 0; transform: translateX(-50%) scaleX(-1) scale(.6); } to { opacity: 1; transform: translateX(-50%) scaleX(-1); } }
@keyframes sin { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes din { from { opacity: 0; transform: translateY(-40px) scale(1.15); } to { opacity: 1; transform: none; } }
@keyframes dincx { from { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(1.15); } to { opacity: 1; transform: translateX(-50%); } }
.stamp.popin { animation: stampIn .45s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes stampIn { from { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(2.2); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } }
