/* V2: spatial dice and complete five-slot / fusion / constellation surfaces. */
.cube-row{perspective:1000px;gap:1.05rem;padding:1.2rem 1.1rem;overflow:visible;isolation:auto}
.cube-row .cube-die{--size:6.6rem;flex:0 1 var(--size);width:var(--size);height:calc(var(--size) + 2.5rem);max-width:var(--size);position:relative;transform:none;filter:none;perspective:900px}
.cube-row[data-count="1"] .cube-die,.cube-row.large .cube-die{--size:8.8rem;flex-basis:var(--size);max-width:var(--size);width:var(--size)}
.cube-row[data-count="5"] .cube-die{--size:5.6rem}.cube-row[data-count="6"] .cube-die{--size:4.65rem}
.die-flight{position:relative;width:var(--size);height:var(--size);transform-style:preserve-3d}
.die-cube{position:absolute;width:100%;height:100%;transform-style:preserve-3d;transform:rotateX(-18deg) rotateY(-24deg) rotateZ(-3deg)}
.cube-face{position:absolute;inset:0;display:grid;place-items:center;border:2px solid currentColor;border-radius:13%;background:linear-gradient(135deg,#293b48,#080b10 46%,#17222c);backface-visibility:hidden;box-shadow:inset 0 0 0 3px #060a0e,inset 0 0 0 4px #b2d9ef66,inset .1rem .15rem .25rem #ffffff50,0 0 .2rem currentColor}
.cube-face>span{font:700 calc(var(--size) * .72)/1 Consolas,'Abyss Text','Abyss Text Full',monospace;text-shadow:0 0 .35rem currentColor;transform:translateY(-.02em)}
.face-0{transform:translateZ(calc(var(--size) / 2))}.face-1{transform:rotateY(90deg) translateZ(calc(var(--size) / 2));background:#0c1621}.face-2{transform:rotateY(180deg) translateZ(calc(var(--size) / 2))}.face-3{transform:rotateY(-90deg) translateZ(calc(var(--size) / 2));background:#0b121b}.face-4{transform:rotateX(90deg) translateZ(calc(var(--size) / 2));background:linear-gradient(130deg,#456071,#162330)}.face-5{transform:rotateX(-90deg) translateZ(calc(var(--size) / 2));background:#0c1725}
.cube-face:not(.face-0)>span{display:none}.pips{position:absolute;inset:20%;display:grid;grid-template-columns:repeat(2,1fr);gap:18%;align-items:center;justify-items:center}.pips b{width:80%;aspect-ratio:1;border-radius:50%;background:currentColor;box-shadow:0 0 .25rem currentColor}.face-0 .pips{display:none}.pips b:only-child{grid-column:1/3;width:40%}
.face-corner{position:absolute;inset:8%;border:1px solid #ffffff20;border-radius:10%;pointer-events:none}.die-shadow{position:absolute;left:-8%;right:-10%;bottom:1.7rem;height:1.4rem;background:radial-gradient(ellipse,#000 10%,#73b5e32b 30%,transparent 72%);filter:blur(4px);transform:rotate(-12deg)}
.cube-die .die-index{position:absolute;bottom:-.3rem;left:0;right:0;text-align:center;letter-spacing:.2em}.cube-die .cube-energy{position:absolute;inset:-40% -35% -10%;width:170%;height:140%;pointer-events:none;opacity:0;z-index:2;filter:none}
.cube-die.resonant .cube-face{background:linear-gradient(125deg,#573919,#170b02 50%,#34200c);box-shadow:inset 0 0 0 3px #160800,inset 0 0 0 4px #ffcd6f80,0 0 .3rem #fff2b0,0 0 1rem #ff9e2466}
.cube-die.resonant .face-4{background:linear-gradient(130deg,#ad6921,#352009)}.cube-die.critical-die .cube-face{background:linear-gradient(130deg,#4a1826,#12070d)}.cube-die.charged .cube-face{background:linear-gradient(130deg,#143a5c,#050b14)}
.impact-reveal .cube-die.resonant .cube-energy,.impact-reveal .cube-die.charged .cube-energy,.impact-reveal .cube-die.critical-die .cube-energy{opacity:1;animation:energy-release 1.4s ease-out both}
.rolling .cube-die{animation:none!important}.rolling .die-flight{animation:cube-flight 1s cubic-bezier(.15,.55,.35,1) both;animation-delay:calc(var(--i)*.009s)}.rolling .die-cube{animation:cube-tumble 1s cubic-bezier(.18,.62,.35,1) both;animation-delay:calc(var(--i)*.009s)}.rolling .die-shadow{animation:shadow-flight 1s both}
@keyframes cube-flight{0%{transform:translate3d(-.7rem,.3rem,0)}28%{transform:translate3d(.3rem,-2.3rem,3rem)}64%{transform:translate3d(.8rem,.25rem,0)}76%{transform:translate3d(.25rem,-.65rem,.5rem)}88%{transform:translate3d(0,.1rem,0)}100%{transform:translate3d(0,0,0)}}
@keyframes cube-tumble{0%{transform:rotateX(-198deg) rotateY(-384deg) rotateZ(-183deg)}36%{transform:rotateX(180deg) rotateY(100deg) rotateZ(80deg)}68%{transform:rotateX(348deg) rotateY(334deg) rotateZ(-8deg)}84%{transform:rotateX(334deg) rotateY(338deg) rotateZ(0deg)}100%{transform:rotateX(342deg) rotateY(336deg) rotateZ(-3deg)}}
@keyframes shadow-flight{30%{opacity:.3;transform:scale(.65)}65%{opacity:1;transform:scale(1.3)}100%{transform:scale(1)}}@keyframes energy-release{0%{opacity:0;transform:scale(.8)}25%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.14)}}
.impact-reveal .trigger-line{animation:reveal .3s .2s both}.impact-reveal .damage-number{animation:damage-slam .45s .4s both}.impact-reveal .damage-result>p{animation:reveal .3s .65s both}@keyframes damage-slam{0%{opacity:0;transform:scale(1.45)}50%{opacity:1;transform:scale(.95)}100%{transform:scale(1)}}
.damage-number>strong{font-size:clamp(2.7rem,5.5vw,6.4rem);letter-spacing:-.06em}.crit-stamp{left:auto;right:-3.5rem;font-size:1.25rem}.skip-animation{border:0;background:#06161c;padding:.2rem .4rem;font-size:.66rem;color:var(--cyan);white-space:nowrap}
.equipment-list{grid-template-rows:repeat(2,minmax(0,1.3fr)) repeat(3,minmax(0,1fr));gap:.4rem}.equipped-item{padding:.4rem .65rem}.equipped-item h3{font-size:.96rem;margin:.2rem 0}.equipped-item p{font-size:.68rem;line-height:1.35}.equipped-item p>span{display:inline}.equipped-item p>span+span:before{content:' · '}.equipment-depth{font-size:.56rem;margin-top:.25rem;padding-top:.2rem}.equipped-item .item-meta{font-size:.65rem}.equipped-item .rarity{font-size:.7rem}.empty-slot{color:#7e8a95;display:flex;align-items:center;justify-content:space-between;border-style:dashed}.empty-slot>span{font-size:.8rem}.character-stats dl{margin:.35rem}.character-stats dd{font-size:1rem}.dice-growth{margin:.2rem 0}.dice-growth .mini-dice{margin:.4rem .25rem}.dice-growth p{margin:.2rem}.inventory-list{scrollbar-width:thin;scrollbar-color:#6d828b #0a1014}.item-bottom{flex-wrap:wrap}.item-bottom .small{padding:.35rem .6rem}.item-card h3 small{display:block;font-size:.7rem}
.forge-screen .forge-target{display:flex;flex-direction:column;align-items:center;flex:1;justify-content:center}.forge-dice{height:10rem!important;min-height:0}.forge-dice .cube-die{--size:5.5rem!important}.forge-screen .slot-tabs{margin-top:.7rem}.forge-rule{margin:.6rem 0}.forge-target>.primary{min-height:2.6rem}.forge-screen .forge-result{margin:.5rem 0}
.fusion-screen{gap:.5rem;padding:.2rem 0}.fusion-screen>h1{font-size:1.8rem}.fusion-screen>.slot-tabs{margin:.2rem 0}.fusion-workbench{display:grid;grid-template-columns:minmax(0,1fr) 6rem minmax(0,1fr);gap:.5rem;flex:1;min-height:0;width:100%;text-align:left}.fusion-workbench h2{font:700 1rem Consolas,'Abyss Text','Abyss Text Full','Microsoft YaHei',sans-serif;padding:.5rem;border-bottom:1px solid #46505a}.fusion-workbench h2 small{display:block;font-size:.65rem;font-weight:400;color:#a4acb5;margin:.3rem 0}.fusion-targets,.fusion-materials{border:1px solid #6a5281;background:linear-gradient(140deg,#21132955,transparent);display:flex;flex-direction:column;min-height:0}.fusion-materials{border-color:#6c727b;background:linear-gradient(140deg,#15242c55,transparent)}.fusion-picker{overflow:auto;scrollbar-width:thin;scrollbar-color:#73518a #0b0911;min-height:0;flex:1;padding:.4rem;display:flex;flex-direction:column;gap:.4rem}.fusion-picker button{display:block;text-align:left;padding:.5rem;font-size:.75rem;flex-shrink:0}.fusion-picker button small{display:block;color:#aeb9c4;font-size:.62rem;margin:.3rem 0}.fusion-picker button.selected{background:#382648;box-shadow:inset 3px 0 #d88cff;border-color:#d88cff}.fusion-flow{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;color:#d98fff}.fusion-flow>span{font-size:3rem}.fusion-flow small{font-size:.65rem;line-height:1.8}.fusion-flow .cube-die{--size:2.7rem!important}.fusion-flow .dice-row{padding:1.3rem 0}.fusion-estimate{font-size:.7rem;text-align:center;line-height:1.6;min-height:3.3rem;width:100%;padding:.5rem;border-top:1px solid #665078}.fusion-estimate small,.fusion-estimate strong{display:block;font-size:.65rem}.fusion-screen>.primary{min-width:12rem;font-size:1rem;padding:.6rem 1.5rem}.fusion-screen>.forge-result{font-size:.65rem;padding:.35rem;margin:0}.fusion-reveal .fusion-targets{animation:forge-pulse .7s}.fusion-reveal .fusion-flow>span{animation:flow-light .8s}@keyframes flow-light{0%{transform:translateX(2rem);text-shadow:4rem 0 #fff,2rem 0 #c56aff;opacity:0}40%{opacity:1}100%{transform:translateX(-2rem);opacity:.4}}
.talent-screen{display:flex;flex-direction:column;gap:.7rem}.talent-screen .collection-heading h1{font-size:1.5rem}.talent-screen .collection-heading p{font-size:.7rem}.talent-constellation{position:relative;flex:1;min-height:13rem;background:repeating-radial-gradient(ellipse at center,transparent 0 2.9rem,#63778b28 3rem 3.04rem,transparent 3.1rem 4rem)}.constellation-core{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:7rem;height:7rem;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #b7cbdc;box-shadow:0 0 0 .4rem #161d27,0 0 0 .45rem #576579;background:#0b111a;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);font-size:.8rem}.constellation-core .icon{width:1.8rem;height:1.8rem}.constellation-core small{font-size:.45rem}.constellation-branch{position:absolute;display:flex;flex-direction:column;padding:.55rem .8rem;width:10rem;border:1px solid currentColor;background:#080c13;font-size:.8rem;gap:.25rem;box-shadow:0 0 1rem #000}.constellation-branch small{font-size:.6rem}.constellation-branch .icon{width:1.6rem;height:1.6rem}.constellation-branch.selected{box-shadow:0 0 1rem currentColor;outline:1px solid currentColor;outline-offset:3px}.constellation-branch:nth-child(1){top:0;left:50%;transform:translateX(-50%)}.constellation-branch:nth-child(2){left:0;top:50%;transform:translateY(-50%)}.constellation-branch:nth-child(3){right:0;top:50%;transform:translateY(-50%)}.constellation-branch:nth-child(4){bottom:0;left:50%;transform:translateX(-50%)}.branch-high{color:#ff747d}.branch-resonance{color:#ffd064}.branch-critical{color:#4fcfff}.branch-vitality{color:#ce85ff}.talent-node-grid{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.growth-node{display:flex;gap:.6rem;padding:.65rem;text-align:left;justify-content:flex-start;min-height:4rem;background:#080e15;border-color:#536373}.growth-node:disabled{opacity:.8}.growth-node.lit{border-color:currentColor;background:linear-gradient(110deg,#29334780,transparent)}.node-rune{width:1.7rem;height:1.7rem;border:1px solid currentColor;display:grid;place-items:center;flex-shrink:0}.growth-node b{font-size:.8rem}.growth-node p{font-size:.7rem;color:#e0e4eb;margin:.25rem 0}.growth-node small{font-size:.56rem;color:#aab7c4}.talent-screen>.room-hint{font-size:.62rem;margin:0}.sanctuary-screen{justify-content:center;gap:1.5rem}.sanctuary-sigil{font-size:10rem;line-height:1.3;color:#afc9e0;text-shadow:0 0 2rem #a16aff}.sanctuary-screen .dice-row{margin:1rem 0}.sanctuary-screen>.room-hint{margin-top:0}.title-art .cube-die{--size:12rem!important;flex-basis:var(--size)!important;width:var(--size)!important;max-width:var(--size)!important}.title-art .dice-row{padding:3rem 0}.title-art .cube-face{color:#fff1cd}.title-screen{height:calc(100svh - 9rem);min-height:0;padding-top:2rem;padding-bottom:2rem}.title-copy h1{font-size:3.3rem}.title-footer{height:3.5rem}
@media(prefers-reduced-motion:reduce){.rolling .die-flight,.rolling .die-cube{animation:none!important}}html[data-effects=low] .cube-energy{display:none}html[data-effects=low] .die-cube{animation:none!important}
/* Second visual review: stronger dice scale, connected branches, reliable skip action. */
.combat-stage .cube-row[data-count="6"] .cube-die{--size:6rem}.combat-stage .cube-row[data-count="5"] .cube-die{--size:7rem}.combat-stage .cube-row[data-count="4"] .cube-die{--size:8rem}.combat-stage .cube-row[data-count="3"] .cube-die{--size:8.5rem}.combat-stage .cube-row{gap:1.35rem;padding:1.5rem 1.2rem;margin:1rem 0 .5rem;flex-shrink:0}.combat-stage .damage-result{margin-top:0}.combat-stage .roll-caption{margin-bottom:.8rem}
.impact-reveal .cube-die .die-energy{animation:none}.impact-reveal .cube-die{filter:none!important}.impact-reveal .cube-energy{mix-blend-mode:screen}.cube-energy .flame-hot{fill-opacity:.7;stroke-width:.6}.cube-energy .flame-aura{opacity:.55}
.forge-dice{position:relative;top:auto;right:auto;width:100%;margin:.6rem 0}.forge-target>h2{margin-bottom:.4rem}.manual-control [data-action=skip]{height:3rem;border-color:var(--cyan);background:#07303b}
.talent-constellation:before{content:'';position:absolute;inset:12% 10%;background:linear-gradient(90deg,transparent 49.8%,#83b6d870 49.8% 50.2%,transparent 50.2%),linear-gradient(transparent 49.7%,#83b6d870 49.7% 50.3%,transparent 50.3%);pointer-events:none}.constellation-branch{z-index:1}.constellation-core{z-index:2}.constellation-core small{font-size:.53rem;letter-spacing:0}.constellation-branch:after{content:'◇ · ◇ · ◇';font-size:.7rem;letter-spacing:.2rem;color:currentColor}.constellation-branch{background:linear-gradient(135deg,#18202b,#080c13)}
.legendary-reveal .treasure-light{animation:chest-glow .7s both}
.constellation-branch{height:6.5rem}.constellation-branch:nth-child(1),.constellation-branch:nth-child(4){left:calc(50% - 5rem);transform:none}.constellation-branch:nth-child(2),.constellation-branch:nth-child(3){top:calc(50% - 3.25rem);transform:none}.constellation-core small{display:none}
.target-sockets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.25rem;padding:.4rem}.target-sockets>div{border:1px solid currentColor;padding:.35rem;min-width:0;background:#14101b}.target-sockets>div:only-child{grid-column:1/4}.target-sockets small{font-size:.55rem;color:#a6a9b6;display:block}.target-sockets b{display:block;font-size:.6rem;line-height:1.5;margin-top:.2rem;overflow-wrap:anywhere}.fusion-screen>.primary{color:#7cecff;background:#072733;border-color:#4ae2f7}
.build-equipment .build-equipped{padding:.35rem .55rem;margin:.25rem 0}.build-equipment .build-equipped b{font-size:.8rem}.build-equipment .build-equipped small{font-size:.58rem;margin-top:.2rem;line-height:1.35}.build-equipment .empty-slot{font-size:.7rem}.cube-energy .flame-aura{filter:none;stroke-width:2;opacity:.35}.cube-energy .bolt-halo{filter:none;stroke-width:2.4;opacity:.45}.cube-energy .energy-sparks{filter:none}.cube-energy .flame-hot{fill-opacity:.55;stroke:#fff1b1;stroke-width:.65}
.cube-die .cube-energy{filter:drop-shadow(0 0 3px currentColor)}.cube-energy .flame-hot{fill:#fff1ac;fill-opacity:.8;stroke:currentColor;stroke-width:.6}.cube-energy .flame-aura{opacity:.7;stroke-width:3}.critical-die .cube-energy .flame-hot{fill:#ffc0b0}.charged .cube-energy .flame-hot{fill:#b9efff}
