/* 作品ごとの卓を背景に、スクロールで説明と場面を同期。 */
.game-story{--world:#17363e;--light:#b7e7dd;position:relative;color:#fff;background:var(--world);margin:0;padding:80px max(24px,calc((100vw - 1200px)/2)) 42px}
.story-dearBlue{--world:#092e40;--light:#8ce6f0}.story-burstOfMana{--world:#211932;--light:#ead5a3}.story-hyakujuParade{--world:#3b2937;--light:#ffd3a2}.story-etoShogi{--world:#34372c;--light:#e8d2a4}.story-nikuKaruta{--world:#402725;--light:#ffa99c}.story-gachaPoker{--world:#20213e;--light:#c8c0ff}.story-bibiluTower{--world:#30233f;--light:#e6c0ff}.story-stackCircus{--world:#382b42;--light:#ffce87}.story-yakegori{--world:#412c22;--light:#ffd89e}.story-noble{--world:#282f26;--light:#f1d1a0}
.story-heading{max-width:900px;margin:0 auto 50px;text-align:center}.story-eyebrow{color:var(--light);font-weight:700;font-size:clamp(15px,1.6vw,22px);margin:0 0 22px}.detail .story-heading h2{font-size:clamp(26px,3.7vw,48px);padding:0;line-height:1.5;text-wrap:balance}.detail .story-heading h2:before{display:none}.scroll-cue{display:inline-block;font-size:32px;color:var(--light);margin-top:15px}
.story-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:clamp(30px,5vw,80px);align-items:start}.story-stage{position:sticky;top:110px;height:min(72vh,680px)}
.story-world{position:relative;width:100%;height:100%;min-height:360px;isolation:isolate;border-radius:36px;background:linear-gradient(150deg,#ffffff0b,#0004),var(--world-image,none) center/cover,var(--world);box-shadow:inset 0 0 0 1px #fff2,0 30px 70px #0004;overflow:hidden}
.story-world:before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at center,#ffffff08, #0005);z-index:-1}.world-orbit{position:absolute;width:80%;aspect-ratio:1;border:1px solid #ffffff1c;border-radius:50%;top:10%;left:10%;box-shadow:0 0 0 35px #ffffff05,0 0 0 70px #ffffff03;z-index:-1}
.story-scene{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 24px;min-height:400px;gap:25px}.is-scrolling .story-scene{position:absolute;inset:0;min-height:0;opacity:0;visibility:hidden;transform:translateY(25px) scale(.96);transition:opacity .6s,transform .8s cubic-bezier(.2,.8,.2,1),visibility .6s}.is-scrolling .story-scene.is-current{opacity:1;visibility:visible;transform:none}
.story-chapter{min-height:75vh;display:flex;flex-direction:column;justify-content:center;padding:60px 0;scroll-margin-top:140px;position:relative}.chapter-number{font:800 16px/1 system-ui;letter-spacing:.16em;color:var(--light);margin-bottom:26px}.detail .story-chapter h3{font-size:clamp(27px,3vw,42px);font-family:var(--display);line-height:1.5;text-wrap:balance;margin:0 0 24px}.story-chapter>p{font-size:18px;line-height:2;margin:0;color:#f3f3f3}.story-insight{border-left:3px solid var(--light);padding:4px 0 4px 22px;margin-top:32px}.story-insight h4{margin:0 0 10px;font-size:16px;color:var(--light)}.story-insight p{font-size:14px;line-height:1.9;color:#d9dfe1;margin:0}.story-note{text-align:center;color:#cbd3d5;font-size:13px;margin:30px 0 0}
.story-dots{position:absolute;bottom:22px;left:24px;right:24px;display:flex;justify-content:center;gap:14px}.story-dots a{display:grid;place-items:center;width:44px;height:44px;border:1px solid #fff4;border-radius:50%;text-decoration:none;font:700 13px system-ui;color:#fff;background:#10182099}.story-dots a[aria-current]{background:var(--light);color:#172b35;border-color:var(--light)}.story-progress{position:absolute;top:0;left:0;right:0;height:4px;background:#fff2}.story-progress span{display:block;height:100%;background:var(--light);transform:scaleX(var(--story-progress,.333));transform-origin:left;transition:transform .6s}
.scene-card{object-fit:contain;filter:drop-shadow(0 16px 15px #0006);max-height:280px;min-width:0}.story-hand,.parade-cards,.zodiac-pieces,.tower-cards{display:flex;align-items:center;justify-content:center;width:100%;gap:10px;perspective:900px}.story-hand .scene-card{width:31%;transform:translateY(calc(var(--order)*8px)) rotate(calc((var(--order) - 1)*9deg))}.is-current .scene-card{animation:story-deal .9s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--order)*.13s)}
@keyframes story-deal{from{opacity:0;translate:0 45px;scale:.85}to{opacity:1;translate:0 0;scale:1}}
.story-hand.hand-step-1 .scene-card{transform:rotate(0);width:34%}.story-hand.hand-step-2 .scene-card{transform:translateY(calc((1 - var(--order))*18px)) rotate(calc((var(--order) - 1)*-8deg))}.hand-stackCircus.hand-step-1{flex-direction:column;gap:0}.hand-stackCircus.hand-step-1 .scene-card{width:36%;max-height:125px;margin-top:-20px;transform:rotate(-4deg)}.hand-gachaPoker .scene-card{width:45%;image-rendering:pixelated}
.parade-cards .scene-card{width:33%;max-height:270px;transform:rotate(calc((var(--order) - 1)*6deg))}.scene-equation{font:900 clamp(28px,4vw,54px)/1.2 var(--display);color:#fff;text-shadow:0 4px 15px #0006}
.story-board{display:grid;width:min(95%,400px);aspect-ratio:1;gap:5px;padding:14px;filter:drop-shadow(0 16px 20px #0005)}.story-board>span{display:grid;place-items:center;min-height:0;min-width:0;border-radius:9px;background:#ffffff15}.board-piece{width:90%;height:90%;object-fit:contain;filter:drop-shadow(0 4px 4px #0005)}.nb-board{grid-template:repeat(4,1fr)/repeat(4,1fr);background:#e5c89d;border:9px solid #5e3f2a;border-radius:12px}.nb-board>span{border:1px solid #84684a77}.mana-board{grid-template:repeat(5,1fr)/repeat(5,1fr)}.mana-board>span{background:transparent;outline:1px dashed #ffffff20}.suit-board{grid-template:repeat(4,1fr)/repeat(4,1fr);background:#eadcc5;border:10px solid #654a35;border-radius:14px}.suit-cell{font-size:clamp(28px,4vw,48px);color:#ca4843;background:#fff9!important}.mana-evolve{display:flex;align-items:center;gap:10px}.mana-evolve img{width:42%;filter:drop-shadow(0 0 20px #f7d17770)}.mana-evolve span{font-size:35px}
.aquarium{position:relative;width:100%;padding:50px 10px}.tank{width:100%;max-height:320px;object-fit:contain;filter:drop-shadow(0 20px 20px #0004)}.fish-cards{position:absolute;inset:15% 8% 18%;display:flex;align-items:center;justify-content:center;gap:5px}.fish-cards img{width:31%;max-height:220px;transform:rotate(calc((var(--order) - 1)*7deg))}.story-dearBlue .scene-2 .aquarium{transform:scale(.85) rotate(-5deg)}.zodiac-pieces img{width:29%}.story-etoShogi .scene-1 .zodiac-pieces{flex-direction:column;gap:0}.story-etoShogi .scene-1 img+img{margin-top:-40px;translate:15px 0}.tower-cards img{width:30%}.tower-2{flex-direction:column;gap:0}.tower-2 img{max-height:145px;margin-top:-55px;transform:rotate(calc((var(--order) - 1)*5deg))}.code-board{width:95%;padding:30px 20px;border-radius:24px;background:#14202b;box-shadow:inset 0 0 0 2px #ffffff25,0 20px 40px #0006}.code-row{display:flex;justify-content:center;gap:12px;padding:18px 0}.code-row i{width:20%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 30% 25%,#fff9,var(--ball) 45%,#0005);box-shadow:0 6px 0 #0005}
@media(max-width:760px){.game-story{padding:48px 18px 30px}.story-heading{margin-bottom:25px}.story-layout{display:block}.story-stage{top:70px;height:42svh;z-index:2}.story-world{min-height:0;border-radius:24px}.story-scene{padding:35px 18px 60px}.story-chapter{min-height:65svh;padding:36px 8px;scroll-margin-top:calc(42svh + 90px)}.detail .story-chapter h3{font-size:27px;margin-bottom:18px}.story-chapter>p{font-size:16px;line-height:1.9}.story-insight{margin-top:22px}.story-dots{bottom:12px}.story-dots a{width:32px;height:32px;font-size:11px}.story-board{width:auto;height:100%;max-width:90%;padding:6px;gap:3px}.scene-card{max-height:23svh}.aquarium{padding:0;max-width:360px}.tank{max-height:27svh}.fish-cards img{max-height:21svh}.scene-equation{font-size:27px}.story-scene:has(.nb-board){flex-direction:row;gap:12px}.story-scene:has(.nb-board) .nb-board{max-width:65%}.hand-stackCircus.hand-step-1 .scene-card{max-height:10svh}.tower-2 img{max-height:12svh;margin-top:-35px}}
@media(prefers-reduced-motion:reduce){.is-scrolling .story-scene,.story-progress span{transition:none}.is-current .scene-card{animation:none}}
/* JSが使えない場合も全場面・全説明を読むことができる。 */
.game-story:not(.is-scrolling) .story-stage{position:relative;height:auto}.game-story:not(.is-scrolling) .story-world{overflow:visible}.game-story:not(.is-scrolling) .story-scene{min-height:400px}.game-story:not(.is-scrolling) .story-dots{display:none}
.count-disc{width:80%;height:80%;border-radius:50%;box-shadow:inset 0 0 0 3px #ffffff35,0 4px 5px #0005}.count-disc.red{background:#ce343e}.count-disc.black{background:#222832}
.story-nineBreak .scene-1.is-current .nb-board>span:nth-child(6) img{animation:story-flip 1s .25s both}
@keyframes story-flip{0%{transform:rotateY(-90deg) scale(1.15)}100%{transform:rotateY(0) scale(1)}}
.story-dearBlue .scene-0.is-current .fish-cards img:last-child{animation:fish-arrive 1.2s .2s both}
@keyframes fish-arrive{from{opacity:0;transform:translate(60px,-80px) rotate(20deg)}to{opacity:1;transform:rotate(7deg)}}
.story-burstOfMana .scene-2.is-current .mana-evolve img:last-child{animation:mana-burst 1.1s .2s both}
@keyframes mana-burst{from{opacity:0;transform:scale(.5) rotate(-25deg);filter:brightness(3)}to{opacity:1;transform:none;filter:drop-shadow(0 0 20px #f7d17770)}}
.story-hyakujuParade .scene-2 .parade-cards{transform:translateY(-25px);opacity:.8}.story-chapter h3{word-break:normal;overflow-wrap:anywhere}
@media(prefers-reduced-motion:reduce){.story-nineBreak .scene-1.is-current .nb-board>span:nth-child(6) img,.story-dearBlue .scene-0.is-current .fish-cards img:last-child,.story-burstOfMana .scene-2.is-current .mana-evolve img:last-child{animation:none}}
