/* ═══════════════════════════════════════════════════════════
   守岁 · 猫与十二生肖 —— 漆器 · 剪纸 · 拓片
   ═══════════════════════════════════════════════════════════ */
:root {
  --ink: #15100d;
  --ink-2: #211915;
  --ink-3: #2f241d;
  --ink-4: #43352b;
  --lacquer: #4e1011;
  --lacquer-2: #74191a;
  --cinnabar: #b5262a;
  --vermilion: #d8433a;
  --gold: #d4a853;
  --gold-2: #f3d58d;
  --gold-3: #97702e;
  --paper: #f3e6c9;
  --paper-2: #e7d3aa;
  --paper-3: #cdb484;
  --bone: #efe2c4;
  --jade: #3f7c64;
  --indigo: #22314a;
  --txt: #2a1c13;
  --txt-light: #f4e9d2;
  --muted: #a8977b;
  --w: #3f7d5a; --f: #c8372d; --e: #a97a22; --m: #8d9aa3; --wa: #3a5f8c;
  --font-brush: 'SS Brush', 'Ma Shan Zheng', 'STXingkai', 'KaiTi', 'STKaiti', 'Kaiti SC', serif;
  --font-serif: 'SS Serif', 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-kai: 'KaiTi', 'STKaiti', 'Kaiti SC', 'SS Serif', serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --fiber: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.012 .09' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .33  0 0 0 0 .2  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0807; overflow: hidden; }
body { font-family: var(--font-serif); color: var(--txt-light); -webkit-font-smoothing: antialiased; user-select: none; }
button { font-family: inherit; }
b { color: inherit; font-weight: 700; }
.hidden { display: none !important; }

#viewport { position: fixed; inset: 0; overflow: hidden; overflow: clip; background:
  radial-gradient(ellipse at 50% 40%, #241712 0%, #0b0807 70%); }
#stage { position: absolute; left: 50%; top: 50%; width: 1600px; height: 900px; transform-origin: 50% 50%;
  overflow: hidden; overflow: clip; background: var(--ink); box-shadow: 0 0 120px rgba(0,0,0,.8); }
#grain { position: absolute; inset: 0; pointer-events: none; background-image: var(--grain); opacity: .16; mix-blend-mode: overlay; z-index: 90; }

/* ───────── backdrop: ink-wash sky & mountains ───────── */
#backdrop { position: absolute; inset: 0; z-index: 0; transition: background 1.2s; }
#backdrop .bd-sky { position: absolute; inset: 0; }
#backdrop .bd-orb { position: absolute; border-radius: 50%; filter: blur(.5px); opacity: .85; }
#backdrop svg.bd-mtn { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
#backdrop .bd-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(5,3,2,.78) 100%); }
#particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.pt { position: absolute; top: -20px; will-change: transform; animation: fall linear infinite; }
.pt.snow { width: 6px; height: 6px; border-radius: 50%; background: #f5f1ea; opacity: .75; filter: blur(.4px); }
.pt.petal { width: 9px; height: 6px; border-radius: 60% 0 60% 0; background: #e9a1ae; opacity: .8; }
.pt.leaf { width: 10px; height: 7px; border-radius: 0 70% 0 70%; background: #c98a3c; opacity: .8; }
.pt.firefly { top: auto; bottom: -10px; width: 5px; height: 5px; border-radius: 50%; background: #ffd97a; box-shadow: 0 0 10px 3px rgba(255,200,90,.6); animation-name: rise; }
.pt.spark { top: auto; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: #ffcf6a; box-shadow: 0 0 8px 2px rgba(255,140,60,.7); animation-name: rise; }
@keyframes fall { to { transform: translate3d(var(--dx, 40px), 960px, 0) rotate(540deg); } }
@keyframes rise { 0% { transform: translate3d(0,0,0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate3d(var(--dx, 30px), -960px, 0); opacity: 0; } }

/* ───────── screens ───────── */
#screen { position: absolute; inset: 0; z-index: 5; }
.scr { position: absolute; inset: 0; animation: scrIn .6s var(--ease) both; }
.scr.out { animation: scrOut .35s ease both; }
@keyframes scrIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes scrOut { to { opacity: 0; } }

.brush { font-family: var(--font-brush); font-weight: 400; }
.kai { font-family: var(--font-kai); }
.gold-txt { color: var(--gold-2); text-shadow: 0 1px 0 #5d3f10, 0 0 18px rgba(243,213,141,.25); }
.vert { writing-mode: vertical-rl; text-orientation: upright; }

/* paper-cut svg */
.pc { display: block; overflow: visible; }
.pc .b { fill: currentColor; }
.pc .c { fill: var(--cut, #f3e6c9); }
.pc-red { color: var(--cinnabar); --cut: var(--paper); filter: drop-shadow(0 1.5px 0 rgba(90, 20, 10, .35)); }
.pc-gold { color: var(--gold-2); --cut: var(--ink-2); }
.pc-bone { color: var(--bone); --cut: #1a1411; }
.pc-ink { color: #1c1511; --cut: var(--paper); }

/* seal stamp */
.seal { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-brush); color: #fff4e0;
  background: var(--cinnabar); border-radius: 4px; box-shadow: inset 0 0 0 2px rgba(255,230,200,.35), 0 1px 0 rgba(0,0,0,.4); line-height: 1; }

/* ───────── buttons ───────── */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 180px; height: 58px; padding: 0 28px;
  font-family: var(--font-brush); font-size: 28px; color: #fff3dc; letter-spacing: .12em; cursor: pointer;
  background: linear-gradient(180deg, #c3312e 0%, #9a1f1f 55%, #7c1718 100%);
  border: 0; border-radius: 6px; box-shadow: inset 0 0 0 2px var(--gold-3), inset 0 0 0 5px #7c1718, inset 0 0 0 6px rgba(243,213,141,.55), 0 6px 16px rgba(0,0,0,.45);
  transition: transform .18s var(--ease), filter .18s, box-shadow .18s; text-shadow: 0 2px 0 rgba(60,8,6,.6); }
.btn::before, .btn::after { content: ''; position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: var(--gold); transform: rotate(45deg); }
.btn::before { left: -4px; } .btn::after { right: -4px; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.12); box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 0 5px #7c1718, inset 0 0 0 6px rgba(243,213,141,.8), 0 10px 24px rgba(0,0,0,.5), 0 0 24px rgba(216,67,58,.35); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { filter: grayscale(.8) brightness(.7); cursor: not-allowed; transform: none; }
.btn.small { height: 42px; min-width: 110px; font-size: 21px; padding: 0 18px; }
.btn.ghost { background: rgba(20,14,11,.72); color: var(--gold-2); box-shadow: inset 0 0 0 1.5px var(--gold-3), 0 4px 12px rgba(0,0,0,.35); text-shadow: none; }
.btn.ghost::before, .btn.ghost::after { background: var(--gold-3); }
.btn.gold { background: linear-gradient(180deg, #f6dc98 0%, #d4a853 60%, #a57a2d 100%); color: #3a220c; text-shadow: 0 1px 0 rgba(255,245,210,.6);
  box-shadow: inset 0 0 0 2px #7c5a1f, inset 0 0 0 5px #d9b161, inset 0 0 0 6px rgba(90,60,20,.5), 0 6px 16px rgba(0,0,0,.45); }
.btn .sub { font-family: var(--font-serif); font-size: 14px; letter-spacing: .05em; opacity: .8; }

/* ───────── top bar ───────── */
#topbar { position: absolute; left: 0; right: 0; top: 0; height: 58px; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 0 22px;
  background: linear-gradient(180deg, rgba(40,12,11,.96), rgba(24,10,9,.92)); border-bottom: 2px solid var(--gold-3);
  box-shadow: 0 6px 18px rgba(0,0,0,.45); }
#topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--gold-3) 0 6px, transparent 6px 9px, var(--gold-3) 9px 11px, transparent 11px 18px); opacity: .55; }
.tb-chapter { display: flex; align-items: center; gap: 10px; min-width: 250px; }
.tb-chapter .seal { width: 40px; height: 40px; font-size: 26px; }
.tb-chapter .t1 { font-family: var(--font-brush); font-size: 24px; color: var(--gold-2); line-height: 1; }
.tb-chapter .t2 { font-size: 13px; color: var(--muted); margin-top: 3px; }
.tb-stat { display: flex; align-items: center; gap: 8px; font-size: 20px; color: var(--txt-light); cursor: default; }
.tb-stat .ico { width: 28px; height: 28px; }
.tb-stat.hp .num { color: #ffb7a8; }
.tb-stat.coin .num { color: var(--gold-2); }
.tb-relics { flex: 1; display: flex; gap: 6px; align-items: center; overflow: hidden; padding-left: 10px; }
.relic { width: 40px; height: 40px; border-radius: 50%; padding: 6px; background: radial-gradient(circle at 40% 35%, #5a1f1b, #2a0f0d);
  box-shadow: inset 0 0 0 1.5px var(--gold-3), 0 2px 6px rgba(0,0,0,.5); cursor: help; flex: none; transition: transform .15s; }
.relic:hover { transform: scale(1.15); }
.relic .pc { width: 100%; height: 100%; }
.relic.pulse { animation: relicPulse .8s ease; }
@keyframes relicPulse { 50% { transform: scale(1.35); box-shadow: inset 0 0 0 2px var(--gold-2), 0 0 18px var(--gold); } }
.tb-btn { height: 38px; padding: 0 14px; display: flex; align-items: center; gap: 6px; font-family: var(--font-brush); font-size: 20px; color: var(--gold-2);
  background: rgba(0,0,0,.25); border: 1px solid var(--gold-3); border-radius: 4px; cursor: pointer; transition: background .15s; }
.tb-btn:hover { background: rgba(212,168,83,.15); }
.tb-btn .n { font-family: var(--font-serif); font-size: 15px; color: var(--txt-light); }

/* ═══════════ CARDS ═══════════ */
.card { position: relative; width: 168px; height: 236px; border-radius: 10px; color: var(--txt); cursor: pointer; flex: none;
  background: radial-gradient(ellipse at 30% 20%, #fbf2de 0%, var(--paper) 45%, var(--paper-2) 100%);
  box-shadow: inset 0 0 0 2px #c9a86a, inset 0 0 0 5px var(--paper), inset 0 0 0 6.5px var(--cinnabar), 0 8px 18px rgba(0,0,0,.5);
  transition: transform .22s var(--ease), box-shadow .22s, filter .2s; }
.card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background-image: var(--fiber), var(--grain); opacity: .5; mix-blend-mode: multiply; pointer-events: none; }
.card.cat { box-shadow: inset 0 0 0 2px #b7a27a, inset 0 0 0 5px var(--paper), inset 0 0 0 6.5px var(--ink-3), 0 8px 18px rgba(0,0,0,.5); }
.card.special { background: radial-gradient(ellipse at 30% 20%, #efe6f1, #d9cbd9); }
.card.status { background: radial-gradient(ellipse at 30% 20%, #e7e2da, #c9c1b3); filter: saturate(.6); }
.card.up { box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 0 5px var(--paper), inset 0 0 0 6.5px var(--gold-3), 0 0 16px rgba(243,213,141,.55), 0 8px 18px rgba(0,0,0,.5); }
.card .corner { position: absolute; width: 22px; height: 22px; color: var(--cinnabar); opacity: .85; }
.card.cat .corner { color: var(--ink-3); }
.card .corner.tl { left: 7px; top: 7px; } .card .corner.tr { right: 7px; top: 7px; transform: scaleX(-1); }
.card .corner.bl { left: 7px; bottom: 7px; transform: scaleY(-1); } .card .corner.br { right: 7px; bottom: 7px; transform: scale(-1); }
.c-cost { position: absolute; left: -9px; top: -9px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-brush); font-size: 26px; color: #fff4df; z-index: 3;
  background: radial-gradient(circle at 38% 32%, #e0524a, var(--cinnabar) 55%, #7c1718); box-shadow: 0 0 0 2px var(--gold-3), 0 3px 6px rgba(0,0,0,.5); }
.c-cost.cheap { color: #b9ffd0; } .c-cost.dear { color: #ffc4b8; }
.c-cost.none { background: #6a6059; font-size: 18px; }
.c-elem { position: absolute; right: 9px; top: 9px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-brush); font-size: 19px; color: #fff; z-index: 3; box-shadow: 0 0 0 1.5px rgba(255,255,255,.7), 0 2px 4px rgba(0,0,0,.35); }
.c-name { position: absolute; left: 0; right: 0; top: 13px; text-align: center; font-family: var(--font-brush); font-size: 23px; line-height: 1; color: var(--txt); letter-spacing: .04em; }
.card.up .c-name { color: #7a4b0c; }
.c-name.z { left: 30px; right: 36px; font-size: 22px; }
.c-name.z .zn { margin-left: 6px; padding: 0 5px; font-size: 20px; color: #fff4df; background: var(--cinnabar); border-radius: 3px; }
.c-art { position: absolute; left: 16px; right: 16px; top: 44px; height: 84px; border-radius: 6px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, #fff8e8 0%, #efdfbd 70%, #dcc596 100%); box-shadow: inset 0 0 0 1px rgba(120,80,40,.25), inset 0 -10px 18px rgba(150,110,60,.18); }
.c-art .wm { position: absolute; right: 4px; bottom: -8px; font-family: var(--font-brush); font-size: 64px; color: rgba(181,38,42,.1); line-height: 1; }
.c-art .pc { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%,-50%); }
.c-art .pc.flip { transform: translate(-50%,-50%) scaleX(-1); }
.c-type { position: absolute; left: 0; right: 0; top: 131px; text-align: center; font-size: 11px; letter-spacing: .25em; color: #8a6a44; }
.c-stats { position: absolute; left: 14px; right: 14px; top: 147px; display: flex; justify-content: center; gap: 12px; font-size: 13px; }
.c-stats span { padding: 1px 8px; border-radius: 10px; background: rgba(181,38,42,.1); color: #7a1c18; }
.c-stats span.hp { background: rgba(63,124,100,.12); color: #2f5f4c; }
.c-desc { position: absolute; left: 13px; right: 13px; top: 150px; bottom: 12px; font-size: 13px; line-height: 1.45; text-align: center; color: #33241a;
  display: flex; flex-direction: column; justify-content: center; }
.card.zodiac .c-desc { top: 168px; font-size: 12px; line-height: 1.35; }
.c-desc b { color: #9b1d1a; }
.c-desc i { font-style: normal; color: #6d5a8a; }
.c-sig { display: block; }
.c-sig.locked { color: #9a8a74; }
.c-sig .nm { color: #9b1d1a; }
.card.unplayable { filter: saturate(.35) brightness(.78); }
.card.selected { transform: translateY(-40px) scale(1.06) !important; box-shadow: inset 0 0 0 2px var(--gold-2), inset 0 0 0 5px var(--paper), inset 0 0 0 6.5px var(--gold), 0 0 26px rgba(243,213,141,.8), 0 12px 24px rgba(0,0,0,.5); }
.card .tag-new { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); }

/* ═══════════ BATTLE ═══════════ */
.battle-scr { }
.wheel { position: absolute; left: 480px; top: 75px; width: 640px; height: 640px; }
.wheel > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wheel-base { filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)); }
.wheel-lines { pointer-events: none; }
.wheel-fx { pointer-events: none; z-index: 20; }
.wheel.spin .wheel-base { animation: wheelSpin 1.6s var(--ease); }
@keyframes wheelSpin { to { transform: rotate(360deg); } }
.hand-needle { position: absolute; left: 50%; top: 50%; width: 22px; height: 182px; margin-left: -11px; margin-top: -182px; transform-origin: 50% 100%;
  transition: transform .5s cubic-bezier(.34,1.35,.5,1); pointer-events: none; z-index: 6; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.hand-needle svg { width: 100%; height: 100%; }
.wheel-center { position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 50%; z-index: 7;
  background: radial-gradient(circle at 40% 35%, #fff1c9, #e7c475 45%, #a87a2c 100%); box-shadow: 0 0 0 3px #6d4b16, 0 0 0 7px rgba(243,213,141,.35), 0 8px 18px rgba(0,0,0,.55), inset 0 0 18px rgba(120,70,10,.5); }
.wheel-center .pc { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; transform: translate(-50%,-54%); }
.wheel-center.hurt { animation: hurt .35s ease; }
.wheel-center .wc-block { position: absolute; right: -14px; bottom: -8px; min-width: 44px; height: 44px; padding: 0 6px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #eaf2ff; background: radial-gradient(circle at 40% 35%, #6f8fb8, #2f4a70); border-radius: 12px 12px 22px 22px;
  box-shadow: 0 0 0 2px #cfe0ff, 0 3px 8px rgba(0,0,0,.5); }
.wheel-center .wc-block:empty { display: none; }
@keyframes hurt { 30% { transform: translate(-3px,2px); filter: brightness(1.4) saturate(2) hue-rotate(-20deg); } 60% { transform: translate(3px,-2px); } }

.slot { position: absolute; width: 100px; height: 100px; margin: -50px 0 0 -50px; border-radius: 50%; z-index: 8; transition: transform .2s var(--ease); }
.slot .s-disk { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 45% 38%, rgba(60,20,18,.55), rgba(25,8,8,.75)); box-shadow: inset 0 0 0 1.5px rgba(212,168,83,.55), inset 0 0 14px rgba(0,0,0,.6); transition: background .3s, box-shadow .3s; }
.slot .s-branch { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-brush); color: rgba(243,213,141,.5); line-height: 1; }
.slot .s-branch .b1 { font-size: 40px; }
.slot .s-branch .b2 { font-size: 15px; margin-top: 2px; color: rgba(243,213,141,.35); }
.slot .s-art { position: absolute; left: 50%; top: 50%; width: 74px; height: 74px; transform: translate(-50%,-52%); }
.slot .s-art .pc { width: 100%; height: 100%; }
.slot.ally .s-disk { background: radial-gradient(circle at 42% 36%, #fff8e6, var(--paper) 55%, var(--paper-3)); box-shadow: 0 0 0 3px var(--gold-3), 0 0 0 5px rgba(243,213,141,.45), 0 6px 14px rgba(0,0,0,.55), inset 0 0 12px rgba(150,100,40,.35); }
.slot.ally.unawake .s-disk { box-shadow: 0 0 0 3px #8d7a5c, 0 6px 14px rgba(0,0,0,.55), inset 0 0 12px rgba(150,100,40,.35); }
.slot.ally .s-branch, .slot.enemy .s-branch, .slot.part .s-branch { display: none; }
.slot.spirit .s-disk { background: radial-gradient(circle, rgba(255,240,200,.9), rgba(243,213,141,.4)); box-shadow: 0 0 22px rgba(255,220,140,.9); }
.slot.spirit .s-art { opacity: .8; }
.slot.enemy .s-disk, .slot.part .s-disk { background: radial-gradient(circle at 45% 38%, #3a2d35, #17110f 70%); box-shadow: 0 0 0 2.5px #6d5a7c, 0 0 18px rgba(120,80,160,.45), 0 6px 14px rgba(0,0,0,.6), inset 0 0 14px rgba(0,0,0,.7); }
.slot.enemy.elite .s-disk { box-shadow: 0 0 0 3px #a77b2f, 0 0 22px rgba(190,120,40,.5), 0 6px 14px rgba(0,0,0,.6), inset 0 0 14px rgba(0,0,0,.7); }
.slot.enemy.boss .s-disk { box-shadow: 0 0 0 3.5px var(--vermilion), 0 0 28px rgba(216,67,58,.6), 0 6px 14px rgba(0,0,0,.6), inset 0 0 14px rgba(0,0,0,.7); }
.slot.enemy.giant { z-index: 9; }
.slot.enemy.giant .s-art { width: 104px; height: 104px; }
.slot.part { opacity: .92; }
.slot.part .s-art { opacity: .28; filter: blur(.5px); }
.slot.part .s-partlbl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-brush); font-size: 22px; color: rgba(239,226,196,.55); }
.slot.enemy.illusion .s-art { opacity: .6; filter: blur(.4px); }
.slot.duty { transform: scale(1.1); }
.slot.duty.ally .s-disk { box-shadow: 0 0 0 3px var(--gold-2), 0 0 0 6px rgba(243,213,141,.6), 0 0 30px 6px rgba(255,210,110,.55), inset 0 0 12px rgba(150,100,40,.35); animation: dutyGlow 1.6s ease-in-out infinite; }
@keyframes dutyGlow { 50% { box-shadow: 0 0 0 3px #fff0c0, 0 0 0 8px rgba(243,213,141,.35), 0 0 42px 10px rgba(255,210,110,.6), inset 0 0 12px rgba(150,100,40,.35); } }
.slot.deshi .s-disk { animation: deshiGlow 1.2s ease-in-out infinite; }
@keyframes deshiGlow { 50% { box-shadow: 0 0 0 3px #ff6b5a, 0 0 34px 8px rgba(255,60,40,.55), inset 0 0 14px rgba(0,0,0,.7); } }
.slot .s-tag { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); padding: 1px 8px; font-family: var(--font-brush); font-size: 15px; white-space: nowrap; border-radius: 3px; z-index: 4; }
.slot .s-tag.duty { background: var(--gold); color: #3a220c; }
.slot .s-tag.deshi { background: var(--vermilion); color: #fff; }
.slot .s-hp { position: absolute; left: 12px; right: 12px; bottom: -9px; height: 9px; border-radius: 5px; background: rgba(0,0,0,.7); box-shadow: 0 0 0 1.5px rgba(0,0,0,.6); overflow: hidden; z-index: 3; }
.slot .s-hp i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #7fd09a, #3f8d5d); transition: width .3s; }
.slot.enemy .s-hp i, .slot.part .s-hp i { background: linear-gradient(180deg, #ff7a6a, #b3261f); }
.slot .s-hp i.blk { background: linear-gradient(180deg, #a9c3e6, #5579a8); opacity: .85; }
.slot.ally .s-hpn { display: none; }
.slot .s-hp.big { left: 4px; right: 4px; bottom: -12px; height: 15px; border-radius: 8px; }
.slot .s-hp b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1; color: #fff; text-shadow: 0 1px 1px #000, 0 0 3px #000; }
.slot .s-hpn { position: absolute; left: 0; right: 0; bottom: -27px; text-align: center; font-size: 12px; color: var(--txt-light); text-shadow: 0 1px 2px #000; z-index: 3; white-space: nowrap; }
.slot .b-pow, .slot .b-chg, .slot .b-elem, .slot .b-blk { position: absolute; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; z-index: 4; border-radius: 10px; }
.slot .b-pow { left: -10px; bottom: 6px; min-width: 32px; height: 22px; padding: 0 5px; background: var(--cinnabar); color: #fff; box-shadow: 0 0 0 1.5px var(--gold-2); }
.slot .b-chg { right: -12px; bottom: 6px; min-width: 32px; height: 22px; padding: 0 5px; background: linear-gradient(180deg, #f6dc98, #c9962f); color: #3a220c; box-shadow: 0 0 0 1.5px #fff2c4, 0 0 10px rgba(255,210,110,.8); }
.slot .b-elem { right: -6px; top: -4px; width: 26px; height: 26px; border-radius: 50%; font-family: var(--font-brush); font-size: 16px; color: #fff; box-shadow: 0 0 0 1.5px rgba(255,255,255,.75); }
.slot .b-blk { left: -12px; top: -2px; min-width: 32px; height: 30px; padding: 0 5px; background: radial-gradient(circle at 40% 35%, #7f9ec4, #3a5680); color: #fff; border-radius: 10px 10px 16px 16px; box-shadow: 0 0 0 1.5px #d6e4ff; }
.slot .s-status { position: absolute; left: 50%; top: 100%; margin-top: 16px; transform: translateX(-50%); display: flex; gap: 3px; z-index: 4; }
.slot .s-status span { font-size: 11px; padding: 1px 5px; border-radius: 8px; background: rgba(20,14,11,.9); box-shadow: inset 0 0 0 1px var(--gold-3); white-space: nowrap; color: var(--txt-light); }
.slot .s-status span.bad { box-shadow: inset 0 0 0 1px #c86b5a; color: #ffc9bd; }
.slot .s-status span.good { box-shadow: inset 0 0 0 1px #8fb88f; color: #d6f5d6; }
.slot .s-intent { position: absolute; z-index: 12; display: flex; align-items: center; gap: 3px; padding: 3px 8px 3px 4px; border-radius: 16px; white-space: nowrap; pointer-events: none;
  background: rgba(15,10,9,.93); box-shadow: inset 0 0 0 1.5px #a0463c, 0 3px 8px rgba(0,0,0,.6); font-size: 15px; color: #ffe2d8; }
.slot .s-intent .nm { font-family: var(--font-brush); font-size: 17px; color: var(--txt-light); margin: 0 4px 0 4px; }
.slot .s-intent .nm em { font-style: normal; font-size: 13px; color: #fff; background: var(--vermilion); border-radius: 3px; padding: 1px 4px; margin-right: 4px; vertical-align: 1px; }
.slot.deshi .s-intent { box-shadow: inset 0 0 0 2px #ff6b5a, 0 0 14px rgba(255,80,60,.5); }
.slot .s-intent .ic { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; font-family: var(--font-brush); font-size: 16px; border-radius: 4px; background: var(--cinnabar); color: #fff; }
.slot .s-intent .ic.def { background: #3a5680; } .slot .s-intent .ic.buf { background: #7a4a9a; } .slot .s-intent .ic.oth { background: #6b5a3c; }
.slot .s-intent .skip { color: #9fd3ff; font-family: var(--font-brush); }
.slot .s-intent.skipped { opacity: .55; text-decoration: line-through; }
.slot .s-omen { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.slot.omen .s-disk { background: radial-gradient(circle, rgba(180,30,30,.35), rgba(40,8,8,.8)); box-shadow: 0 0 0 2px #e0453a, 0 0 22px rgba(224,69,58,.6); animation: omenPulse 1.3s ease-in-out infinite; }
.slot.omen .s-branch { opacity: .25; }
.slot .s-omen .seal { width: 36px; height: 36px; font-size: 26px; position: absolute; top: -6px; right: -6px; transform: rotate(8deg); }
.slot .s-omen .ghost { width: 64px; height: 64px; opacity: .55; animation: ghostBob 1.6s ease-in-out infinite; }
@keyframes omenPulse { 50% { box-shadow: 0 0 0 3px #ff7a5a, 0 0 34px rgba(255,80,60,.7); } }
@keyframes ghostBob { 50% { transform: translateY(-4px) scale(1.05); opacity: .75; } }
.slot .hz { position: absolute; inset: -3px; border-radius: 50%; pointer-events: none; z-index: 5; display: flex; align-items: flex-start; justify-content: center; }
.slot .hz span { font-family: var(--font-brush); font-size: 18px; margin-top: -12px; padding: 0 6px; border-radius: 3px; }
.slot .hz-ice { background: radial-gradient(circle, rgba(200,230,255,.25), rgba(140,190,240,.45)); box-shadow: inset 0 0 0 3px rgba(210,235,255,.85), 0 0 16px rgba(170,210,255,.6);
  backdrop-filter: blur(1px); }
.slot .hz-ice::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: repeating-conic-gradient(rgba(255,255,255,.28) 0 6deg, transparent 6deg 30deg); }
.slot .hz-ice span { background: #cfe6ff; color: #1b3a60; }
.slot .hz-flood { overflow: hidden; background: linear-gradient(180deg, transparent 38%, rgba(40,90,150,.55) 40%, rgba(20,50,100,.8)); box-shadow: inset 0 0 0 3px rgba(90,150,220,.8); }
.slot .hz-flood::after { content: ''; position: absolute; left: -50%; right: -50%; top: 34%; height: 14px; background: repeating-radial-gradient(circle at 10px -4px, transparent 0 8px, rgba(170,210,255,.7) 8px 10px, transparent 10px 20px); animation: wave 2s linear infinite; }
.slot .hz-flood span { background: #2d5a92; color: #e6f1ff; }
@keyframes wave { to { transform: translateX(20px); } }
.slot .hz-dark { background: radial-gradient(circle at 60% 40%, rgba(0,0,0,.72) 45%, rgba(0,0,0,.88)); box-shadow: inset 0 0 0 2px #444; }
.slot .hz-dark::after { content: ''; position: absolute; left: 22%; top: 18%; width: 44%; height: 44%; border-radius: 50%; box-shadow: -7px 5px 0 0 rgba(240,230,200,.55); }
.slot .hz-dark span { background: #111; color: #d8cfb5; box-shadow: 0 0 0 1px #666; }
.slot.targetable { cursor: pointer; }
.slot.targetable::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 2.5px dashed var(--gold-2); animation: tgtSpin 6s linear infinite, tgtPulse 1s ease-in-out infinite; pointer-events: none; }
.slot.targetable:hover { transform: scale(1.12); }
@keyframes tgtSpin { to { transform: rotate(360deg); } }
@keyframes tgtPulse { 50% { border-color: #fff4cf; filter: drop-shadow(0 0 6px var(--gold)); } }
.slot.preview .s-disk { background: radial-gradient(circle, rgba(255,245,220,.55), rgba(243,213,141,.2)); box-shadow: 0 0 0 2px var(--gold-2), 0 0 24px rgba(243,213,141,.6); }
.slot.preview .s-art { opacity: .7; }
.slot.pop { animation: pop .45s var(--ease); }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.slot.shake { animation: shake .32s ease; }
@keyframes shake { 20% { transform: translate(-5px, 2px); } 40% { transform: translate(5px,-2px); } 60% { transform: translate(-3px,1px); } 80% { transform: translate(2px,0); } }
.slot.drop { animation: drop .5s cubic-bezier(.3,1.5,.6,1); }
@keyframes drop { 0% { transform: translateY(-60px) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.slot.dying .s-art, .slot.dying .s-disk { animation: dissolve .5s ease forwards; }
@keyframes dissolve { to { opacity: 0; transform: scale(1.3); filter: blur(6px); } }
.slot.act .s-disk { animation: act .4s ease; }
@keyframes act { 40% { transform: scale(1.14); box-shadow: 0 0 0 3px #ff8a70, 0 0 30px rgba(255,90,60,.8); } }

.pat-label { position: absolute; transform: translate(-50%,-50%); font-family: var(--font-brush); font-size: 20px; padding: 2px 10px; border-radius: 4px; pointer-events: none; white-space: nowrap; z-index: 15;
  background: rgba(20,12,9,.85); color: var(--gold-2); box-shadow: inset 0 0 0 1px var(--gold-3); animation: scrIn .3s ease both; }

/* side panels */
.bp-left { position: absolute; left: 36px; top: 84px; width: 380px; }
.bp-right { position: absolute; right: 36px; top: 84px; width: 380px; }
.panel { position: relative; padding: 16px 18px; border-radius: 10px; background: linear-gradient(180deg, rgba(30,14,12,.86), rgba(18,11,9,.86));
  box-shadow: inset 0 0 0 1px rgba(212,168,83,.45), inset 0 0 0 4px rgba(18,11,9,.9), inset 0 0 0 5px rgba(212,168,83,.2), 0 10px 26px rgba(0,0,0,.45); }
.panel + .panel { margin-top: 14px; }
.panel h4 { margin: 0 0 10px; font-family: var(--font-brush); font-weight: 400; font-size: 22px; color: var(--gold-2); letter-spacing: .1em; display: flex; align-items: center; gap: 8px; }
.panel h4 small { font-family: var(--font-serif); font-size: 12px; color: var(--muted); letter-spacing: 0; }
.cat-row { display: flex; gap: 16px; align-items: center; }
.cat-row .avatar { width: 84px; height: 84px; border-radius: 50%; flex: none; padding: 8px; background: radial-gradient(circle at 40% 35%, #fff1c9, #e3bd6c 55%, #9a6d25); box-shadow: 0 0 0 2px #6d4b16, 0 4px 10px rgba(0,0,0,.5); }
.cat-row .avatar .pc { width: 100%; height: 100%; }
.cat-row .who { flex: 1; }
.cat-row .who .nm { font-family: var(--font-brush); font-size: 26px; color: var(--txt-light); }
.cat-row .who .sub { font-size: 12px; color: var(--muted); }
.hpbar { position: relative; height: 22px; margin-top: 8px; border-radius: 11px; background: #1a0d0b; box-shadow: inset 0 0 0 1.5px #5d231e, 0 1px 0 rgba(255,255,255,.05); overflow: hidden; }
.hpbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #ff6d5c, #b3261f 60%, #7d1715); transition: width .35s var(--ease); }
.hpbar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.lanterns { display: flex; align-items: flex-end; gap: 8px; margin-top: 4px; }
.lantern { position: relative; width: 36px; height: 48px; }
.lantern .body { position: absolute; left: 3px; right: 3px; top: 8px; bottom: 6px; border-radius: 45%; background: #3a1614; box-shadow: inset 0 0 0 1.5px #5b2a24; transition: background .3s, box-shadow .3s; }
.lantern::before, .lantern::after { content: ''; position: absolute; left: 12px; right: 12px; height: 6px; background: #6d5125; border-radius: 2px; }
.lantern::before { top: 4px; } .lantern::after { bottom: 3px; }
.lantern .tassel { position: absolute; left: 50%; bottom: -8px; width: 2px; height: 10px; margin-left: -1px; background: #b5262a; }
.lantern.on .body { background: radial-gradient(circle at 50% 40%, #ffd16e, #e4452f 45%, #9b1d1a); box-shadow: 0 0 16px rgba(255,120,60,.8), inset 0 0 0 1.5px #ffcf7a; }
.lantern.extra.on .body { background: radial-gradient(circle at 50% 40%, #fff3b0, #f0b429 50%, #b3771c); }
.energy-num { margin-left: 10px; font-family: var(--font-brush); font-size: 34px; color: var(--gold-2); line-height: 1; }
.energy-num small { font-size: 20px; color: var(--muted); }
.powers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.powers span { font-size: 13px; padding: 2px 9px; border-radius: 10px; background: rgba(212,168,83,.12); box-shadow: inset 0 0 0 1px var(--gold-3); color: var(--gold-2); }
.piles { display: flex; gap: 10px; margin-top: 10px; }
.pile { flex: 1; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px rgba(212,168,83,.25); cursor: pointer; font-size: 13px; color: var(--muted); }
.pile:hover { background: rgba(212,168,83,.1); }
.pile b { font-size: 20px; color: var(--txt-light); font-family: var(--font-serif); }
.clock-info { display: flex; gap: 16px; align-items: center; }
.clock-info .big { width: 86px; height: 86px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-brush); font-size: 58px; color: var(--gold-2);
  background: radial-gradient(circle at 40% 35%, #5a1d1a, #26100e); box-shadow: 0 0 0 2px var(--gold-3), inset 0 0 18px rgba(0,0,0,.6); }
.clock-info .lines { font-size: 14px; line-height: 1.7; color: var(--txt-light); }
.clock-info .lines .h { font-family: var(--font-brush); font-size: 24px; color: var(--gold-2); }
.clock-info .lines em { font-style: normal; color: var(--gold-2); }
.clock-info .lines .bad { color: #ff9c8c; }
.pats { display: flex; flex-direction: column; gap: 7px; max-height: 262px; overflow-y: auto; padding-right: 4px; }
.pats::-webkit-scrollbar { width: 6px; } .pats::-webkit-scrollbar-thumb { background: var(--gold-3); border-radius: 3px; }
.pat { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 1px rgba(212,168,83,.2); font-size: 13px; color: var(--txt-light); animation: scrIn .4s ease both; }
.pat .pi { width: 34px; height: 34px; flex: none; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: var(--font-brush); font-size: 21px; color: #fff; }
.pat .pt-nm { font-family: var(--font-brush); font-size: 18px; color: var(--gold-2); }
.pat .pt-d { font-size: 12px; color: var(--muted); line-height: 1.35; }
.pats .none { font-size: 13px; color: var(--muted); line-height: 1.6; }
.omen-list { font-size: 13px; line-height: 1.8; color: #ffc4b6; }
.omen-list .none { color: var(--muted); }
.race-timer { position: absolute; left: 50%; top: 66px; transform: translateX(-50%); z-index: 20; padding: 6px 18px; font-family: var(--font-brush); font-size: 22px; color: #3a220c;
  background: linear-gradient(180deg, #f6dc98, #d4a853); border-radius: 18px; box-shadow: 0 0 0 2px #7c5a1f, 0 4px 12px rgba(0,0,0,.5); }
.race-timer.lost { background: linear-gradient(180deg, #8a7f73, #5d544b); color: #eee; }
.end-turn { position: absolute; right: 64px; bottom: 196px; width: 128px; height: 128px; border-radius: 50%; border: 0; cursor: pointer; z-index: 25;
  background: radial-gradient(circle at 40% 32%, #e0544a, #a8211f 55%, #6d1415); color: #fff4df; font-family: var(--font-brush);
  box-shadow: 0 0 0 4px var(--gold-3), 0 0 0 8px rgba(243,213,141,.25), 0 10px 26px rgba(0,0,0,.55), inset 0 -8px 18px rgba(0,0,0,.35); transition: transform .18s var(--ease), filter .2s; }
.end-turn .t1 { display: block; font-size: 36px; line-height: 1; letter-spacing: .05em; }
.end-turn .t2 { display: block; font-family: var(--font-serif); font-size: 13px; margin-top: 6px; opacity: .85; }
.end-turn:hover { transform: scale(1.06) rotate(-3deg); filter: brightness(1.12); }
.end-turn.ready { animation: ready 1.6s ease-in-out infinite; }
@keyframes ready { 50% { box-shadow: 0 0 0 4px var(--gold-2), 0 0 0 12px rgba(243,213,141,.2), 0 0 36px rgba(255,120,80,.6), inset 0 -8px 18px rgba(0,0,0,.35); } }
.end-turn[disabled] { filter: grayscale(.8) brightness(.6); cursor: default; transform: none; animation: none; }
.pending-bar { position: absolute; right: 36px; top: 84px; width: 380px; z-index: 30; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 14px 18px; border-radius: 10px;
  background: rgba(20,12,9,.92); box-shadow: inset 0 0 0 1.5px var(--gold-3), 0 8px 20px rgba(0,0,0,.5); font-size: 16px; }

/* hand */
.hand { position: absolute; left: 180px; right: 180px; bottom: 0; height: 200px; z-index: 22; pointer-events: none; }
.hand .card { position: absolute; bottom: -20px; pointer-events: auto; transform-origin: 50% 100%; transform: translateY(var(--ty, 0px)) rotate(var(--rot, 0deg)) scale(.84); }
.hand .card:hover { transform: translateY(-112px) rotate(0deg) scale(1.06); }
.hand .card.selected { transform: translateY(-96px) rotate(0deg) scale(1.02) !important; }
.hand .card.nope { animation: nope .35s ease; }
@keyframes nope { 25% { margin-left: -8px; } 50% { margin-left: 8px; } 75% { margin-left: -4px; } }
.fxl { fill: none; stroke-linecap: round; animation: fxl .55s ease-out forwards; }
@keyframes fxl { 0% { opacity: 1; } 55% { opacity: 1; stroke-dashoffset: 0; } 100% { opacity: 0; stroke-dashoffset: 0; } }
.fxtri { animation: fxtri 1.1s ease-out forwards; }
@keyframes fxtri { 0% { opacity: 0; } 20% { opacity: .9; } 100% { opacity: 0; } }
.fw { position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; pointer-events: none; animation: fw 1s ease-out forwards; }
@keyframes fw { from { transform: translate(0,0) scale(1); opacity: 1; } to { transform: translate(var(--fx), var(--fy)) scale(.3); opacity: 0; } }
.hand .card:hover { z-index: 50 !important; }
.hand .card.fly { transition: transform .35s var(--ease), opacity .35s; opacity: 0; }
.deck-pile { position: absolute; bottom: 22px; width: 96px; height: 120px; z-index: 21; cursor: pointer; }
.deck-pile .stack { position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(160deg, #7d1d1b, #4e1011); box-shadow: inset 0 0 0 2px var(--gold-3), 3px 3px 0 #2a0c0b, 6px 6px 0 #1c0908, 0 10px 20px rgba(0,0,0,.5); }
.deck-pile .stack::after { content: ''; position: absolute; inset: 14px; border: 1px solid rgba(243,213,141,.35); border-radius: 4px; background: radial-gradient(circle, rgba(243,213,141,.18) 20%, transparent 21%) 0 0/16px 16px; }
.deck-pile .cnt { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); min-width: 38px; height: 30px; padding: 0 8px; display: flex; align-items: center; justify-content: center; border-radius: 15px; background: var(--ink); color: var(--gold-2); font-weight: 700; box-shadow: 0 0 0 1.5px var(--gold-3); }
.deck-pile .lbl { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-family: var(--font-brush); font-size: 22px; color: var(--gold-2); z-index: 2; }
.deck-pile.draw { left: 40px; } .deck-pile.discard { right: 40px; }
.deck-pile.discard .stack { background: linear-gradient(160deg, #3a2f28, #211a16); }

/* floating text & banners */
#fx { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.fl { position: absolute; transform: translate(-50%,-50%); font-family: var(--font-brush); font-size: 34px; white-space: nowrap; pointer-events: none;
  animation: floatUp 1.1s var(--ease) forwards; text-shadow: 0 2px 0 rgba(0,0,0,.7), 0 0 10px rgba(0,0,0,.5); }
.fl.dmg { color: #fff; -webkit-text-stroke: 1px #6d0f0c; font-size: 40px; }
.fl.dmg.big { font-size: 56px; color: #ffe07a; }
.fl.dmg .ke { font-size: 18px; margin-left: 4px; padding: 0 5px; border-radius: 3px; background: var(--cinnabar); -webkit-text-stroke: 0; vertical-align: middle; }
.fl.hurt { color: #ff6b5a; }
.fl.heal { color: #8ff0b0; } .fl.block { color: #b8d4ff; } .fl.gold { color: var(--gold-2); font-size: 26px; } .fl.red { color: #ff9d8c; font-size: 24px; }
.fl.charge { color: #ffe39a; font-size: 24px; } .fl.small { font-size: 22px; } .fl.ice { color: #cfe8ff; font-size: 24px; } .fl.stun { color: #e0c7ff; font-size: 24px; }
.fl.poison { color: #b6f07a; font-size: 22px; } .fl.water { color: #9fd0ff; font-size: 24px; } .fl.wood { color: #9fe0b0; } .fl.autumn { color: #f3cf6e; font-size: 24px; } .fl.rat { color: #e8dcc0; font-size: 26px; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%,-30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%,-60%) scale(1.15); } 30% { transform: translate(-50%,-70%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-160%); } }
.splash { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; pointer-events: none; animation: splash .5s ease-out forwards; }
@keyframes splash { from { transform: scale(.3) rotate(0); opacity: 1; } to { transform: scale(1.4) rotate(40deg); opacity: 0; } }
#banner { position: absolute; inset: 0; z-index: 70; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.bn { position: relative; text-align: center; animation: bnIn 1.3s var(--ease) forwards; }
.bn .t { font-family: var(--font-brush); font-size: 132px; line-height: 1; letter-spacing: .08em; color: var(--gold-2); text-shadow: 0 4px 0 #5a1414, 0 0 40px rgba(243,213,141,.45); }
.bn .s { margin-top: 12px; font-size: 22px; letter-spacing: .3em; color: var(--txt-light); text-shadow: 0 2px 6px #000; }
.bn.small .t { font-size: 64px; } .bn.small .s { font-size: 17px; }
.bn::before { content: ''; position: absolute; left: 50%; top: 50%; width: 900px; height: 190px; transform: translate(-50%,-50%); z-index: -1;
  background: radial-gradient(ellipse, rgba(12,6,5,.82) 0%, rgba(12,6,5,.55) 45%, transparent 72%); }
.bn.fire .t { color: #ffb08a; } .bn.water .t { color: #a7d3ff; } .bn.wood .t { color: #a6e6b8; } .bn.metal .t { color: #eef3f6; }
@keyframes bnIn { 0% { opacity: 0; transform: scale(1.5); filter: blur(10px); } 18% { opacity: 1; transform: scale(1); filter: none; } 78% { opacity: 1; } 100% { opacity: 0; transform: scale(.96); } }
.flash { position: absolute; inset: 0; z-index: 65; pointer-events: none; animation: flash .6s ease-out forwards; }
@keyframes flash { from { opacity: .7; } to { opacity: 0; } }
#stage.quake { animation: quake .4s ease; }
@keyframes quake { 20% { margin-left: -6px; } 40% { margin-left: 6px; } 60% { margin-left: -4px; } 80% { margin-left: 3px; } }

/* tooltip */
#tooltip { position: absolute; z-index: 95; max-width: 320px; padding: 12px 14px; border-radius: 8px; pointer-events: none; opacity: 0; transition: opacity .15s;
  background: linear-gradient(180deg, #fbf1dc, #ecdcb8); color: var(--txt); box-shadow: inset 0 0 0 1.5px #b89458, inset 0 0 0 4px #fbf1dc, inset 0 0 0 5px rgba(181,38,42,.5), 0 10px 28px rgba(0,0,0,.6); font-size: 14px; line-height: 1.55; }
#tooltip.show { opacity: 1; }
#tooltip .tt-t { font-family: var(--font-brush); font-size: 22px; color: #7a1c18; margin-bottom: 4px; }
#tooltip .tt-s { font-size: 12px; color: #8a6a44; margin-bottom: 6px; }
#tooltip b { color: #9b1d1a; }
#tooltip hr { border: 0; border-top: 1px dashed rgba(120,80,40,.4); margin: 8px 0; }

/* hints */
#hint { position: absolute; z-index: 88; left: 50%; top: 70px; transform: translateX(-50%); pointer-events: none; }
#hint.in-battle { left: 36px; top: 506px; transform: none; width: 380px; }
#hint.in-battle .hint-box { flex-wrap: wrap; font-size: 15px; padding: 14px 16px; gap: 10px 14px; }
#hint.in-battle .hint-box > div { flex: 1; min-width: 0; }
#hint.in-battle .hint-box .btn { margin-left: auto; }
.hint-box { pointer-events: auto; display: flex; gap: 16px; align-items: center; max-width: 780px; padding: 14px 18px 14px 14px; border-radius: 10px; animation: scrIn .35s ease both;
  background: linear-gradient(180deg, #fbf1dc, #ecdcb8); color: var(--txt); box-shadow: inset 0 0 0 1.5px #b89458, 0 12px 30px rgba(0,0,0,.6); font-size: 16px; line-height: 1.6; }
.hint-box .seal { width: 46px; height: 46px; font-size: 30px; flex: none; }
.hint-box b { color: #9b1d1a; }
.hint-box .btn { height: 38px; min-width: 90px; font-size: 18px; flex: none; white-space: nowrap; }

/* overlay / modals */
#overlay { position: absolute; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; background: rgba(8,5,4,.72); backdrop-filter: blur(3px); }
#overlay.show { display: flex; animation: scrIn .3s ease both; }
.modal { position: relative; max-width: 1300px; max-height: 820px; padding: 28px 34px 30px; border-radius: 12px;
  background: linear-gradient(180deg, #2a1310, #180d0b); box-shadow: inset 0 0 0 1.5px var(--gold-3), inset 0 0 0 6px #180d0b, inset 0 0 0 7px rgba(212,168,83,.35), 0 30px 80px rgba(0,0,0,.7); display: flex; flex-direction: column; }
.modal-title { font-family: var(--font-brush); font-size: 40px; color: var(--gold-2); text-align: center; margin-bottom: 4px; letter-spacing: .12em; }
.modal-sub { text-align: center; color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.modal-body { overflow-y: auto; overflow-x: hidden; padding: 12px 8px; }
.modal-body::-webkit-scrollbar { width: 10px; } .modal-body::-webkit-scrollbar-thumb { background: var(--gold-3); border-radius: 5px; }
.modal-foot { display: flex; justify-content: center; gap: 18px; margin-top: 18px; }
.modal-close { position: absolute; right: 14px; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; font-family: var(--font-brush); font-size: 24px; color: var(--gold-2); background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1px var(--gold-3); }
.card-grid { display: flex; flex-wrap: wrap; gap: 22px 18px; justify-content: center; }
.card-grid .card:hover { transform: translateY(-6px) scale(1.04); }

/* ═══════════ TITLE ═══════════ */
.title-scr .t-wheel { position: absolute; right: 60px; top: 60px; width: 800px; height: 800px; opacity: .9; }
.title-scr .t-wheel .spinner { position: absolute; inset: 0; animation: spin 120s linear infinite; }
.title-scr .t-wheel svg { width: 100%; height: 100%; }
@keyframes spin { to { transform: rotate(360deg); } }
.title-scr .t-cat { position: absolute; right: 385px; top: 385px; width: 120px; height: 120px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
.title-scr .t-main { position: absolute; left: 150px; top: 90px; display: flex; gap: 36px; align-items: flex-start; }
.title-scr .t-big { font-family: var(--font-brush); font-size: 230px; line-height: .95; color: var(--gold-2); writing-mode: vertical-rl;
  text-shadow: 0 6px 0 #4e1011, 0 0 60px rgba(243,213,141,.25); letter-spacing: .02em; animation: inkIn 1.8s var(--ease) both; }
.title-scr .t-side { display: flex; flex-direction: column; gap: 18px; padding-top: 30px; animation: inkIn 1.8s .4s var(--ease) both; }
.title-scr .t-sub { font-family: var(--font-brush); font-size: 46px; color: var(--txt-light); writing-mode: vertical-rl; letter-spacing: .25em; }
.title-scr .t-en { font-size: 14px; letter-spacing: .5em; color: var(--muted); writing-mode: vertical-rl; }
.title-scr .t-seal { width: 64px; height: 64px; font-size: 22px; line-height: 1.05; padding: 6px; text-align: center; flex-wrap: wrap; }
@keyframes inkIn { from { opacity: 0; filter: blur(14px); transform: translateY(20px); } to { opacity: 1; filter: none; transform: none; } }
.title-scr .t-menu { position: absolute; left: 150px; bottom: 90px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; animation: inkIn 1.4s .9s var(--ease) both; }
.title-scr .t-menu .row { display: flex; gap: 14px; }
.title-scr .t-foot { position: absolute; right: 26px; bottom: 16px; font-size: 12px; color: rgba(168,151,123,.7); }
.title-scr .t-foot a { color: inherit; cursor: pointer; text-decoration: underline; }
.hang { position: absolute; top: -10px; width: 64px; animation: sway 4s ease-in-out infinite; transform-origin: 50% 0; filter: drop-shadow(0 8px 12px rgba(0,0,0,.5)); }
.hang .rope { width: 2px; height: 80px; margin: 0 auto; background: #6d5125; }
.hang .lamp { position: relative; width: 64px; height: 78px; border-radius: 45%; background: radial-gradient(circle at 50% 40%, #ffd16e, #e4452f 45%, #9b1d1a); box-shadow: 0 0 40px rgba(255,120,60,.55); }
.hang .lamp::before, .hang .lamp::after { content: ''; position: absolute; left: 18px; right: 18px; height: 9px; background: #7c5a1f; border-radius: 2px; }
.hang .lamp::before { top: -4px; } .hang .lamp::after { bottom: -4px; }
.hang .lamp span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-brush); font-size: 30px; color: #5a120f; }
.hang .tail { width: 4px; height: 26px; margin: 2px auto 0; background: linear-gradient(#e4452f, transparent); }
@keyframes sway { 50% { transform: rotate(4deg); } }
.roofline { position: absolute; left: 0; right: 0; bottom: 0; height: 170px; }

/* ═══════════ STORY ═══════════ */
.story-scr { cursor: pointer; }
.story-scr .st-art { position: absolute; left: 50%; top: 110px; width: 380px; height: 380px; margin-left: -190px; }
.window-flower { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #fff4dc 0%, var(--paper) 55%, var(--paper-2) 100%);
  box-shadow: 0 0 0 10px var(--cinnabar), 0 0 0 14px var(--gold-3), 0 0 0 16px rgba(243,213,141,.4), 0 26px 60px rgba(0,0,0,.6); overflow: hidden; animation: zoomSlow 9s ease-out both; }
.window-flower::before { content: ''; position: absolute; inset: 0; background-image: var(--fiber); opacity: .6; mix-blend-mode: multiply; }
.window-flower .pc { position: absolute; left: 50%; top: 50%; width: 62%; height: 62%; transform: translate(-50%,-50%); }
.window-flower .ring { position: absolute; inset: 14px; border-radius: 50%; border: 2px dashed rgba(181,38,42,.35); }
@keyframes zoomSlow { from { transform: scale(.94); } to { transform: scale(1.02); } }
.story-scr.shake .st-art { animation: quake .5s ease 2; }
.story-scr .st-text { position: absolute; left: 0; right: 0; top: 540px; text-align: center; }
.story-scr .st-text .line { font-family: var(--font-kai); font-size: 34px; line-height: 1.8; color: var(--txt-light); text-shadow: 0 2px 8px #000; opacity: 0; animation: lineIn 1s var(--ease) forwards; }
@keyframes lineIn { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.story-scr .st-next { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); font-size: 15px; letter-spacing: .3em; color: var(--muted); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.story-scr .st-skip { position: absolute; right: 30px; top: 24px; }
.shatter { position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; margin: -300px 0 0 -260px; }
.shatter .shard { position: absolute; inset: 0; animation: shardFly 1.6s cubic-bezier(.3,.1,.3,1) forwards; }
@keyframes shardFly { to { transform: translate(var(--sx), var(--sy)) rotate(var(--sr)); opacity: 0; } }

/* ═══════════ CHAPTER INTRO ═══════════ */
.ci-scr { cursor: pointer; }
.ci-scr .ci-big { position: absolute; left: 180px; top: 120px; font-family: var(--font-brush); font-size: 420px; line-height: 1; color: rgba(243,213,141,.9); text-shadow: 0 10px 0 rgba(0,0,0,.35), 0 0 80px rgba(243,213,141,.2); animation: inkIn 2s var(--ease) both; }
.ci-scr .ci-title { position: absolute; left: 190px; top: 610px; font-family: var(--font-brush); font-size: 46px; color: var(--txt-light); animation: inkIn 1.6s .5s var(--ease) both; }
.ci-scr .ci-title small { display: block; font-family: var(--font-serif); font-size: 18px; letter-spacing: .5em; color: var(--muted); margin-top: 8px; }
.ci-scr .ci-lines { position: absolute; right: 430px; top: 150px; height: 600px; display: flex; flex-direction: row-reverse; gap: 34px; }
.ci-scr .ci-lines .line { writing-mode: vertical-rl; font-family: var(--font-kai); font-size: 36px; letter-spacing: .18em; color: var(--txt-light); opacity: 0; animation: lineIn 1.2s var(--ease) forwards; text-shadow: 0 2px 8px #000; }

/* ═══════════ BENMING SELECT ═══════════ */
.bm-scr .bm-title { position: absolute; left: 0; right: 0; top: 34px; text-align: center; font-family: var(--font-brush); font-size: 56px; color: var(--gold-2); letter-spacing: .15em; }
.bm-scr .bm-sub { position: absolute; left: 0; right: 0; top: 108px; text-align: center; font-size: 17px; color: var(--muted); }
.bm-scr .bm-wheel { position: absolute; left: 190px; top: 150px; width: 700px; height: 700px; }
.bm-scr .bm-wheel > svg { position: absolute; inset: 0; }
.bm-slot { position: absolute; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; cursor: pointer; transition: transform .2s var(--ease);
  background: radial-gradient(circle at 42% 36%, #fff8e6, var(--paper) 55%, var(--paper-3)); box-shadow: 0 0 0 3px var(--gold-3), 0 8px 18px rgba(0,0,0,.55); }
.bm-slot .pc { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%,-55%); }
.bm-slot .lbl { position: absolute; left: 0; right: 0; bottom: -30px; text-align: center; font-family: var(--font-brush); font-size: 22px; color: var(--gold-2); }
.bm-slot:hover, .bm-slot.sel { transform: scale(1.14); box-shadow: 0 0 0 3px var(--gold-2), 0 0 0 7px rgba(243,213,141,.45), 0 0 32px rgba(255,210,110,.55); }
.bm-slot.locked { filter: grayscale(1) brightness(.55); cursor: not-allowed; }
.bm-slot.locked:hover { transform: none; }
.bm-center { position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 40% 35%, #fff1c9, #e7c475 45%, #a87a2c 100%); box-shadow: 0 0 0 4px #6d4b16, 0 12px 26px rgba(0,0,0,.6); }
.bm-center .pc { width: 110px; height: 110px; }
.bm-info { position: absolute; right: 90px; top: 170px; width: 560px; min-height: 560px; padding: 30px 34px; border-radius: 12px; background: linear-gradient(180deg, #fbf1dc, #ead8b2); color: var(--txt);
  box-shadow: inset 0 0 0 1.5px #b89458, inset 0 0 0 6px #fbf1dc, inset 0 0 0 7px rgba(181,38,42,.55), 0 24px 60px rgba(0,0,0,.6); }
.bm-info::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background-image: var(--fiber); opacity: .5; mix-blend-mode: multiply; pointer-events: none; }
.bm-info .nm { font-family: var(--font-brush); font-size: 64px; color: #7a1c18; line-height: 1; }
.bm-info .nm small { font-size: 26px; color: #8a6a44; margin-left: 12px; }
.bm-info .role { margin-top: 10px; font-size: 15px; color: #8a6a44; letter-spacing: .2em; }
.bm-info .sig { margin-top: 22px; font-size: 18px; line-height: 1.7; }
.bm-info .sig b { font-family: var(--font-brush); font-weight: 400; font-size: 24px; color: #9b1d1a; margin-right: 6px; }
.bm-info .leg { margin-top: 18px; font-family: var(--font-kai); font-size: 18px; color: #5a4632; line-height: 1.7; }
.bm-info .rel { margin-top: 18px; font-size: 14px; color: #5a4632; line-height: 1.8; }
.bm-info .go { position: absolute; left: 34px; bottom: 30px; }
.bm-info .bm-card { position: absolute; right: 30px; bottom: 26px; transform: scale(.86); transform-origin: 100% 100%; }
.bm-info .rel { padding-right: 0; }
.bm-info .placeholder { font-family: var(--font-kai); font-size: 22px; color: #8a6a44; line-height: 1.8; margin-top: 120px; text-align: center; }

/* ═══════════ MAP ═══════════ */
.map-scr .map-head { position: absolute; left: 0; right: 0; top: 70px; text-align: center; pointer-events: none; }
.map-scr .map-head .t { font-family: var(--font-brush); font-size: 44px; color: var(--gold-2); letter-spacing: .12em; text-shadow: 0 3px 0 #3a0e0c; }
.map-scr .map-head .s { font-size: 15px; color: var(--muted); margin-top: 2px; }
.map-scr svg.river { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-node { position: absolute; width: 78px; height: 70px; margin: -35px 0 0 -39px; cursor: default; z-index: 3; transition: transform .2s var(--ease); }
.map-node .stone { position: absolute; inset: 0; border-radius: 48% 52% 44% 56% / 54% 44% 56% 46%;
  background: radial-gradient(ellipse at 38% 30%, #8d8a86, #56504a 55%, #2e2a26); box-shadow: inset 0 -6px 10px rgba(0,0,0,.45), inset 0 3px 4px rgba(255,255,255,.15), 0 10px 14px rgba(0,0,0,.55); }
.map-node .ico { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-55%); width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; }
.map-node .ico .seal { width: 44px; height: 44px; font-size: 30px; }
.map-node .ico .pc { width: 44px; height: 44px; }
.map-node .nm { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 6px; font-size: 13px; color: var(--txt-light); white-space: nowrap; text-shadow: 0 1px 3px #000; opacity: .85; }
.map-node.reachable { cursor: pointer; }
.map-node.reachable .stone { box-shadow: 0 0 0 3px var(--gold-2), 0 0 26px rgba(243,213,141,.6), inset 0 -6px 10px rgba(0,0,0,.45), 0 10px 14px rgba(0,0,0,.55); animation: stonePulse 1.4s ease-in-out infinite; }
.map-node.reachable:hover { transform: scale(1.14); }
@keyframes stonePulse { 50% { box-shadow: 0 0 0 4px #fff2c8, 0 0 38px rgba(243,213,141,.8), inset 0 -6px 10px rgba(0,0,0,.45), 0 10px 14px rgba(0,0,0,.55); } }
.map-node.visited .stone { filter: brightness(.55); }
.map-node.visited .ico { opacity: .45; }
.map-node.locked { opacity: .55; }
.map-node.current .stone { box-shadow: 0 0 0 3px var(--cinnabar), 0 0 20px rgba(216,67,58,.6), inset 0 -6px 10px rgba(0,0,0,.45); filter: none; }
.map-node.current .ico { opacity: 1; }
.map-node.boss { width: 132px; height: 116px; margin: -58px 0 0 -66px; }
.map-node.boss .ico { width: 90px; height: 90px; } .map-node.boss .ico .pc { width: 84px; height: 84px; }
.map-node .you { position: absolute; left: 50%; top: -34px; width: 46px; height: 46px; margin-left: -23px; animation: ghostBob 1.8s ease-in-out infinite; z-index: 4; }
.map-scr .jq { position: absolute; left: 70px; width: 170px; display: flex; align-items: center; gap: 12px; transform: translateY(-50%); cursor: help; }
.map-scr .jq .nm { writing-mode: vertical-rl; font-family: var(--font-brush); font-size: 26px; color: var(--gold-2); letter-spacing: .1em; }
.map-scr .jq .d { font-size: 12px; line-height: 1.5; color: var(--muted); }
.map-scr .jq.active .nm { color: #fff0c4; text-shadow: 0 0 12px rgba(243,213,141,.6); }
.map-scr .legend { position: absolute; right: 44px; bottom: 40px; width: 230px; padding: 16px; border-radius: 10px; background: rgba(18,11,9,.8); box-shadow: inset 0 0 0 1px var(--gold-3); font-size: 13px; line-height: 2; color: var(--txt-light); }
.map-scr .legend .seal { width: 22px; height: 22px; font-size: 15px; margin-right: 8px; vertical-align: -5px; }

/* node type colours */
.seal.t-battle { background: #2c2522; } .seal.t-elite { background: #9b1d1a; } .seal.t-event { background: #6f5a2c; }
.seal.t-shop { background: #2f6a55; } .seal.t-rest { background: #8a4f20; } .seal.t-meet { background: #b8862b; } .seal.t-race { background: #56506a; } .seal.t-boss { background: #b5262a; }

/* ═══════════ PAPER PANELS (reward / event / shop / rest) ═══════════ */
.paper-panel { position: absolute; border-radius: 12px; color: var(--txt); background: linear-gradient(180deg, #fbf1dc, #ead8b2);
  box-shadow: inset 0 0 0 1.5px #b89458, inset 0 0 0 7px #fbf1dc, inset 0 0 0 8.5px rgba(181,38,42,.55), 0 28px 70px rgba(0,0,0,.65); }
.paper-panel::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background-image: var(--fiber); opacity: .55; mix-blend-mode: multiply; pointer-events: none; }
.scr-title { position: absolute; left: 0; right: 0; top: 78px; text-align: center; font-family: var(--font-brush); font-size: 60px; color: var(--gold-2); letter-spacing: .15em; text-shadow: 0 4px 0 #3a0e0c; }
.scr-sub { position: absolute; left: 0; right: 0; top: 152px; text-align: center; font-size: 16px; color: var(--muted); }

.rw-scr .rw-seal { position: absolute; left: 50%; top: 88px; width: 110px; height: 110px; margin-left: -55px; font-size: 76px; border-radius: 10px; transform: rotate(-6deg); animation: stamp .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes stamp { from { transform: scale(2.2) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(-6deg); opacity: 1; } }
.rw-scr .rw-loot { position: absolute; left: 50%; top: 222px; transform: translateX(-50%); display: flex; gap: 16px; }
.loot { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 10px; border-radius: 24px; background: rgba(18,11,9,.8); box-shadow: inset 0 0 0 1px var(--gold-3); font-size: 17px; color: var(--txt-light); animation: scrIn .5s ease both; }
.loot .ico { width: 34px; height: 34px; }
.rw-scr .rw-cards { position: absolute; left: 0; right: 0; top: 330px; display: flex; justify-content: center; gap: 44px; }
.rw-scr .rw-cards .card { transform: scale(1.18); }
.rw-scr .rw-cards .card:hover { transform: scale(1.26) translateY(-8px); }
.rw-scr .rw-foot { position: absolute; left: 0; right: 0; bottom: 70px; display: flex; justify-content: center; gap: 22px; }
.rw-scr .rw-notes { position: absolute; left: 0; right: 0; top: 282px; text-align: center; font-size: 15px; color: var(--gold-2); }

.ev-scr .ev-panel { left: 210px; top: 110px; width: 1180px; height: 700px; }
.ev-scr .ev-art { position: absolute; left: 60px; top: 60px; width: 380px; height: 380px; }
.ev-scr .ev-art .window-flower { animation: none; }
.ev-scr .ev-title { position: absolute; left: 500px; top: 56px; font-family: var(--font-brush); font-size: 72px; color: #7a1c18; letter-spacing: .1em; }
.ev-scr .ev-title small { display: block; font-family: var(--font-serif); font-size: 15px; color: #8a6a44; letter-spacing: .4em; margin-top: 4px; }
.ev-scr .ev-text { position: absolute; left: 500px; right: 60px; top: 190px; font-family: var(--font-kai); font-size: 23px; line-height: 1.85; color: #3a2a1d; }
.ev-scr .ev-choices { position: absolute; left: 500px; right: 60px; top: 380px; display: flex; flex-direction: column; gap: 14px; }
.ev-choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 20px; border-radius: 8px; cursor: pointer; text-align: left; border: 0;
  background: rgba(255,250,238,.7); box-shadow: inset 0 0 0 1.5px #c3a06a; transition: transform .15s var(--ease), background .15s, box-shadow .15s; color: var(--txt); }
.ev-choice:hover { transform: translateX(6px); background: #fffaf0; box-shadow: inset 0 0 0 2px var(--cinnabar), 0 4px 12px rgba(120,60,20,.2); }
.ev-choice .l { font-family: var(--font-brush); font-size: 26px; color: #7a1c18; }
.ev-choice .h { font-size: 14px; color: #6b5540; }
.ev-choice[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.ev-scr .ev-result { position: absolute; left: 500px; right: 60px; top: 390px; font-family: var(--font-kai); font-size: 24px; line-height: 1.8; color: #6d1a16; animation: lineIn .8s ease both; }
.ev-scr .ev-cont { position: absolute; left: 500px; bottom: 56px; }
.ev-scr .ev-cards { position: absolute; left: 500px; right: 40px; top: 360px; display: flex; gap: 26px; }

.shop-scr .shop-panel { left: 110px; top: 190px; width: 1380px; height: 640px; }
.shop-scr .shop-cards { position: absolute; left: 50px; top: 50px; right: 50px; display: flex; gap: 30px; justify-content: center; }
.shop-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; }
.shop-item .price { display: flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 16px; background: #3a1b12; color: var(--gold-2); font-size: 18px; box-shadow: inset 0 0 0 1px var(--gold-3); }
.shop-item .price .ico { width: 22px; height: 22px; }
.shop-item.poor .price { color: #b08f86; } .shop-item.poor .card, .shop-item.poor .shop-relic { filter: grayscale(.6) brightness(.85); }
.shop-item.sold { visibility: hidden; }
.shop-item:hover .card { transform: translateY(-8px); }
.shop-scr .shop-row2 { position: absolute; left: 50px; right: 50px; top: 380px; display: flex; gap: 40px; justify-content: center; align-items: flex-start; }
.shop-relic { width: 120px; height: 120px; border-radius: 50%; padding: 22px; background: radial-gradient(circle at 40% 35%, #5a1f1b, #2a0f0d); box-shadow: inset 0 0 0 2px var(--gold-3), 0 10px 20px rgba(0,0,0,.4); transition: transform .2s var(--ease); }
.shop-relic .pc { width: 100%; height: 100%; }
.shop-item:hover .shop-relic { transform: scale(1.08) rotate(-4deg); }
.shop-item .rname { font-family: var(--font-brush); font-size: 22px; color: #7a1c18; }
.shop-remove { width: 260px; text-align: center; padding: 18px; border-radius: 10px; background: rgba(255,250,238,.6); box-shadow: inset 0 0 0 1.5px #c3a06a; }
.shop-remove .t { font-family: var(--font-brush); font-size: 30px; color: #7a1c18; }
.shop-remove .d { font-size: 14px; color: #6b5540; margin: 6px 0 12px; }
.shop-scr .shop-keeper { position: absolute; right: 150px; top: 60px; font-family: var(--font-kai); font-size: 20px; color: var(--txt-light); max-width: 400px; text-align: right; }

.rest-scr .rest-opts { position: absolute; left: 0; right: 0; top: 250px; display: flex; justify-content: center; gap: 60px; }
.rest-opt { position: relative; width: 320px; height: 420px; border-radius: 14px; cursor: pointer; text-align: center; padding-top: 250px; transition: transform .2s var(--ease); }
.rest-opt:hover { transform: translateY(-10px); }
.rest-opt .art { position: absolute; left: 50%; top: 44px; width: 180px; height: 180px; margin-left: -90px; }
.rest-opt .t { font-family: var(--font-brush); font-size: 48px; color: #7a1c18; }
.rest-opt .d { font-size: 16px; color: #5a4632; margin-top: 8px; padding: 0 26px; line-height: 1.6; }
.rest-opt.disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* gallery & help */
.gal-grid { display: grid; grid-template-columns: 70px repeat(12, 78px); gap: 8px; }
.gal-grid .hd { font-family: var(--font-brush); font-size: 24px; color: var(--gold-2); text-align: center; align-self: center; }
.gal-cell { height: 78px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(212,168,83,.15); color: rgba(168,151,123,.35); font-family: var(--font-brush); font-size: 26px; }
.gal-cell.got { background: radial-gradient(circle at 40% 30%, #fff6e2, var(--paper-2)); color: var(--txt); box-shadow: inset 0 0 0 2px var(--gold-3); }
.gal-cell .p { font-size: 26px; line-height: 1; }
.gal-cell .a { font-size: 13px; font-family: var(--font-serif); margin-top: 4px; color: #8a6a44; }
.help-body { width: 1180px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 34px; color: var(--txt-light); }
.help-sec { display: flex; gap: 18px; align-items: flex-start; }
.help-sec .mini { width: 150px; height: 150px; flex: none; }
.help-sec h5 { margin: 0 0 6px; font-family: var(--font-brush); font-weight: 400; font-size: 26px; color: var(--gold-2); }
.help-sec p { margin: 0; font-size: 15px; line-height: 1.75; color: #e7dcc4; }
.help-sec p b { color: var(--gold-2); }
.set-row { display: flex; align-items: center; gap: 18px; margin: 16px 0; font-size: 18px; color: var(--txt-light); }
.set-row label { width: 120px; font-family: var(--font-brush); font-size: 24px; color: var(--gold-2); }
.set-row input[type=range] { width: 320px; accent-color: var(--cinnabar); }
.credits { font-size: 14px; line-height: 1.9; color: #d8ccb2; max-width: 760px; }
.credits a { color: var(--gold-2); }

/* end screens */
.end-scr .end-big { position: absolute; left: 0; right: 0; top: 150px; text-align: center; font-family: var(--font-brush); font-size: 150px; color: var(--gold-2); text-shadow: 0 6px 0 #3a0e0c, 0 0 60px rgba(243,213,141,.25); animation: inkIn 2s var(--ease) both; }
.end-scr .end-lines { position: absolute; left: 0; right: 0; top: 360px; text-align: center; }
.end-scr .end-lines .line { font-family: var(--font-kai); font-size: 30px; line-height: 1.9; color: var(--txt-light); opacity: 0; animation: lineIn 1.2s var(--ease) forwards; }
.end-scr .end-stats { position: absolute; left: 50%; top: 560px; transform: translateX(-50%); display: flex; gap: 40px; }
.end-scr .end-stats div { text-align: center; font-size: 14px; color: var(--muted); }
.end-scr .end-stats b { display: block; font-family: var(--font-brush); font-weight: 400; font-size: 44px; color: var(--gold-2); }
.end-scr .end-foot { position: absolute; left: 0; right: 0; bottom: 80px; display: flex; justify-content: center; gap: 20px; }
.end-scr .unlock { position: absolute; left: 50%; top: 690px; transform: translateX(-50%); padding: 10px 26px; border-radius: 24px; background: rgba(212,168,83,.15); box-shadow: inset 0 0 0 1px var(--gold-3); color: var(--gold-2); font-size: 17px; animation: scrIn 1s 1.5s ease both; }
