/* Refined trial: shared game engine, original identity, quiet motion. */
:root{--line:#a9c8df2d;--soft:#b5bed4}
body{background:#090e20}
.ambient{background:radial-gradient(ellipse at 14% 32%,#15394d8c,transparent 52%),radial-gradient(ellipse at 88% 68%,#38275865,transparent 56%),#090e20}
.ambient:after{opacity:.35}
.workshop-world{opacity:.45}
.workshop-button,.workshop-spool{opacity:.35!important}
.workshop-seam{opacity:.4;left:-100px}
.brand-motif{opacity:.09}
.topbar{max-width:1360px;padding:18px 36px;border:0!important}
.tools button,.tools a{background:#10172bcc;border-color:#8296bc2c}
.game-audio{background:#10172bcc!important;border-color:#8296bc2c!important}
html[data-scene=welcome] .ambient{background:radial-gradient(ellipse at 50% 46%,#244b624f,transparent 48%),radial-gradient(ellipse at 18% 65%,#30275155,transparent 52%),#090e20}
html[data-scene=welcome] .welcome{min-height:calc(100svh - 155px);padding-top:20px;gap:8px}
.intro-copy h1{font-size:clamp(34px,4.5vw,64px);font-weight:700;line-height:1.32;letter-spacing:-1.5px}
.intro-copy p{font-size:14px;line-height:1.9;color:#aebed2;max-width:550px}
.intro-copy>.eyebrow{letter-spacing:2.5px;color:#82d3de}
.hero-art.menu-scene{height:360px;min-height:360px;--orbit-x:230px;--orbit-y:80px}
.menu-scene .sample{border-color:#8ac9df70;background:#101c2d;box-shadow:0 18px 35px #0005;padding:7px;border-radius:10px}
.menu-scene .sample span{color:#b5cbdc;font-size:8px}
.portal-ring{border-width:1px;border-color:#8acee64d;box-shadow:none;animation-duration:28s}
.portal-ring.ring-inner{border-color:#af9ae45c;border-left-width:2px;animation-duration:22s}
.portal-disc{background:radial-gradient(circle,#a8eafa0b,#1d344c77 55%,transparent 72%);border-color:#93cadd26}
.portal-scissors{top:45px}
.portal-spark{font-size:20px;color:#b9e9f0;animation-duration:19s}
.welcome:before,.welcome:after{opacity:.45}
.menu-controls .start{min-width:250px;min-height:58px;border-radius:14px;border-color:#b5ebff60;font-size:18px;box-shadow:0 5px 0 #262c4e,0 10px 30px #50c5e818;animation-duration:4s}
.menu-controls .start span{animation:none}
.menu-hint{color:#8b9fb8}
/* Let the scene breathe. No oversized enclosing panel. */
html[data-scene=game],html[data-scene=finale]{overflow:auto}
.game.arena{position:relative;max-width:1120px;height:auto;min-height:calc(100svh - 155px);padding:18px 20px 32px;grid-template-rows:auto auto auto auto minmax(220px,1fr) auto;gap:14px;background:none;border:0;box-shadow:none}
.game:before,.game:after{display:none!important}
.arena .game-top{font-size:11px;opacity:.85}
.game-top #counter{font-size:17px;min-width:90px;background:#18283b88;border:1px solid #9bd8e52b;border-radius:10px;padding:9px 13px;box-shadow:none}
.arena .steps{gap:9px;margin:4px auto 8px;width:min(460px,85%);flex-shrink:0}
.arena .steps li{height:3px;background:#7193ba27;overflow:visible}
.arena .steps li:before{border-radius:3px}
.gwen-say{min-height:48px;gap:10px;margin:0 auto;max-width:650px}
.gwen-badge{width:40px;height:40px;border-width:1px;box-shadow:none;background:#11263a88}
.gwen-badge img{width:32px;height:32px}
#bubble{background:#10203375;border:0;color:#bfd5df;font-size:12px;padding:8px 12px;text-align:start}
.arena .round-head h1{font-size:clamp(25px,3vw,37px);line-height:1.5;margin:5px 0 8px}
.arena .round-head p{font-size:12px;color:#a6b7cd}
.round-kicker{border:0!important;background:none!important;font-size:10px;padding:0;letter-spacing:1px;color:#8db8c8}
.stage{padding:10px 0 8px;gap:20px}
.deck{gap:18px;align-items:stretch}
.deck .choice{border-radius:16px;padding:15px 13px;background:linear-gradient(145deg,#192b4099,#10192fe8);border-color:#8fb6cf38;box-shadow:0 8px 25px #03091b22;transition:transform .32s cubic-bezier(.2,.8,.2,1),border-color .25s,background .25s}
.deck .choice:before{inset:6px;border-color:#96bed421;border-radius:11px}
.deck .choice h2{font-size:16px;margin-top:12px}
.deck .choice:hover{transform:translateY(-7px);box-shadow:0 14px 28px #03091b40;border-color:#8ad8e6a6}
.deck .choice.selected{border-color:var(--m);box-shadow:0 0 0 1px var(--m),0 10px 24px #02081540}
.world-card{transform:none}
.world-card:nth-child(1),.world-card:nth-child(5){--d:0}
.deck.fan{padding:12px 0;align-items:stretch}
.world-card .card-cover{aspect-ratio:16/10;border-radius:9px}
.world-card .symbol{height:30px!important;margin-top:8px;filter:none}
.world-card .symbol svg{width:30px!important;height:30px!important;opacity:.8}
.deck.fan .world-card:hover{transform:translateY(-8px) rotate(-1deg)}
.deck.fan .world-card.selected{transform:translateY(-5px)}
.deck .choice .number{background:#172c40c9;border:1px solid #8ba9bd2b;border-radius:6px;font-size:8px;padding:5px 7px}
.deck.threads{max-width:980px;gap:16px}
.deck.threads .thread-card{padding-top:25px;min-height:185px}
.thread-card .spool-dot{width:29px;height:29px;box-shadow:0 0 0 5px #ffffff07,0 0 20px #0002}
.thread-card.selected .spool-dot{animation-duration:8s!important}
.braid{height:36px;width:min(290px,65%)}
.braid .ply{stroke-width:3}
.braid.on .ply{animation-duration:5s}
.actions{padding:8px 0 2px}
.actions .primary{border-radius:12px;min-width:150px;padding:13px 24px;box-shadow:0 4px 0 #24324d}
.deal{animation-name:refined-deal;animation-duration:.55s}
@keyframes refined-deal{from{opacity:0;transform:translateY(22px) scale(.97)}to{opacity:1;transform:none}}
/* Three shared composited layers carry the background, rather than many emitters. */
.refined-atmosphere{position:absolute;inset:0;pointer-events:none;overflow:hidden;opacity:.65}
.silk-ribbon{position:absolute;width:540px;height:240px;opacity:.38;animation:silk-drift 22s ease-in-out infinite alternate}
.silk-ribbon svg{display:block;width:100%;height:100%}
.silk-ribbon path{fill:none;stroke:#8fdfec;stroke-width:.8;stroke-dasharray:2 8}
.silk-ribbon path:nth-child(2){stroke:#b39bdf;stroke-dasharray:none;opacity:.5}
.silk-ribbon.ribbon-a{top:24%;left:-240px;transform:rotate(-22deg)}
.silk-ribbon.ribbon-b{right:-270px;bottom:13%;animation-delay:-11s;animation-duration:27s;transform:rotate(155deg)}
.mote-field{position:absolute;inset:8% 4%;animation:mote-drift 18s ease-in-out infinite alternate}
.mote-field i{position:absolute;width:3px;height:3px;background:#abecf5;border-radius:50%;box-shadow:0 0 8px #7ae3ff66;opacity:.4}
.mote-field i:nth-child(1){top:17%;left:17%}.mote-field i:nth-child(2){top:43%;left:7%;width:2px;height:2px}.mote-field i:nth-child(3){top:73%;left:23%}.mote-field i:nth-child(4){top:28%;right:18%}.mote-field i:nth-child(5){top:64%;right:9%}.mote-field i:nth-child(6){top:88%;right:28%}.mote-field i:nth-child(7){top:9%;right:34%}.mote-field i:nth-child(8){top:91%;left:8%}
@keyframes silk-drift{from{translate:0 -12px}to{translate:20px 24px}}
@keyframes mote-drift{from{transform:translate3d(0,0,0);opacity:.45}to{transform:translate3d(12px,-22px,0);opacity:.95}}
html[data-refined-paused] *,html[data-refined-paused] *:before,html[data-refined-paused] *:after{animation-play-state:paused!important}
html[data-motion=off] *,html[data-motion=off] *:before,html[data-motion=off] *:after{animation:none!important;transition:none!important}
html[data-preview=open] .ambient *,html[data-preview=open] .ambient *:before,html[data-preview=open] .ambient *:after{animation-play-state:paused!important}
@media(min-width:1000px){html[data-scene=welcome] .welcome{display:grid;grid-template-columns:1fr 1.1fr;grid-template-rows:1fr auto;align-content:center;column-gap:50px;text-align:start;min-height:calc(100svh - 170px);padding:20px 10px}
 .intro-copy{grid-column:1;grid-row:1;align-self:end;padding-bottom:20px}.intro-copy h1{font-size:clamp(44px,4.6vw,66px)}.intro-copy h1 em{display:block;margin-inline:0}.intro-copy p{margin:0;max-width:450px;font-size:15px}.hero-art.menu-scene{grid-column:2;grid-row:1/3;width:100%;height:430px;min-height:430px;--orbit-x:155px;--orbit-y:90px}.portal-scissors{top:90px}.menu-controls{grid-column:1;grid-row:2;align-items:flex-start;align-self:start;min-height:140px}.menu-controls .intro-meta{max-width:390px}.menu-controls .sound-bars{display:none}.menu-hint{position:absolute;bottom:15px;inset-inline-end:30px;font-size:9px}.welcome:before,.welcome:after{display:none}.menu-scene .sample{width:218px}.portal-spark{top:66px;transform-origin:10px 157px}}
@media(max-width:760px){.topbar{padding:15px 16px}.game.arena{padding:12px 2px 26px;gap:12px;min-height:calc(100svh - 160px);grid-template-rows:auto auto auto auto minmax(160px,1fr) auto}.arena .game-top .eyebrow{font-size:8px}.gwen-say{gap:6px;max-width:100%}#bubble{font-size:11px;max-width:260px}.arena .round-head h1{font-size:25px}.arena .round-head p{font-size:11px;max-width:310px}.deck{gap:10px}.deck .choice{padding:11px 8px}.world-card{flex:1 1 calc(50% - 10px)!important;max-width:calc(50% - 5px)!important}.world-card:last-child{max-width:220px!important}.deck.fan{padding-top:4px;row-gap:12px}.deck .choice h2{font-size:13px;margin-top:8px}.deck .choice p{display:block;font-size:10px}.deck.threads .thread-card{min-height:120px;flex:1 1 calc(33% - 10px);padding-top:18px}.thread-card .role{min-height:10px}.braid{height:28px}.stage{padding:8px 0;gap:12px}.actions{position:relative;padding:8px 0}.silk-ribbon{opacity:.25}.workshop-world{opacity:.3}.workshop-button.button-1,.workshop-needle{display:none}.hero-art.menu-scene{height:305px;min-height:305px;--orbit-x:100px;--orbit-y:74px}.menu-scene .sample{width:152px}.menu-controls .start{min-width:230px}.intro-copy h1{font-size:34px}.intro-copy p{max-width:300px;font-size:12px}.portal-scissors{top:48px}.mbox .box{height:80px}.deck .mbox p{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.deal{opacity:1;transform:none}.demo-fast img:first-child,.demo-smooth img:first-child,.demo-balanced img:first-child{opacity:1}.refined-atmosphere{opacity:.35}}@media(min-width:1000px){.game.arena{min-height:calc(100svh - 210px);grid-template-rows:auto auto auto auto auto auto;align-content:start;gap:16px}.arena .stage{min-height:260px;margin-top:12px}.deck .world-card{min-height:225px}.arena .gwen-say{margin-top:6px}.arena .round-head{margin-top:2px}}
@media(max-width:760px){.arena .steps{margin:0 auto}.game.arena{gap:10px}.gwen-say{min-height:36px}.arena .round-head h1{margin:3px 0 5px}.deck.fan .world-card{min-height:0}.world-card .card-cover{aspect-ratio:16/9}.deck .world-card p{font-size:9px}}
