@charset "UTF-8";
/* style.css */
:root{color-scheme:dark;--bg:#090d0f;--text:#eeefeb;--muted:#a2a7a4;--quiet:#747c7a;--accent:#d8c7a5;--line:#e7e9e51c;--ease:cubic-bezier(.16,1,.3,1);--soft:cubic-bezier(.22,.68,.25,1);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#060809}body{display:block;color:var(--text);-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button,a{touch-action:manipulation}button{color:inherit;cursor:pointer}button{border:0;background:none}a{color:inherit;text-decoration:none}svg{display:block;width:1em;height:1em;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}button:disabled{opacity:.35;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible{outline:1px solid var(--accent);outline-offset:5px}.game-frame{position:relative;width:100%;height:100%;height:100dvh;container-type:inline-size;isolation:isolate;overflow:hidden;background:var(--bg);--p:min(calc(100vw / 1920),calc(100dvh / 1080));--safe:4.5cqw;font-size:calc(var(--p)*24)}.scene{position:absolute;inset:-1%;z-index:-4;overflow:hidden;background:#101719;transition:filter .65s var(--soft)}.scene>img,.scene>iframe{display:block;width:100%;height:100%;border:0;object-fit:cover;pointer-events:none}.scene img{object-position:center}.scene-wall{inset:0}.scene-shade{position:absolute;inset:0;z-index:-3;pointer-events:none;background:linear-gradient(90deg,#060a0de0, #080c104d 55%,#080c101c),linear-gradient(0deg,#060a0dc9,transparent 50%,#060a0d3d)}.game-frame[data-page="home"] .scene-shade{background:linear-gradient(90deg,#070c10f5 0%,#070c10d9 19%,#070c1080 40%,#070c101f 72%)}.game-frame[data-page="cover"] .scene-shade{background:linear-gradient(90deg,#050a0fe0 0%,#050a0fa3 23%,#050a0f26 54%,#050a0f05 100%),linear-gradient(0deg,#050a0f90,transparent 40%)}.grain{position:absolute;inset:0;z-index:-2;opacity:.025;pointer-events:none;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='white' filter='url(%23n)' d='M0 0h120v120H0z'/%3E%3C/svg%3E")}.screen{position:absolute;inset:0}.screen[aria-busy="true"]{pointer-events:none}.topbar{position:absolute;top:calc(var(--p)*46);left:var(--safe);right:var(--safe);height:calc(var(--p)*52);display:flex;justify-content:space-between;align-items:center;z-index:4}.brand{display:block;width:calc(var(--p)*128);padding:0}.brand img{display:block;width:100%;height:auto}.header-actions{display:flex;align-items:center;gap:calc(var(--p)*25)}.icon-button{display:grid;place-items:center;width:calc(var(--p)*46);height:calc(var(--p)*46);border-radius:calc(var(--p)*5);font-size:calc(var(--p)*26);color:#b6c0c2;transition:color .18s,background .2s,transform .3s var(--ease)}.icon-button:hover{color:white;background:#d4e9f00e;transform:translateY(calc(var(--p)*-2))}.account{display:flex;align-items:center;gap:calc(var(--p)*11);padding:0;color:var(--muted);font-size:calc(var(--p)*16);transition:color .2s}.avatar{display:grid;place-items:center;background:#18313b;width:calc(var(--p)*46);height:calc(var(--p)*46);border-radius:calc(var(--p)*8);font-size:calc(var(--p)*27);color:#f5e9ce;transition:background .2s,transform .3s var(--ease)}.account:hover{color:white}.account:hover .avatar{background:#244551;transform:translateY(calc(var(--p)*-2))}.back-heading{position:absolute;left:var(--safe);top:calc(var(--p)*47);display:flex;align-items:center;gap:calc(var(--p)*20);z-index:5}.back-heading .icon-button{width:calc(var(--p)*28);height:calc(var(--p)*34);font-size:calc(var(--p)*26);padding:0}.back-heading h1{margin:0;font-size:calc(var(--p)*30);letter-spacing:.08em;font-weight:500;line-height:1.3}.eyebrow{font-size:calc(var(--p)*14);font-weight:500;letter-spacing:.22em;color:var(--accent);text-transform:uppercase}.page-meta{position:absolute;right:var(--safe);top:calc(var(--p)*56);display:flex;gap:calc(var(--p)*16);align-items:center;font-size:calc(var(--p)*14);letter-spacing:.1em;color:#a8b0ad}.page-meta:before{content:"";width:calc(var(--p)*24);height:1px;background:#d8c7a557}.home-menu{position:absolute;left:var(--safe);top:37%;display:flex;flex-direction:column;align-items:flex-start;gap:calc(var(--p)*17)}.home-menu button{position:relative;display:flex;align-items:center;gap:calc(var(--p)*30);height:calc(var(--p)*51);padding:0;font-size:calc(var(--p)*25);letter-spacing:.11em;color:#b5bcbb;transition:color .25s,transform .35s var(--ease)}.home-menu button:before{content:"";position:absolute;left:calc(var(--p)*-20);top:46%;width:calc(var(--p)*4);height:calc(var(--p)*4);border-radius:50%;background:var(--accent);opacity:0;transform:translateX(calc(var(--p)*-6));transition:opacity .2s,transform .3s var(--ease)}.home-menu button:hover,.home-menu button:focus-visible{color:white;transform:translateX(calc(var(--p)*5))}.home-menu button:hover:before,.home-menu button:focus-visible:before{opacity:1;transform:none}.home-menu>[data-enter="menu"]:first-child>button{color:#f3f1e9}.menu-mark{margin-left:calc(var(--p)*13);font-size:calc(var(--p)*14);color:var(--accent);opacity:0;transition:opacity .2s}.home-menu button:hover .menu-mark{opacity:1}.page-footer{position:absolute;bottom:calc(var(--p)*48);left:var(--safe);right:var(--safe);display:flex;align-items:center;justify-content:space-between;font-size:calc(var(--p)*14);color:#899590;letter-spacing:.07em}.key-hints{display:flex;gap:calc(var(--p)*24);align-items:center}.key-hints>span{display:flex;gap:calc(var(--p)*10);align-items:center}.keycap{font-size:calc(var(--p)*12);padding:calc(var(--p)*3) calc(var(--p)*6);min-width:calc(var(--p)*21);line-height:1.2;border:1px solid #b9c7c32c;color:#b4bfba;text-align:center;border-radius:calc(var(--p)*2)}.subtle-btn{display:flex;align-items:center;gap:calc(var(--p)*10);font-size:calc(var(--p)*17);color:#b4bdb7;transition:color .2s}.subtle-btn:hover{color:white}.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:calc(var(--p)*13);height:calc(var(--p)*52);min-width:calc(var(--p)*196);padding:0 calc(var(--p)*28);font-size:calc(var(--p)*20);letter-spacing:.08em;border:1px solid #e0e9e43b;border-radius:calc(var(--p)*3);background:#10191a47;color:#e0e5e0;overflow:hidden;transition:border-color .25s,background .25s,transform .2s var(--ease)}.btn svg{font-size:1.12em}.btn:hover{border-color:#edece694;background:#c6dbd40f;transform:translateY(calc(var(--p)*-2))}.btn:active{transform:translateY(0) scale(.985)}.btn-primary{background:#e6e4dc;color:#151d1f;border-color:#e6e4dc;font-weight:500}.btn-primary:hover{background:#fbfaf2;border-color:#fbfaf2}.btn-small{height:calc(var(--p)*48);min-width:calc(var(--p)*168);font-size:calc(var(--p)*18);padding:0 calc(var(--p)*22)}.cover-wordmark{position:absolute;left:65%;top:50%;width:min(59%,calc(var(--p)*1132.8));translate:-50% -50%;pointer-events:none}.cover-wordmark img{display:block;width:100%;filter:drop-shadow(0 0 14px #88edff29)}.chapter-summary{position:absolute;left:var(--safe);right:var(--safe);top:48%;display:flex;align-items:flex-end;justify-content:space-between;gap:calc(var(--p)*60)}.chapter-info{max-width:44%;min-width:0}.chapter-info h2{font-size:calc(var(--p)*58);font-weight:450;letter-spacing:.1em;line-height:1.25;margin:calc(var(--p)*17) 0 calc(var(--p)*13)}.chapter-info .chapter-desc{font-size:calc(var(--p)*18);color:#c2c8c0;letter-spacing:.1em;line-height:1.8;margin:0}.chapter-actions{display:flex;flex-shrink:0;gap:calc(var(--p)*16)}.chapter-strip{--chapter-edge-mask:linear-gradient(90deg,#0000 0%,#0000000f calc(var(--safe)*.2),#00000051 calc(var(--safe)*.4),#000000ae calc(var(--safe)*.6),#000000f0 calc(var(--safe)*.8),#000 var(--safe),#000 calc(100% - var(--safe)),#000000f0 calc(100% - var(--safe)*.8),#000000ae calc(100% - var(--safe)*.6),#00000051 calc(100% - var(--safe)*.4),#0000000f calc(100% - var(--safe)*.2),#0000 100%);position:absolute;left:0;right:0;bottom:calc(var(--p)*80);display:flex;gap:calc(var(--p)*17);padding:calc(var(--p)*38) var(--safe);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-snap-type:x proximity;scroll-padding-inline:var(--safe);-webkit-mask-image:var(--chapter-edge-mask);mask-image:var(--chapter-edge-mask)}.chapter-strip::-webkit-scrollbar{display:none}.chapter-cell{position:relative;flex:0 0 calc(var(--p)*280);scroll-snap-align:start}.chapter-card{width:calc(var(--p)*280);height:calc(var(--p)*158);padding:0;position:relative;overflow:hidden;border-radius:calc(var(--p)*12);border:1px solid #cddbd473;text-align:left;transition:transform .45s var(--ease),border-color .25s}.chapter-card:hover{transform:translateY(calc(var(--p)*-5));border-color:#f1eee4}.chapter-card img{width:100%;height:100%;object-fit:cover;display:block;opacity:.8;transition:opacity .35s,transform .6s var(--ease)}.chapter-card:hover img{opacity:1;transform:scale(1.035)}.chapter-card:after{content:"";position:absolute;left:0;right:0;bottom:0;height:65%;background:linear-gradient(transparent,#040708d9);pointer-events:none}.chapter-card .card-label{position:absolute;bottom:calc(var(--p)*16);left:calc(var(--p)*18);right:calc(var(--p)*18);z-index:1;display:flex;justify-content:center;font-size:calc(var(--p)*17);letter-spacing:.06em}.card-label small{font-size:calc(var(--p)*14);color:#b1bdb5}.small-progress{height:1px;background:#d3d9d226;width:calc(var(--p)*144);margin-top:calc(var(--p)*20)}.small-progress span{height:100%;display:block;background:var(--accent);width:22%}.tree-backdrop .scene,.settings-backdrop .scene,.saves-backdrop .scene,.profile-backdrop .scene,.affinity-backdrop .scene{filter:blur(22px) brightness(.5);transform:scale(1.06)}.tree-backdrop .scene-shade,.settings-backdrop .scene-shade,.saves-backdrop .scene-shade,.profile-backdrop .scene-shade,.affinity-backdrop .scene-shade{background:linear-gradient(90deg,#080d12e8,#080d12c7 46%,#080d1294)}.tree-layout{position:absolute;left:2.5cqw;right:2.5cqw;top:calc(var(--p)*128);bottom:calc(var(--p)*88);display:grid;grid-template-columns:minmax(0,1fr)}.tree-graph{position:relative;min-width:0;min-height:0}.tree-root{position:absolute;left:calc(var(--p)*var(--root-x));top:calc(var(--p)*var(--root-y));width:calc(var(--p)*10);height:calc(var(--p)*10);border:1px solid var(--accent);transform:rotate(45deg)}.tree-node{display:block;width:calc(var(--p)*340);aspect-ratio:16/9;padding:0;text-align:left;position:relative;border:1px solid transparent;border-radius:calc(var(--p)*12);overflow:hidden;background:#10171b;transition:border-color .25s,transform .4s var(--ease)}.tree-node:hover{border-color:#e3e6d58c;transform:translateY(calc(var(--p)*-2))}.tree-node img{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;opacity:.85}.tree-node .node-info{position:absolute;z-index:2;left:0;right:0;bottom:0;display:flex;align-items:center;gap:calc(var(--p)*12);padding:calc(var(--p)*18) calc(var(--p)*20);pointer-events:none}.node-number{display:block;flex:none;color:#bac5bd;font-family:"Helvetica Neue",Arial,sans-serif;font-size:calc(var(--p)*28);font-weight:300;letter-spacing:.01em;line-height:1;font-variant-numeric:tabular-nums}.node-info strong{display:block;flex:1;min-width:0;margin:0;font-size:calc(var(--p)*20);font-weight:400;letter-spacing:.025em;line-height:1.35;color:#e6ebe1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.node-info small{display:block;margin-top:calc(var(--p)*10);font-size:calc(var(--p)*14);color:var(--quiet)}.tree-legend{display:flex;gap:calc(var(--p)*26);font-size:calc(var(--p)*14);color:#8c9a93}.tree-legend span{display:flex;gap:calc(var(--p)*10);align-items:center}.legend-dot{width:calc(var(--p)*6);height:calc(var(--p)*6);border:1px solid #9da99c}.legend-dot.visited{background:var(--accent);border-color:var(--accent)}.settings-layout{position:absolute;left:var(--safe);right:var(--safe);top:calc(var(--p)*236);display:grid;grid-template-columns:calc(var(--p)*300) minmax(0,calc(var(--p)*910));column-gap:calc(var(--p)*130);row-gap:calc(var(--p)*30)}.section-caption{padding-top:calc(var(--p)*20);font-size:calc(var(--p)*17);letter-spacing:.13em;color:var(--accent)}.setting-row{display:grid;grid-template-columns:calc(var(--p)*160) 1fr calc(var(--p)*66);gap:calc(var(--p)*26);height:calc(var(--p)*80);align-items:center;border-bottom:1px solid var(--line);font-size:calc(var(--p)*24);font-weight:400;color:#d7ded7}.setting-row output{font-size:calc(var(--p)*20);font-variant-numeric:tabular-nums;text-align:right;color:#cbd0c8}.range{-webkit-appearance:none;appearance:none;width:100%;height:calc(var(--p)*28);padding:0;background:transparent;cursor:pointer;accent-color:var(--accent)}.range::-webkit-slider-runnable-track{height:calc(var(--p)*2);background:linear-gradient(90deg,var(--accent) var(--value,100%),#a1aea43b var(--value,100%));border-radius:0}.range::-webkit-slider-thumb{-webkit-appearance:none;width:calc(var(--p)*9);height:calc(var(--p)*13);border:0;border-radius:calc(var(--p)*1);background:#e9e6db;margin-top:calc(var(--p)*-5.5);transition:box-shadow .2s}.range:hover::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--p)*5) #d8c7a519}.range::-moz-range-track{height:2px;background:#acbaad55}.range::-moz-range-progress{background:var(--accent);height:2px}.range::-moz-range-thumb{width:8px;height:12px;background:var(--accent);border:0;border-radius:1px}.setting-row.language{border:0}.select-wrap{position:relative;grid-column:2/4}.select-button{height:calc(var(--p)*52);width:100%;padding:0 calc(var(--p)*18);border:1px solid #c9d6cd38;border-radius:calc(var(--p)*3);display:flex;align-items:center;justify-content:space-between;font-size:calc(var(--p)*20);color:#d7ded7;background:#d2e1d507;transition:background .2s,border-color .2s}.select-button:hover{border-color:#cdd9cd80;background:#d2e1d50f}.settings-note{grid-column:2;color:#7e8f84;font-size:calc(var(--p)*15);margin-top:calc(var(--p)*6);letter-spacing:.04em}.saves-layout{position:absolute;left:var(--safe);right:var(--safe);top:calc(var(--p)*216)}.section-line{display:flex;justify-content:space-between;align-items:center;margin-bottom:calc(var(--p)*30);font-size:calc(var(--p)*17);color:#93a197;letter-spacing:.07em}.saves-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:calc(var(--p)*24)}.save-card{position:relative;text-align:left;padding:0;border:1px solid #c9d8ca2b;background:#101a1e70;border-radius:calc(var(--p)*4);overflow:hidden;min-height:calc(var(--p)*390);transition:border-color .25s,transform .4s var(--ease),background .25s}.save-card:hover{border-color:#d8c7a58c;transform:translateY(calc(var(--p)*-5));background:#172226a6}.save-card.selected{border-color:#d8c7a58c}.save-cover{position:relative;height:calc(var(--p)*228);overflow:hidden}.save-cover img{width:100%;height:100%;object-fit:cover;display:block;opacity:.7;transition:transform .6s var(--ease),opacity .4s}.save-card:hover img{transform:scale(1.035);opacity:.9}.save-cover:after{content:"";position:absolute;inset:45% 0 0;background:linear-gradient(transparent,#10191e)}.save-slot{position:absolute;z-index:1;left:calc(var(--p)*24);top:calc(var(--p)*20);font-size:calc(var(--p)*13);letter-spacing:.14em;color:#d2d8cb}.save-active{position:absolute;right:calc(var(--p)*22);top:calc(var(--p)*18);font-size:calc(var(--p)*13);color:var(--accent);z-index:1}.save-info{padding:calc(var(--p)*22) calc(var(--p)*26) calc(var(--p)*28)}.save-info h2{font-size:calc(var(--p)*25);font-weight:450;letter-spacing:.08em;margin:0 0 calc(var(--p)*15)}.save-info p{margin:0;font-size:calc(var(--p)*16);color:#8f9d93;line-height:1.8}.save-info .save-bottom{display:flex;justify-content:space-between;margin-top:calc(var(--p)*22);font-size:calc(var(--p)*14);color:#7a8c80}.save-info strong{color:#c8d3c4;font-weight:400}.empty-save{display:grid;place-items:center;text-align:center;color:#718278}.empty-save .plus{display:block;font-size:calc(var(--p)*40);font-weight:200;margin-bottom:calc(var(--p)*16);color:#bdcabd}.empty-save small{font-size:calc(var(--p)*16)}.profile-card{position:absolute;left:var(--safe);top:32%;width:calc(var(--p)*1150);display:grid;grid-template-columns:calc(var(--p)*180) 1fr;gap:calc(var(--p)*64);align-items:start}.profile-avatar{width:calc(var(--p)*180);height:calc(var(--p)*180);display:grid;place-items:center;background:#18313bd9;border:1px solid #adc7bc29;border-radius:calc(var(--p)*6);font-size:calc(var(--p)*90);color:#e4dbc6}.profile-copy h2{font-size:calc(var(--p)*42);font-weight:450;margin:0 0 calc(var(--p)*14);letter-spacing:.07em}.profile-copy .profile-id{font-size:calc(var(--p)*15);color:#7c8d83;letter-spacing:.07em}.profile-stats{display:flex;gap:calc(var(--p)*72);margin:calc(var(--p)*40) 0;list-style:none;padding:0}.profile-stats li{font-size:calc(var(--p)*16);color:#82958a}.profile-stats strong{display:block;margin-bottom:calc(var(--p)*8);font-size:calc(var(--p)*29);font-variant-numeric:tabular-nums;font-weight:400;color:#dce4d8}.modal-scrim{position:absolute;inset:0;z-index:10;background:#05090db8;backdrop-filter:blur(10px);display:grid;place-items:center}.modal{width:calc(var(--p)*650);padding:calc(var(--p)*54);background:linear-gradient(135deg,#1b2528f5,#10191ef5);border:1px solid #cbd8cc29;border-radius:calc(var(--p)*5);box-shadow:0 30px 100px #0004}.modal .eyebrow{font-size:calc(var(--p)*13)}.modal h2{font-size:calc(var(--p)*32);font-weight:450;letter-spacing:.08em;margin:calc(var(--p)*20) 0}.modal p{font-size:calc(var(--p)*20);line-height:1.8;color:#98a99c;margin:0 0 calc(var(--p)*36)}.modal-actions{display:flex;justify-content:flex-end;gap:calc(var(--p)*14)}.modal-actions .btn{min-width:0;flex:1}.splash-logo{position:absolute;left:50%;top:43%;translate:-50% -50%;width:calc(var(--p)*250)}.splash-logo img{width:100%}.splash-start{position:absolute;left:50%;top:69%;translate:-50% 0;font-size:calc(var(--p)*18);letter-spacing:.28em;color:#d0d7cf;display:flex;align-items:center;gap:calc(var(--p)*25);padding:calc(var(--p)*20);white-space:nowrap}.splash-start:before,.splash-start:after{content:"";width:calc(var(--p)*28);height:1px;background:#d8c7a55e}.splash-start span{animation:breathe 3s ease-in-out infinite}.splash-copy{position:absolute;left:50%;bottom:calc(var(--p)*54);translate:-50% 0;font-size:calc(var(--p)*12);letter-spacing:.18em;color:#718079}.game-frame[data-page="splash"] .scene-shade{background:#060b0ec9}.game-hud{position:absolute;left:var(--safe);right:var(--safe);top:calc(var(--p)*46);display:flex;justify-content:space-between;align-items:center;z-index:3}.hud-scene{font-size:calc(var(--p)*14);letter-spacing:.15em;color:#d3ddd1;display:flex;align-items:center;gap:calc(var(--p)*18)}.hud-scene:before{content:"";width:calc(var(--p)*4);height:calc(var(--p)*4);border-radius:50%;background:var(--accent)}.hud-actions{display:flex;gap:calc(var(--p)*8)}.game-frame[data-page="gameplay"] .scene-shade,.game-frame[data-page="choice"] .scene-shade,.game-frame[data-page="qte"] .scene-shade{background:linear-gradient(0deg,#050b10eb,transparent 52%,#050b1080)}.subtitle{position:absolute;bottom:calc(var(--p)*190);left:50%;translate:-50% 0;text-align:center;width:70%;font-size:calc(var(--p)*27);line-height:1.8;letter-spacing:.08em;text-shadow:0 2px 15px #000}.subtitle .speaker{display:block;font-size:calc(var(--p)*15);color:var(--accent);letter-spacing:.16em;margin-bottom:calc(var(--p)*10)}.playback-bar{position:absolute;left:var(--safe);right:var(--safe);bottom:calc(var(--p)*53);display:flex;justify-content:space-between;align-items:center;font-size:calc(var(--p)*15);color:#b2bfb3}.playback-track{height:1px;width:calc(var(--p)*320);background:#cbd7cc26;position:relative}.playback-track span{display:block;width:28%;height:100%;background:#d8c7a5}.playback-status{display:flex;align-items:center;gap:calc(var(--p)*20)}.play-control{display:flex;align-items:center;gap:calc(var(--p)*9);font-size:calc(var(--p)*16);color:#bac6b9}.play-control:hover{color:white}.play-control svg{font-size:calc(var(--p)*22)}.pause-menu{position:absolute;left:var(--safe);top:29%;width:calc(var(--p)*380)}.pause-menu h1{font-size:calc(var(--p)*42);font-weight:450;margin:calc(var(--p)*20) 0 calc(var(--p)*40);letter-spacing:.09em}.pause-list{display:grid;gap:calc(var(--p)*7)}.pause-list button{text-align:left;display:flex;align-items:center;justify-content:space-between;height:calc(var(--p)*60);border-bottom:1px solid #d5decc17;font-size:calc(var(--p)*23);color:#b7c4b5;padding:0;transition:color .2s,padding .3s var(--ease)}.pause-list button:hover{color:white;padding-left:calc(var(--p)*7)}.pause-list button svg{font-size:calc(var(--p)*16);opacity:.5}.choice-panel{position:absolute;left:50%;translate:-50% 0;bottom:calc(var(--p)*140);width:calc(var(--p)*850);text-align:center}.choice-panel h2{font-size:calc(var(--p)*28);font-weight:400;letter-spacing:.1em;margin:calc(var(--p)*18) 0 calc(var(--p)*30)}.choice-options{display:flex;gap:calc(var(--p)*16);flex-direction:column}.choice-option{position:relative;width:100%;height:calc(var(--p)*58);text-align:left;display:flex;align-items:center;padding:0 calc(var(--p)*24);border:1px solid #d6e2d04d;border-radius:calc(var(--p)*3);background:#122026ae;backdrop-filter:blur(8px);font-size:calc(var(--p)*22);letter-spacing:.07em;overflow:hidden;transition:background .25s,border-color .25s,transform .35s var(--ease)}.choice-option:hover{background:#263731d9;border-color:#e3ddc6a3;transform:translateX(calc(var(--p)*5))}.choice-number{font-size:calc(var(--p)*14);color:var(--accent);width:calc(var(--p)*42)}.choice-arrow{margin-left:auto;color:var(--accent);font-size:calc(var(--p)*18)}.choice-time{margin-top:calc(var(--p)*25);height:1px;position:relative;background:#d1dcd12e}.choice-time span{display:block;width:100%;height:1px;background:var(--accent);transform-origin:left}.choice-meta{display:flex;align-items:center;justify-content:space-between;font-size:calc(var(--p)*13);color:#889b8d;margin-top:calc(var(--p)*12);letter-spacing:.08em}.qte-widget{position:absolute;left:69%;top:49%;translate:-50% -50%;display:flex;flex-direction:column;align-items:center;gap:calc(var(--p)*22)}.qte-ring{position:relative;width:calc(var(--p)*144);height:calc(var(--p)*144)}.qte-ring svg{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg);stroke-width:1.6}.qte-ring circle:first-child{stroke:#c9d8c735}.qte-ring circle:last-child{stroke:var(--accent);stroke-dasharray:352;stroke-dashoffset:0}.qte-key{position:absolute;inset:calc(var(--p)*23);border:1px solid #d6dfd075;border-radius:50%;background:#11202aa6;backdrop-filter:blur(5px);display:grid;place-items:center;font-size:calc(var(--p)*42);font-weight:450;transition:background .2s,transform .25s var(--ease)}.qte-key:hover{background:#304237bd;transform:scale(.96)}.qte-label{font-size:calc(var(--p)*21);letter-spacing:.14em;color:#e4e9df}.qte-tip{font-size:calc(var(--p)*14);color:#a0b49f}.result-layout{position:absolute;left:var(--safe);top:31%;width:calc(var(--p)*750)}.result-layout h1{font-size:calc(var(--p)*67);font-weight:350;letter-spacing:.15em;margin:calc(var(--p)*22) 0}.result-layout>p{font-size:calc(var(--p)*20);color:#aebcac;line-height:1.9;letter-spacing:.08em}.result-stats{display:flex;gap:calc(var(--p)*70);margin:calc(var(--p)*45) 0}.result-stats dt{font-size:calc(var(--p)*14);letter-spacing:.1em;color:#849681;margin-bottom:calc(var(--p)*12)}.result-stats dd{margin:0;font-size:calc(var(--p)*32);color:#d8dfce;font-weight:300;font-variant-numeric:tabular-nums}.result-actions{display:flex;gap:calc(var(--p)*16)}.toast{position:absolute;z-index:30;bottom:calc(var(--p)*90);left:50%;translate:-50% 0;display:flex;align-items:center;gap:calc(var(--p)*14);padding:calc(var(--p)*16) calc(var(--p)*26);border:1px solid #d1dec726;background:#142026ed;backdrop-filter:blur(12px);font-size:calc(var(--p)*17);color:#d4e1cd;opacity:0;pointer-events:none}.toast svg{color:var(--accent);font-size:calc(var(--p)*18)}.review-toggle{position:fixed;bottom:12px;right:14px;z-index:60;display:flex;align-items:center;gap:9px;padding:7px 11px;border:1px solid #a8beb22b;border-radius:5px;background:#0d171ad9;color:#84958b;font-size:11px;opacity:.58;transition:opacity .2s,color .2s}.review-toggle:hover{opacity:1;color:white}.review-toggle span{font-size:12px;color:#c7d7ba}.review-panel{position:fixed;z-index:70;right:14px;bottom:53px;width:276px;padding:18px;background:#0f1a1ef7;border:1px solid #bfceb52b;box-shadow:0 15px 70px #0009;border-radius:7px;font-size:12px;max-height:calc(100vh - 80px);overflow:auto}.review-panel[hidden]{display:none}.review-heading{display:flex;align-items:center;justify-content:space-between;font-size:13px}.review-heading strong{font-weight:500}.review-heading button{font-size:21px;color:#8da28e}.review-panel p{font-size:10px;color:#75917a;margin:7px 0 14px}.review-panel nav{display:grid;grid-template-columns:1fr 1fr;gap:5px}.review-panel nav button{padding:9px;text-align:left;color:#a0b49f;font-size:11px;border-radius:3px;border:1px solid transparent}.review-panel nav button:hover,.review-panel nav button[aria-current=page]{background:#cbdbbd0e;border-color:#cbdbbd20;color:#e5eadf}.review-panel nav small{font-size:9px;color:#647e69;margin-right:6px}.review-actions{display:grid;gap:10px;border-top:1px solid #bfceb517;margin-top:15px;padding-top:14px;font-size:11px;color:#bccbb4}.review-actions button{text-align:left;padding:0;font-size:11px}.capture .review-toggle,.capture .review-panel{display:none!important}@keyframes breathe{0%,100%{opacity:.45}50%{opacity:.95}}@keyframes scene-drift{from{transform:scale(1)}to{transform:scale(1.025)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
.saves-grid{max-width:calc(var(--p)*1480)}.save-shell{position:relative}.save-shell>.save-card{width:100%;height:100%}.delete-save{position:absolute;right:calc(var(--p)*20);bottom:calc(var(--p)*26);width:calc(var(--p)*30);height:calc(var(--p)*30);display:grid;place-items:center;font-size:calc(var(--p)*18);color:#819586;opacity:0;transition:color .2s,opacity .2s}.save-shell:hover .delete-save,.save-shell:focus-within .delete-save{opacity:1}.delete-save:hover{color:#dca49b}.save-bottom{padding-right:calc(var(--p)*38)}.empty-note{font-size:calc(var(--p)*14);color:#60776a;margin-top:calc(var(--p)*14)}.time-toggle{font-size:calc(var(--p)*13);color:#a9bfa9;padding:0}.time-toggle:hover{color:#f1f1e9}.qte-subtitle{bottom:calc(var(--p)*170)}.review-panel svg{width:13px;height:13px}

.left-blur{display:none;position:absolute;z-index:-3;inset:0 auto 0 0;width:65%;pointer-events:none;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);mask-image:linear-gradient(90deg,#000 15%,#000a 48%,transparent);-webkit-mask-image:linear-gradient(90deg,#000 15%,#000a 48%,transparent)}.game-frame[data-page="home"] .left-blur,.game-frame[data-page="cover"] .left-blur{display:block}

/* Chapter actions retain the original capsule and glass highlights at the reduced size. */
.chapter-actions .btn{border-radius:999px;border-color:rgba(239,246,247,.55);background:rgba(12,17,19,.15);color:#f0f2ee;font-weight:400;letter-spacing:.04em;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}
.chapter-actions .btn svg{font-size:calc(var(--p)*23)}
.chapter-actions .btn:hover{background:rgba(227,240,244,.1);border-color:rgba(247,251,252,.85)}
.chapter-card.is-locked:disabled{opacity:1;cursor:default;border-color:rgba(201,217,211,.2)}
.chapter-card.is-locked img{opacity:.48;filter:saturate(.4) brightness(.75)}
.chapter-card.is-locked .card-label{color:#9ca6a2}.chapter-card.is-locked .card-label small{font-size:calc(var(--p)*15);color:#8d9b93}
.chapter-card.is-locked:disabled:hover{transform:none}.chapter-card.is-locked:disabled:hover img{transform:none;opacity:.48}
/* Interactive chapter rail and independent scene transitions. */
.scene>img.chapter-background{position:absolute;inset:0;will-change:opacity,transform}
.chapter-info{will-change:opacity,transform}.small-progress span{transition:width .45s var(--ease)}
.chapter-strip{cursor:grab;touch-action:pan-x}.chapter-strip.is-dragging,.chapter-strip.is-dragging *{cursor:grabbing!important;user-select:none}.chapter-strip.is-dragging,.chapter-strip.is-scrolling{scroll-snap-type:none}
.chapter-card{display:block;border-color:rgba(201,217,211,.24);transition:transform .45s var(--ease),border-color .25s,box-shadow .4s}.chapter-card img{opacity:.65;pointer-events:none}.chapter-card .card-label{z-index:2;pointer-events:none}.chapter-card.is-selected img{opacity:.98}.chapter-card:active{transform:translateY(calc(var(--p)*-2)) scale(.985)}
.chapter-rail-arrow{position:absolute;z-index:3;top:81.5%;translate:0 -50%;width:calc(var(--p)*40);height:calc(var(--p)*40);display:grid;place-items:center;border:1px solid rgba(214,229,219,.24);border-radius:50%;background:rgba(10,17,20,.5);backdrop-filter:blur(10px);font-size:calc(var(--p)*22);color:#dce4d7;transition:background .2s,border-color .2s,opacity .2s}.chapter-rail-arrow:hover{background:rgba(194,216,200,.14);border-color:rgba(221,238,217,.6)}.chapter-rail-arrow-left{left:1.2%}.chapter-rail-arrow-right{right:1.2%}.chapter-rail-arrow-right svg{rotate:180deg}.chapter-rail-arrow:disabled{opacity:.18;cursor:default}
.chapter-browse-meta{display:flex;gap:calc(var(--p)*24);align-items:center}.chapter-browse-meta>span:last-child{color:#718379;font-size:calc(var(--p)*13)}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.sound-setting{height:calc(var(--p)*66);border-bottom:0}.sound-controls{grid-column:2/4;display:flex;justify-content:flex-end;align-items:center}.sound-state-button{min-width:calc(var(--p)*100);height:calc(var(--p)*44);display:flex;gap:calc(var(--p)*12);align-items:center;justify-content:flex-end;font-size:calc(var(--p)*19);color:#becdbd;padding:0}.sound-indicator{display:inline-block;width:6px;height:6px;flex:none;border-radius:50%;background:#a5bca6;transition:background .2s}.sound-setting .sound-indicator{width:calc(var(--p)*7);height:calc(var(--p)*7)}[data-action="sound-toggle"][aria-pressed="false"] .sound-indicator{background:#59635e}.sound-state-button:hover,.sound-audition:hover{color:#f1f2e8}.sound-audition{display:flex;align-items:center;gap:calc(var(--p)*9);height:calc(var(--p)*44);font-size:calc(var(--p)*17);color:#9faf9f;padding:0 calc(var(--p)*8)}.sound-audition svg{font-size:calc(var(--p)*21)}.review-sound{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #bfceb517;margin-top:14px;padding-top:12px;gap:12px}.review-sound button{display:flex;align-items:center;gap:8px;font-size:11px;color:#a9bda8;padding:3px 0}.review-sound button:hover{color:#edf1e4}.review-panel .sound-status{margin:6px 0 0;font-size:10px;color:#6e8575}

.sound-toggle-button[aria-pressed="false"]{color:#879397}
.sound-toggle-button[aria-pressed="false"]:hover{color:#fff}
.sound-toggle-button:active{transform:scale(.94)}

.back-heading .back-button{color:#c8d2d1;background:transparent;box-shadow:none}
.back-heading .back-button svg{width:calc(var(--p)*35);height:calc(var(--p)*36);filter:none;transition:filter .25s var(--soft)}
.back-heading .back-button:is(:hover,:active,:focus-visible){color:#f0faff;background:transparent;box-shadow:none}
.back-heading .back-button:focus-visible{outline:none}
.back-heading .back-button:is(:hover,:focus-visible) svg{filter:drop-shadow(0 0 calc(var(--p)*4) #e5faff66)}
.back-heading .back-button:active svg{filter:drop-shadow(0 0 calc(var(--p)*6) #e5faffa6);transition:filter .1s ease-out}
.tree-node:after{content:"";position:absolute;z-index:1;inset:25% 0 0;background:linear-gradient(transparent,#03070980 48%,#030709ec);pointer-events:none}


/* Connected story preview; reference card size stays 340 x 191.25. */
.tree-board{position:relative;flex:none;width:calc(var(--p)*var(--tree-board-width));height:calc(var(--p)*var(--tree-board-height))}
.tree-node-cell{position:absolute;left:calc(var(--p)*var(--node-x));top:calc(var(--p)*var(--node-y));width:calc(var(--p)*340)}

.tree-connections{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;fill:none}
.tree-link,.tree-origin-line{stroke:#84948880;stroke-width:1.3;fill:none}
.tree-link,.tree-route{stroke-dasharray:1;stroke-dashoffset:0}
.tree-route{stroke:#dbd3b8;stroke-width:1.8;fill:none;opacity:0;transition:opacity .4s var(--soft)}
.tree-route.is-active{opacity:1}
.tree-node img{opacity:.64;filter:saturate(.74);transition:opacity .45s var(--soft),filter .45s var(--soft)}
.tree-node.is-route{border-color:#c9cfaa70}
.chapter-card.is-selected,.tree-node.is-selected{border-color:#f6efd5;box-shadow:0 0 0 1px #eee6cb5c,0 0 calc(var(--p)*22) #e7f0d23d,0 0 calc(var(--p)*48) #bedce526}
.tree-node.is-selected img,.tree-node:hover img{opacity:.98;filter:saturate(.94)}

.legend-route{display:block;width:calc(var(--p)*20);height:1px;background:#dbd3b8}

.tree-node{transition:border-color .35s,transform .4s var(--ease),box-shadow .4s var(--ease)}

/* The graph uses the full available width and pans on both axes. */
.tree-viewport{width:100%;height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior:contain;touch-action:pan-x pan-y;cursor:grab;user-select:none}
.tree-viewport::-webkit-scrollbar{display:none;width:0;height:0}
.tree-viewport.is-dragging,.tree-viewport.is-dragging *{cursor:grabbing!important}
.tree-viewport.is-dragging .tree-node{transform:none}
.tree-legend .tree-browse-tip{color:#748378;font-size:calc(var(--p)*13);margin-left:calc(var(--p)*5)}

/* Per-fragment progress, locked branches and a soft selection glow. */
.chapter-card:before,.tree-node:before{content:"";position:absolute;z-index:1;inset:0;border-radius:inherit;background:linear-gradient(135deg,#fff6d51f,transparent 45%,#c7e8ed17);opacity:0;pointer-events:none;transition:opacity .4s}
.chapter-card.is-selected:before,.tree-node.is-selected:before{opacity:1}
/* Selected cards use their existing glow as the keyboard focus indicator. */
.chapter-card:focus-visible,.tree-node:focus-visible{outline:none;outline-offset:0}
/* Stack the node number above its name; explored progress stays beside the name. */
.tree-node .node-info{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:calc(var(--p)*12);row-gap:calc(var(--p)*8)}
.node-number{grid-column:1;grid-row:1}
.node-info strong{grid-column:1;grid-row:2}
.node-progress{position:relative;z-index:3;grid-column:2;grid-row:2;align-self:center;width:calc(var(--p)*48);display:grid;gap:calc(var(--p)*7);color:#adb9b0;pointer-events:none}

.node-progress-track{display:block;width:100%;height:1px;background:#c9d4c51f;border-radius:1px;overflow:hidden}
.node-progress-fill{display:block;height:100%;background:#b5c2ae9c;border-radius:inherit;transition:width .45s var(--ease),background .4s}
.node-progress-value{display:block;text-align:right;font-size:calc(var(--p)*12);font-weight:400;letter-spacing:.04em;line-height:1;font-variant-numeric:tabular-nums}

.tree-node-cell.is-locked{cursor:not-allowed}
.tree-node.is-locked:disabled{opacity:1;pointer-events:none;border-color:#c4d4ca1f;box-shadow:none;transform:none}
/* Explored cards stay lit independently of the current selection. */
.tree-node.is-explored:not(.is-selected):not(:hover) img{opacity:.92;filter:saturate(.94) brightness(1.03)}
.tree-node.is-locked:disabled img{opacity:.29;filter:grayscale(.65) brightness(.8)}
.tree-node.is-locked .node-number,.tree-node.is-locked .node-info strong{color:#8b9790}
.tree-node.is-locked .node-progress{color:#7f8b83}
.tree-node.is-locked .node-progress-fill{opacity:0}
.node-lock{position:absolute;z-index:2;left:50%;top:43%;translate:-50% -50%;display:grid;place-items:center;width:calc(var(--p)*38);height:calc(var(--p)*38);border:1px solid #d3ded326;border-radius:calc(var(--p)*9);background:#091115a6;color:#a8b7aa;pointer-events:none}
.node-lock svg{font-size:calc(var(--p)*22);stroke-width:1.3}
.tree-legend svg{font-size:calc(var(--p)*15);color:#8e9c92}

/* Keep focus navigation inside the graph from scrolling the outer stage. */
.game-frame[data-page="tree"]{overflow:clip}

.tree-node.is-selected .node-progress{color:#d3ddca}
.tree-node.is-selected .node-progress-fill{background:#d3dec5c4}
.tree-node.is-selected .node-number{color:#e5eadc}
.tree-node.is-locked .node-progress-track{opacity:.55}

.tree-viewport::-webkit-scrollbar-corner{background:transparent}

/* Transparent edge falloff keeps the scene visible without an inset shadow. */
.tree-viewport{--tree-mask-x:linear-gradient(to right,#0000 0,#0000000f calc(var(--tree-fade-left,0px)*0.2),#00000051 calc(var(--tree-fade-left,0px)*0.4),#000000ae calc(var(--tree-fade-left,0px)*0.6),#000000f0 calc(var(--tree-fade-left,0px)*0.8),#000 var(--tree-fade-left,0px),#000 calc(100% - var(--tree-fade-right,0px)),#000000f0 calc(100% - var(--tree-fade-right,0px)*0.8),#000000ae calc(100% - var(--tree-fade-right,0px)*0.6),#00000051 calc(100% - var(--tree-fade-right,0px)*0.4),#0000000f calc(100% - var(--tree-fade-right,0px)*0.2),#0000 100%);--tree-mask-y:linear-gradient(to bottom,#0000 0,#0000000f calc(var(--tree-fade-top,0px)*0.2),#00000051 calc(var(--tree-fade-top,0px)*0.4),#000000ae calc(var(--tree-fade-top,0px)*0.6),#000000f0 calc(var(--tree-fade-top,0px)*0.8),#000 var(--tree-fade-top,0px),#000 calc(100% - var(--tree-fade-bottom,0px)),#000000f0 calc(100% - var(--tree-fade-bottom,0px)*0.8),#000000ae calc(100% - var(--tree-fade-bottom,0px)*0.6),#00000051 calc(100% - var(--tree-fade-bottom,0px)*0.4),#0000000f calc(100% - var(--tree-fade-bottom,0px)*0.2),#0000 100%);-webkit-mask-image:var(--tree-mask-x),var(--tree-mask-y);mask-image:var(--tree-mask-x),var(--tree-mask-y);-webkit-mask-composite:source-in;mask-composite:intersect;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}

/* Tall slanted portraits dissolve independently of the crisp names and hearts. */
.affinity-layout{position:absolute;z-index:1;left:50%;top:52%;width:calc(var(--p)*1480);max-width:calc(100% - var(--safe)*2);translate:-50% -50%;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:calc(var(--p)*20)}
.affinity-cell{position:relative;min-width:0}
.affinity-card{position:relative;z-index:1;display:block;width:100%;height:calc(var(--p)*760);padding:0;overflow:visible;text-align:left;border:1px solid transparent;border-radius:calc(var(--p)*10);background:transparent;transform:skewX(-5.5deg);transition:transform .4s var(--ease)}
.affinity-card:focus-visible{outline:none}
.affinity-card:hover{transform:translateY(calc(var(--p)*-3)) skewX(-5.5deg)}
.affinity-surface{position:absolute;inset:-1px;overflow:hidden;border:1px solid #d3ddcf47;border-radius:inherit;background:#0a1114;box-shadow:inset 0 0 calc(var(--p)*18) #07101433;pointer-events:none;transition:border-color .4s,box-shadow .4s;-webkit-mask-image:linear-gradient(#000 0%,#000 66%,#000000f5 76%,#000000c2 85%,#0000006b 92%,#0000001f 97%,#0000 100%);mask-image:linear-gradient(#000 0%,#000 66%,#000000f5 76%,#000000c2 85%,#0000006b 92%,#0000001f 97%,#0000 100%);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
.affinity-card.is-selected .affinity-surface{border-color:#f3efdcba;box-shadow:inset 0 0 0 1px #eee6cb26,inset 0 0 calc(var(--p)*24) #cde1d71a}
.affinity-card:hover .affinity-surface,.affinity-card:focus-visible .affinity-surface{border-color:#f6efd5e6}
.affinity-art{position:absolute;inset:0;overflow:hidden;opacity:0;transform:scale(1.005);transform-origin:center;transition:transform 1s var(--soft),opacity .7s var(--soft);-webkit-mask-image:linear-gradient(#000 0%,#000 53%,#000000ed 60%,#0000009c 69%,#00000030 76%,#0000 80%);mask-image:linear-gradient(#000 0%,#000 53%,#000000ed 60%,#0000009c 69%,#00000030 76%,#0000 80%)}
.affinity-art.is-ready{opacity:1}
.affinity-art img{position:absolute;display:block;max-width:none;width:calc(var(--p)*280*1920/314);height:auto;left:calc(var(--p)*280*var(--source-x)/-314);top:calc(var(--p)*280*var(--source-y)/-314);transform:matrix(1,0,.096,1,0,0);transform-origin:0 0;filter:saturate(.86) brightness(.82);transition:filter .55s var(--soft);user-select:none;-webkit-user-drag:none}
.affinity-card.is-selected .affinity-art{transform:scale(1.025)}
.affinity-card.is-selected .affinity-art img,.affinity-card:hover .affinity-art img{filter:saturate(.92) brightness(.98)}
.affinity-surface:before{content:"";position:absolute;inset:0;z-index:2;background:linear-gradient(135deg,#e8f0dc12,transparent 58%);opacity:0;transition:opacity .4s}
.affinity-card.is-selected .affinity-surface:before{opacity:1}
.affinity-surface:after{content:"";position:absolute;inset:44% 0 0;z-index:2;background:linear-gradient(transparent,#080e1257 45%,#080e12ba 80%,#080e12)}
.affinity-card-info{position:absolute;z-index:3;left:calc(var(--p)*22);right:calc(var(--p)*22);bottom:calc(var(--p)*72);display:flex;flex-direction:column;gap:calc(var(--p)*13);transform:skewX(5.5deg)}
.affinity-name{font-size:calc(var(--p)*22);line-height:1.25;font-weight:500;font-style:italic;letter-spacing:.025em;color:#c9d3c8;transition:color .35s}
.affinity-card.is-selected .affinity-name{color:#f0f0e6}
.affinity-hearts{display:flex;gap:calc(var(--p)*7);color:#d1dcc574}
.affinity-heart{position:relative;display:block;flex:none;width:calc(var(--p)*20);height:calc(var(--p)*20)}
.affinity-heart>svg{width:100%;height:100%}
.affinity-heart-fill{position:absolute;left:0;top:0;height:100%;overflow:hidden;color:#d9e1cc;opacity:.72;transition:opacity .4s,color .4s}
.affinity-heart-fill svg{position:absolute;left:0;top:0;width:calc(var(--p)*20);height:calc(var(--p)*20);fill:currentColor;stroke:none}
.affinity-card.is-selected .affinity-heart-fill{opacity:1;color:#f0f0e3}
.affinity-card.is-selected + .affinity-dust{opacity:1}
.affinity-dust{transform:skewX(-5.5deg)}
.affinity-card.is-selected + .affinity-dust i{animation-play-state:running;will-change:transform,opacity}
.affinity-fragments{position:absolute;z-index:4;top:0;right:calc(var(--p)*2);width:calc(var(--p)*18);height:calc(var(--p)*2);opacity:.55;pointer-events:none;transition:opacity .4s}
.affinity-fragments i{--fragment-x:0;--fragment-y:0;--fragment-size:12;position:absolute;right:0;top:0;display:block;width:calc(var(--p)*var(--fragment-size));height:calc(var(--p)*var(--fragment-size));background:#f1f1df;opacity:0;box-shadow:0 0 calc(var(--p)*6) #eef0d925;animation:affinity-corner-dissolve 5.4s linear calc(-1.6s - var(--affinity-order)*.37s) infinite}
.affinity-fragments i:nth-child(2){--fragment-x:5;--fragment-y:-13;--fragment-size:8;animation-delay:calc(-3.4s - var(--affinity-order)*.43s)}
.affinity-fragments i:nth-child(3){--fragment-x:10;--fragment-y:-26;--fragment-size:6;animation-delay:calc(-.3s - var(--affinity-order)*.59s)}
.affinity-card.is-selected .affinity-fragments{opacity:1}
.affinity-glint{position:absolute;z-index:4;left:0;top:0;translate:-50% -50%;width:calc(var(--p)*32);height:calc(var(--p)*32);opacity:0;pointer-events:none;transition:opacity .4s;filter:drop-shadow(0 0 calc(var(--p)*6) #f1efca80)}
.affinity-glint:before{content:"";position:absolute;inset:0;background:#f4f2df;clip-path:polygon(50% 0,55% 43%,100% 50%,55% 57%,50% 100%,45% 57%,0 50%,45% 43%)}
.affinity-card.is-selected .affinity-glint{animation:affinity-corner-glint 6.6s ease-in-out infinite}
@keyframes affinity-corner-dissolve{0%{opacity:0;transform:translate3d(calc(var(--p)*var(--fragment-x)),calc(var(--p)*var(--fragment-y)),0) scale(1) rotate(9deg)}18%{opacity:.78}55%{opacity:.4}100%{opacity:0;transform:translate3d(calc(var(--p)*(var(--fragment-x) + 9)),calc(var(--p)*(var(--fragment-y) - 28)),0) scale(.42) rotate(16deg)}}
@keyframes affinity-corner-glint{0%,100%{opacity:.38;transform:scale(.83)}50%{opacity:.95;transform:scale(1.12)}}

/* The affinity page has its own quiet light field, behind every card and label. */
.affinity-backdrop .scene{filter:blur(28px) brightness(.42) saturate(.45)}
.affinity-backdrop .scene-shade{background:linear-gradient(180deg,#081113a3,#071015d9 70%,#05090bf2)}
.affinity-atmosphere{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;background:radial-gradient(ellipse at 75% 5%,#baa66a12,transparent 66%),linear-gradient(0deg,#02060926,transparent 65%)}
.affinity-ambient{position:absolute;inset:-26%;pointer-events:none}
.affinity-ambient--warm{opacity:.65;background:radial-gradient(ellipse at 78% 22%,#e2ce8757,#c3a95125 32%,transparent 58%);animation:affinity-warm-drift 12s ease-in-out -2s infinite}
.affinity-ambient--cool{inset:-22%;opacity:.5;background:radial-gradient(ellipse at 22% 48%,#76a3a13b,#4b7e8118 30%,transparent 54%);animation:affinity-cool-drift 16s ease-in-out -7s infinite}
.affinity-rays{position:absolute;inset:-22%;opacity:.4;pointer-events:none;background:linear-gradient(117deg,transparent 33%,#f8e3a500 40%,#f8e3a51a 47%,#fff1c026 50%,#f8e3a508 55%,transparent 62%),linear-gradient(117deg,transparent 58%,#d4dcb80d 65%,transparent 72%);animation:affinity-rays-drift 18s ease-in-out -4s infinite}
.affinity-wireframe{position:absolute;inset:0;width:100%;height:100%;stroke:#bfcbb7;stroke-width:.7;opacity:.15;fill:none;-webkit-mask-image:linear-gradient(transparent 32%,#0000004d 50%,#000000cc 74%,#0000008c 88%,transparent);mask-image:linear-gradient(transparent 32%,#0000004d 50%,#000000cc 74%,#0000008c 88%,transparent)}
.affinity-wireframe path{vector-effect:non-scaling-stroke;opacity:.5}
.affinity-wireframe path.is-major{opacity:1}
.affinity-grid-depth{opacity:.9}
.affinity-grid-cross{opacity:.7}
.affinity-orb{--orb-strength:1;position:absolute;display:block;left:93%;top:4.6%;width:calc(var(--p)*58);height:calc(var(--p)*58);border-radius:50%;background:radial-gradient(circle,#d7e7cd22,#b9ceaf0d 42%,transparent 70%);filter:blur(calc(var(--p)*2));animation:affinity-orb-drift 17s ease-in-out -2s infinite}
.affinity-orb:nth-last-child(2){--orb-strength:.62;left:90%;top:2%;width:calc(var(--p)*24);height:calc(var(--p)*24);animation-duration:13s;animation-delay:-7s}
.affinity-orb:last-child{--orb-strength:.4;left:96%;top:10%;width:calc(var(--p)*115);height:calc(var(--p)*115);filter:blur(calc(var(--p)*7));animation-duration:21s;animation-delay:-13s}
@keyframes affinity-warm-drift{0%,100%{opacity:.48;transform:translate3d(-3%,-2%,0) scale(.97)}28%{opacity:.82;transform:translate3d(-9%,3%,0) scale(1.04)}60%{opacity:.94;transform:translate3d(2%,8%,0) scale(1.12)}82%{opacity:.68;transform:translate3d(6%,2%,0) scale(1.04)}}
@keyframes affinity-cool-drift{0%,100%{opacity:.42;transform:translate3d(0,3%,0) scale(1)}50%{opacity:.85;transform:translate3d(7%,-4%,0) scale(1.12)}}
@keyframes affinity-rays-drift{0%,100%{opacity:.25;transform:translate3d(-9%,0,0) rotate(-2deg)}50%{opacity:.7;transform:translate3d(9%,3%,0) rotate(2deg)}}
@keyframes affinity-orb-drift{0%,100%{opacity:calc(var(--orb-strength)*.45);transform:translate3d(calc(var(--p)*-10),calc(var(--p)*-10),0)}50%{opacity:calc(var(--orb-strength)*.9);transform:translate3d(calc(var(--p)*-72),calc(var(--p)*48),0)}}
@media(prefers-reduced-motion:reduce){.affinity-ambient,.affinity-rays,.affinity-orb,.affinity-card.is-selected .affinity-glint{animation:none}.affinity-ambient--warm{opacity:.65}.affinity-ambient--cool{opacity:.5}.affinity-rays{opacity:.3}.affinity-orb{opacity:var(--orb-strength)}.affinity-fragments i{animation:none;opacity:.3;transform:translate3d(calc(var(--p)*var(--fragment-x)),calc(var(--p)*var(--fragment-y)),0) rotate(9deg)}.affinity-card.is-selected .affinity-glint{opacity:.72}}

/* All selected cards share rear dust with near, middle and far depth groups. */
.chapter-cell,.tree-node-cell,.affinity-cell{isolation:isolate}
.chapter-card,.tree-node{z-index:1;background-color:#10171b}
.node-dust{position:absolute;z-index:0;inset:calc(var(--p)*-26);opacity:0;pointer-events:none;user-select:none;transition:opacity .4s var(--soft)}
.node-dust i{--dust-strength:.65;--dust-spread:1;--dust-drift-scale:1;position:absolute;display:block;width:calc(var(--p)*var(--dust-size)*var(--dust-spread));height:calc(var(--p)*var(--dust-size)*var(--dust-spread));border-radius:50%;background:#e5ebda;box-shadow:0 0 calc(var(--p)*4) #dce8cf40;filter:blur(calc(var(--p)*.25));opacity:0;animation:story-dust-drift var(--dust-duration) linear var(--dust-delay) infinite both;animation-play-state:paused}
.node-dust i:nth-child(3n + 2){--dust-strength:.43;--dust-spread:1.2;--dust-drift-scale:.85;filter:blur(calc(var(--p)*.8));animation-duration:calc(var(--dust-duration)*1.15)}
.node-dust i:nth-child(3n){--dust-strength:.24;--dust-spread:1.65;--dust-drift-scale:.65;filter:blur(calc(var(--p)*1.8));animation-duration:calc(var(--dust-duration)*1.4)}
.tree-node.is-selected + .node-dust{opacity:1}
.tree-node.is-selected + .node-dust i{animation-play-state:running;will-change:transform,opacity}
@keyframes story-dust-drift{0%{opacity:0;transform:translate3d(0,calc(var(--p)*6),0) scale(.82)}20%{opacity:calc(.4*var(--dust-strength))}50%{opacity:calc(.66*var(--dust-strength))}80%{opacity:calc(.25*var(--dust-strength))}100%{opacity:0;transform:translate3d(calc(var(--p)*var(--dust-dx)*var(--dust-drift-scale)),calc(var(--p)*var(--dust-rise)*var(--dust-drift-scale)),0) scale(1)}}
@media(prefers-reduced-motion:reduce){.node-dust{display:none}}

/* Chapters share the story tree's selected light dust; reserved rail space keeps it visible. */
.chapter-card.is-selected + .chapter-dust{opacity:1}
.chapter-card.is-selected + .chapter-dust i{animation-play-state:running;will-change:transform,opacity}

/* The current save grows within the existing three-slot row. */
.game-frame[data-page="saves"]{overflow:clip}
.saves-layout{left:50%;right:auto;width:min(calc(100% - var(--safe)*2),calc(var(--p)*1480));translate:-50% 0}
.saves-grid{display:flex;align-items:center}
.save-shell{isolation:isolate;display:flex;flex-direction:column;flex:1 1 0;min-width:0;transition:flex-grow .65s var(--ease)}
.save-shell.is-active{flex-grow:1.18}
/* The save card uses the shared rear dust, anchored below its metadata row. */
.save-dust{top:calc(var(--p)*18)}
.save-shell.is-active>.save-dust{opacity:1}
.save-shell.is-active>.save-dust i{animation-play-state:running;will-change:transform,opacity}
.game-frame[data-entry-state="entering"] .node-dust i{animation-play-state:paused}
.save-meta{position:relative;z-index:2;height:calc(var(--p)*32);margin-bottom:calc(var(--p)*12);display:flex;align-items:center;justify-content:space-between;gap:calc(var(--p)*12)}
.save-date{display:flex;align-items:center;gap:calc(var(--p)*10);font-size:calc(var(--p)*14);line-height:1.3;color:#aab7ad;white-space:nowrap}
.save-date:before{content:"";width:1px;height:calc(var(--p)*15);background:#d5ded0b3}
.save-date>span{color:#8f9e94;font-size:calc(var(--p)*13);font-variant-numeric:tabular-nums}
.save-meta .delete-save{position:static;flex:none;opacity:1;color:#a1afa5;background:none;border:0;transition:color .2s,filter .2s}
.save-meta .delete-save:hover{color:#e2b6ac;filter:drop-shadow(0 0 3px #e2b6ac40)}
.save-shell>.save-card{z-index:1;flex:none;height:auto;aspect-ratio:477/402;min-height:0;background:#0b1218;border-color:#c3d0c72b;isolation:isolate}
@property --save-float-amount{syntax:"<number>";inherits:false;initial-value:0}
.save-card{--save-float-amount:0;translate:0 0;animation:save-selected-float 6.4s ease-in-out infinite;transition:transform .4s var(--ease),border-color .25s,background .25s,box-shadow .4s,--save-float-amount .7s var(--soft)}
.save-card.selected{--save-float-amount:1}
@keyframes save-selected-float{0%,100%{translate:0 0}50%{translate:0 calc(var(--p)*-6*var(--save-float-amount))}}
.save-card:before,.save-card:after{content:"";position:absolute;z-index:3;left:0;right:0;height:calc(var(--p)*16);background-color:#05090df2;background-image:repeating-linear-gradient(90deg,transparent 0 calc(var(--p)*10),#81918a30 calc(var(--p)*10) calc(var(--p)*26),transparent calc(var(--p)*26) calc(var(--p)*38));background-size:auto calc(var(--p)*6);background-repeat:repeat-x;background-position:0 center;pointer-events:none}
.save-card:before{top:0}.save-card:after{bottom:0}
.save-card .save-cover{position:absolute;inset:calc(var(--p)*16) 0;height:auto}
.save-card .save-cover:after{inset:30% 0 0;background:linear-gradient(transparent,#070d13e8)}
.save-card.selected{border-color:#e5e8dba6;box-shadow:0 0 calc(var(--p)*20) #e7f0d21a}
.save-card.selected .save-cover img{opacity:.9}
.save-card:hover,.save-card:focus-visible{border-color:#f0f0ddb3;box-shadow:0 0 calc(var(--p)*20) #e7f0d21f;outline:none}
.save-card .save-active{display:flex;align-items:center;gap:calc(var(--p)*7);top:calc(var(--p)*31);right:calc(var(--p)*22);font-size:calc(var(--p)*13);color:#e0e7d4;opacity:0;pointer-events:none;transition:opacity .3s}
.save-card.selected .save-active{opacity:1}
.save-active svg{font-size:calc(var(--p)*14)}
.save-card .save-info{position:absolute;z-index:2;left:0;right:0;bottom:calc(var(--p)*16);padding:calc(var(--p)*24);display:flex;justify-content:space-between;align-items:flex-end;gap:calc(var(--p)*18)}
.save-number{display:block;font-family:"Helvetica Neue",Arial,sans-serif;font-size:calc(var(--p)*36);line-height:1;font-weight:450;letter-spacing:.03em;color:#eef0e5;font-variant-numeric:tabular-nums}
.save-card .save-info h2{margin:calc(var(--p)*11) 0 0;font-size:calc(var(--p)*18);line-height:1.35;font-weight:400;letter-spacing:.05em;color:#d6ded2}
.save-percent{font-size:calc(var(--p)*14);line-height:1.35;color:#a9b7a8;font-variant-numeric:tabular-nums}
.save-shell>.empty-save{background:linear-gradient(180deg,#1921279c,#0a1016c7);color:#a9b6ac}
.save-empty-copy{position:relative;z-index:2}
.empty-save .plus{display:grid;place-items:center;width:calc(var(--p)*42);height:calc(var(--p)*42);margin:0 auto calc(var(--p)*18);border-radius:50%;background:#d7dfd3bc;color:#16201e;font-size:calc(var(--p)*30);line-height:1;font-weight:400;transition:background .25s,box-shadow .3s}
.empty-save:hover .plus,.empty-save:focus-visible .plus{background:#ecf0e2;box-shadow:0 0 calc(var(--p)*18) #d7e5ce1c}
.empty-save small{font-size:calc(var(--p)*18);letter-spacing:.04em}
@media(prefers-reduced-motion:reduce){.save-shell{transition:none}.save-card{animation:none;translate:0 0}}

/* Keep the settings controls in their approved grid column after removing captions. */
.settings-layout>.setting-group,.settings-layout>.setting-row.language{grid-column:2}

/* Geometric separators share the text row center without font baseline offsets. */
.hud-scene-label{display:block;line-height:1.4;white-space:nowrap}
.hud-scene-separator{display:block;flex:none;width:max(1px,calc(var(--p)*2));height:max(1px,calc(var(--p)*2));border-radius:50%;background:currentColor;opacity:.8;letter-spacing:0}

/* Reference choice layout, using the approved compact capsule proportions. */
.choice-panel{left:50%;right:auto;bottom:calc(var(--p)*124);width:calc(var(--p)*1120);max-width:calc(100% - var(--safe)*2);translate:-50% 0}
.choice-panel h2{margin:0;font-size:calc(var(--p)*28);line-height:1.35;font-weight:500;letter-spacing:.08em;text-shadow:0 2px 12px #0004}
.choice-divider{position:relative;height:calc(var(--p)*4);margin:calc(var(--p)*22) 0 calc(var(--p)*30)}
.choice-divider:before,.choice-divider #choice-progress{position:absolute;left:0;right:0;top:50%;height:1px;translate:0 -50%;background:linear-gradient(90deg,#e3e8dc00,#e3e8dcb3 18%,#e3e8dcdf 50%,#e3e8dcb3 82%,#e3e8dc00);-webkit-mask-image:linear-gradient(90deg,#000 calc(50% - var(--p)*7),#0000 calc(50% - var(--p)*7),#0000 calc(50% + var(--p)*7),#000 calc(50% + var(--p)*7));mask-image:linear-gradient(90deg,#000 calc(50% - var(--p)*7),#0000 calc(50% - var(--p)*7),#0000 calc(50% + var(--p)*7),#000 calc(50% + var(--p)*7))}
.choice-divider:before{content:"";opacity:.2}
.choice-divider #choice-progress{display:block;transform-origin:center}
.choice-divider:after{content:"";position:absolute;left:50%;top:50%;width:max(2px,calc(var(--p)*4));height:max(2px,calc(var(--p)*4));translate:-50% -50%;border-radius:50%;background:#eceee1}
.choice-options{flex-direction:row;justify-content:center;gap:calc(var(--p)*112)}
.choice-options>div{flex:none}
.choice-option{width:calc(var(--p)*196);height:calc(var(--p)*52);padding:0 calc(var(--p)*24);justify-content:center;text-align:center;border:0;border-radius:999px;overflow:visible;background:#10191a24;backdrop-filter:blur(6px);font-size:calc(var(--p)*20);letter-spacing:.08em;color:#dfe5da;transition:background .25s,color .25s,opacity .25s,transform .35s var(--ease)}
.choice-option:before{content:"";position:absolute;inset:1px;border-radius:inherit;background:linear-gradient(180deg,#e9f3ef14,#e9f3ef02 52%,#e9f3ef0d);opacity:.3;pointer-events:none;transition:opacity .25s}
.choice-outline{position:absolute;inset:0;width:100%;height:100%;overflow:visible;stroke-width:1;opacity:.62;pointer-events:none;transition:opacity .25s,filter .3s}
.choice-outline circle{fill:currentColor;stroke:none}
.choice-label{position:relative;z-index:1;line-height:1.3}
.choice-option:hover,.choice-option:focus-visible{background:#e3f0f41a;color:#f4f3e8;transform:translateY(calc(var(--p)*-2));outline:none}
.choice-option:hover:before,.choice-option:focus-visible:before{opacity:1}
.choice-option:hover .choice-outline,.choice-option:focus-visible .choice-outline{opacity:1;filter:drop-shadow(0 0 calc(var(--p)*3) #e2eccb38)}
.choice-option:active{transform:translateY(0) scale(.985)}
.choice-option:disabled{opacity:1;cursor:default}
.choice-option:disabled:not(.is-chosen){opacity:.28;transform:translateY(calc(var(--p)*3))}
.choice-option.is-chosen{color:#f1f0df;transform:none}
.choice-option.is-chosen .choice-outline{opacity:1;filter:drop-shadow(0 0 calc(var(--p)*5) #e7f0d238)}

/* Completion reference: compact right-side composition, layered gold and glass capsules. */
/* Outcome pages share the approved result scale; their atmosphere stays independent. */
.game-frame[data-page="failure"] .scene-shade{background:linear-gradient(90deg,#07090c24 0%,#0b10114d 36%,#0c0d13e0 68%,#100c0ded 100%),linear-gradient(0deg,#090a0de0,transparent 60%,#080a0c47)}
.result-layout.failure-layout h1{font-size:calc(var(--p)*88);color:#cdd0d2;white-space:nowrap;text-shadow:0 calc(var(--p)*2) 0 #1e232b,0 calc(var(--p)*8) calc(var(--p)*36) #0006}
.failure-title-outline{position:absolute;inset:0;z-index:-1;translate:calc(var(--p)*3) calc(var(--p)*6);color:transparent;-webkit-text-stroke:max(.45px,calc(var(--p)*.7)) #a7adb459;pointer-events:none}
.failure-title-group{position:relative;isolation:isolate}
.failure-title-group h1{position:relative;z-index:1}
.failure-title-glow{position:absolute;z-index:0;inset:24% -5% -10%;background:radial-gradient(ellipse,#87312e33,transparent 72%);filter:blur(calc(var(--p)*12));pointer-events:none}
.result-emblem.failure-emblem{width:calc(var(--p)*330);top:calc(var(--p)*-175)}
.failure-emblem-art{display:block;will-change:transform,opacity}
.failure-glitch-slice{position:absolute;inset:0;display:block;opacity:0;filter:brightness(1.6);pointer-events:none;will-change:transform,opacity}
.failure-glitch-slice--0{clip-path:inset(23% 0 60% 0)}
.failure-glitch-slice--1{clip-path:inset(44% 0 45% 0)}
.failure-glitch-slice--2{clip-path:inset(67% 0 23% 0)}
.failure-divider{position:relative;width:100%;height:calc(var(--p)*10);margin:calc(var(--p)*25) 0 calc(var(--p)*21);background:linear-gradient(90deg,transparent,#a8322c80 15%,#ae3831a6 46%,transparent 48%,transparent 52%,#ae3831a6 54%,#a8322c80 85%,transparent) center/100% 1px no-repeat}
.failure-divider i{position:absolute;left:calc(50% - var(--p)*24);top:50%;translate:0 -50%;width:calc(var(--p)*17);height:calc(var(--p)*9);background:#b44137;opacity:.85;clip-path:polygon(100% 0,55% 50%,100% 100%,0 50%)}
.failure-divider i:nth-child(2){left:calc(50% - var(--p)*35);opacity:.5}
.failure-divider i:nth-child(n+3){left:auto;right:calc(50% - var(--p)*24);scale:-1 1}
.failure-divider i:nth-child(4){right:calc(50% - var(--p)*35);opacity:.5}
.failure-layout .result-copy p{color:#bcc1c1}
.failure-atmosphere{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.failure-atmosphere:before{content:"";position:absolute;inset:30% -8% -30% 45%;background:radial-gradient(ellipse,#7e2d2721,transparent 68%);opacity:.65;animation:failure-haze 15s ease-in-out -5s infinite alternate}
.failure-ember{position:absolute;width:calc(var(--p)*var(--ember-size));height:calc(var(--p)*var(--ember-size)*1.35);opacity:0;filter:drop-shadow(0 0 calc(var(--p)*4.5) #e4402b90);animation:failure-ember-rise var(--ember-duration) linear var(--ember-delay) infinite both;will-change:transform,opacity}
.failure-ember:before{content:"";position:absolute;inset:0;clip-path:var(--ember-shape);background:linear-gradient(135deg,#ffad7c,#ff5037 28%,#dc3026 72%,#af2722ee)}
.failure-ember--far{filter:blur(calc(var(--p)*.12)) drop-shadow(0 0 calc(var(--p)*2) #e4402b50)}
.failure-ember--near{filter:blur(calc(var(--p)*.32)) drop-shadow(0 0 calc(var(--p)*6) #e8402b99)}
.failure-ember.is-streak{height:calc(var(--p)*var(--ember-size)*4.5);width:max(1px,calc(var(--p)*2));filter:drop-shadow(0 0 calc(var(--p)*3) #dc3a26a0)}
.failure-ember.is-streak:before{clip-path:none;border-radius:50%;background:linear-gradient(0deg,#ffb075,#ed4b30b3 45%,transparent)}
@keyframes failure-ember-rise{0%{opacity:0;transform:translate3d(0,calc(var(--p)*20),0) rotate(var(--ember-angle)) scale(.7)}12%{opacity:calc(var(--ember-strength)*.9)}46%{opacity:var(--ember-strength)}82%{opacity:calc(var(--ember-strength)*.72)}100%{opacity:0;transform:translate3d(calc(var(--p)*var(--ember-dx)),calc(var(--p)*var(--ember-rise)*-1),0) rotate(calc(var(--ember-angle) + var(--ember-turn))) scale(.95)}}
@keyframes failure-haze{from{transform:translate3d(-1%,2%,0) scale(.94);opacity:.35}to{transform:translate3d(3%,-2%,0) scale(1.08);opacity:.7}}
.game-frame[data-page="gameover"] .scene{filter:blur(calc(var(--p)*18)) brightness(.65) saturate(.6);transform:scale(1.06)}
.game-frame[data-page="gameover"] .scene-shade{background:radial-gradient(ellipse at 50% 47%,#102a2f24 0%,#06171975 45%,#03090de0 100%),linear-gradient(0deg,#020608e8,transparent 45%,#02080980)}
.gameover-atmosphere{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;mix-blend-mode:screen}
.gameover-halo{position:absolute;left:50%;top:47%;translate:-50% -50%;width:calc(var(--p)*900);height:calc(var(--p)*500);background:radial-gradient(ellipse,#d9efed2e 0%,#b0d5d522 20%,#72b2b20d 45%,transparent 70%);filter:blur(calc(var(--p)*13));animation:gameover-light-breathe 13s ease-in-out -3s infinite alternate}
.gameover-light-veil{position:absolute;left:50%;top:47%;translate:-50% -50%;width:calc(var(--p)*1140);height:calc(var(--p)*640);background:radial-gradient(ellipse at 62% 58%,#b7dfd424,transparent 62%);filter:blur(calc(var(--p)*24));opacity:.4;animation:gameover-veil-drift 19s ease-in-out -6s infinite alternate}
.gameover-layout{position:absolute;inset:0;z-index:1;isolation:isolate;text-align:center}
.gameover-mark{position:absolute;left:50%;top:47%;translate:-50% -50%;width:calc(var(--p)*400);height:calc(var(--p)*400);pointer-events:none;z-index:-1}
.gameover-orbit{width:100%;height:100%;animation:gameover-orbit-sway 14s ease-in-out -4s infinite alternate}
.gameover-diamonds{display:block;width:100%;height:100%;overflow:visible;stroke:#cce0df;stroke-width:1.2}
.gameover-diamonds path{stroke-dasharray:1;stroke-dashoffset:0}
.gameover-diamond-outer{opacity:.32}
.gameover-diamond-inner{opacity:.18;stroke-width:.7}
.gameover-particle-field{position:absolute;left:50%;top:47%;translate:-50% -50%;width:calc(var(--p)*640);height:calc(var(--p)*500);pointer-events:none;z-index:0}
.gameover-particle-layer{position:absolute;inset:0;pointer-events:none}
.gameover-particle-layer--far{z-index:0}
.gameover-particle-layer--mid{z-index:1}
.gameover-particle-layer--near{z-index:2}
.gameover-mote{position:absolute;width:calc(var(--p)*var(--mote-size));height:calc(var(--p)*var(--mote-size));opacity:0;animation:gameover-mote-emit var(--mote-duration) cubic-bezier(.18,.3,.5,1) var(--mote-delay) infinite both}
.gameover-mote:before{content:"";position:absolute;inset:0;rotate:45deg;background:#cbe6df;box-shadow:0 0 calc(var(--p)*5) #b3ddd84d}
.gameover-mote--far{filter:blur(calc(var(--p)*.55))}
.gameover-mote--mid{filter:blur(calc(var(--p)*.08))}
.gameover-mote--near{filter:blur(calc(var(--p)*.9))}
.gameover-mote.is-hollow:before{background:transparent;border:max(.6px,calc(var(--p)*.85)) solid #cbe6df;box-shadow:none}
.gameover-mote.is-point:before{border-radius:50%;border:0;background:#bfdad5}
.gameover-heading{position:absolute;left:var(--safe);right:var(--safe);top:47%;translate:0 -50%;display:flex;align-items:center;justify-content:center;gap:calc(var(--p)*22);z-index:2}
.gameover-title-group{flex:none;position:relative}
.gameover-title-light{position:absolute;inset:-55% -16%;background:radial-gradient(ellipse,#d4ede738,transparent 68%);filter:blur(calc(var(--p)*12));pointer-events:none;opacity:.4}
.gameover-heading h1{position:relative;margin:0;font-family:"Helvetica Neue",Arial,sans-serif;font-size:calc(var(--p)*84);font-weight:350;letter-spacing:.13em;text-indent:.13em;line-height:1.2;white-space:nowrap;color:#f0f5ef;text-shadow:0 0 calc(var(--p)*35) #d4f0e743}
.gameover-line{position:relative;height:1px;flex:1;max-width:calc(var(--p)*410);background:linear-gradient(90deg,transparent,#bed8d28c);transform-origin:right center}
.gameover-line:after{content:"";position:absolute;right:0;top:50%;translate:0 -50%;width:calc(var(--p)*5);height:calc(var(--p)*5);border-radius:50%;background:#bdd2cf;opacity:.75}
.gameover-line--right{background:linear-gradient(90deg,#bed8d28c,transparent);transform-origin:left center}
.gameover-line--right:after{right:auto;left:0}
.gameover-actions{position:absolute;top:76.5%;left:50%;translate:-50% 0;z-index:3}
@keyframes gameover-light-breathe{from{opacity:.55;transform:scale(.95)}to{opacity:.85;transform:scale(1.06)}}
@keyframes gameover-veil-drift{from{opacity:.3;transform:translate3d(-2%,2%,0) scale(.96)}to{opacity:.6;transform:translate3d(3%,-3%,0) scale(1.05)}}
@keyframes gameover-orbit-sway{from{transform:translate3d(0,calc(var(--p)*3),0) rotate(-.45deg)}to{transform:translate3d(0,calc(var(--p)*-3),0) rotate(.45deg)}}
@keyframes gameover-mote-emit{0%{opacity:0;transform:translate3d(0,0,0) scale(.4)}12%{opacity:calc(var(--mote-strength)*.8)}38%{opacity:var(--mote-strength)}70%{opacity:calc(var(--mote-strength)*.5)}100%{opacity:0;transform:translate3d(calc(var(--p)*var(--mote-dx)),calc(var(--p)*var(--mote-dy)),0) scale(1)}}
@media(prefers-reduced-motion:reduce){.failure-ember,.gameover-particle-field{display:none}.failure-atmosphere:before,.gameover-halo,.gameover-light-veil,.gameover-orbit{animation:none}.failure-atmosphere:before{opacity:.5}.gameover-halo{opacity:.7}.gameover-light-veil{opacity:.4}}
.game-frame[data-page="result"] .scene-shade{background:linear-gradient(90deg,#070a0b10 0%,#090d1047 38%,#090c10d9 68%,#080b0ee8 100%),linear-gradient(0deg,#080c10ae,transparent 48%,#080b0d20)}
.result-layout{left:auto;right:var(--safe);top:27%;bottom:18%;width:calc(var(--p)*640);display:flex;flex-direction:column;justify-content:space-between;align-items:center;isolation:isolate;text-align:center;z-index:1}
.result-emblem{position:absolute;z-index:-1;left:50%;top:calc(var(--p)*-160);translate:-50% 0;width:calc(var(--p)*350);pointer-events:none}
.result-emblem img{display:block;width:100%;height:auto}
.result-copy{width:100%}
.result-title-group{position:relative;isolation:isolate}
.result-title-group h1{position:relative;z-index:1}
.result-title-light{position:absolute;z-index:0;top:calc(var(--p)*14);bottom:calc(var(--p)*-24);left:-6%;right:-6%;opacity:.46;transform-origin:50% 70%;pointer-events:none;mix-blend-mode:screen}
.result-title-light:before{content:"";position:absolute;inset:6% 3%;border-radius:50%;background:radial-gradient(ellipse at 52% 66%,#efc8664a,#dca73524 34%,transparent 72%);filter:blur(calc(var(--p)*7))}
.result-title-light:after{content:"";position:absolute;left:8%;right:3%;bottom:calc(var(--p)*4);height:calc(var(--p)*28);background:radial-gradient(ellipse,#ffe6a84d,transparent 70%);filter:blur(calc(var(--p)*3))}
.result-title-ray{--ray-y:24%;--ray-height:2;--ray-blur:.9;--ray-strength:.55;position:absolute;left:2%;right:2%;top:var(--ray-y);height:calc(var(--p)*var(--ray-height));translate:0 -50%;border-radius:50%;background:linear-gradient(90deg,transparent,#c6972614 12%,#f7d17f99 34%,#fff3c6bd 52%,#e5bc4f73 70%,transparent);filter:blur(calc(var(--p)*var(--ray-blur)));opacity:var(--ray-strength)}
.result-title-ray:nth-child(2){--ray-y:50%;--ray-height:5;--ray-blur:2.3;--ray-strength:.75;left:6%;right:1%}
.result-title-ray:nth-child(3){--ray-y:78%;--ray-height:2.5;--ray-blur:.8;--ray-strength:.72;left:0;right:7%}
.result-layout h1{margin:0;color:#f6f4e9;font-family:Impact,"Arial Black","Helvetica Neue",sans-serif;font-size:calc(var(--p)*92);font-weight:900;font-style:italic;line-height:1.08;letter-spacing:-.025em;text-shadow:0 calc(var(--p)*2) 0 #ad976951,0 calc(var(--p)*7) calc(var(--p)*30) #0003}
.result-divider{height:calc(var(--p)*4);position:relative;margin:calc(var(--p)*28) 0 calc(var(--p)*24);background:linear-gradient(90deg,#ead99a00,#ead99a8c 20%,#f6e7adbd 50%,#ead99a8c 80%,#ead99a00) center/100% 1px no-repeat}
.result-divider:before{content:"";position:absolute;left:72%;top:50%;translate:-50% -50%;width:calc(var(--p)*180);height:calc(var(--p)*12);border-radius:50%;background:radial-gradient(ellipse,#fffaf1e6,#ffeab58c 16%,#efd08238 40%,transparent 72%);filter:blur(calc(var(--p)*1.2));pointer-events:none}
.result-divider:after{content:"";position:absolute;left:72%;top:50%;translate:-50% -50%;width:calc(var(--p)*72);height:max(1px,calc(var(--p)*1.4));background:linear-gradient(90deg,transparent,#fffced,transparent);box-shadow:0 0 calc(var(--p)*7) #ffe2a04d;pointer-events:none}
.result-divider i{position:absolute;top:50%;left:0;width:calc(var(--p)*9);height:calc(var(--p)*14);translate:0 -50%;background:#f3e6b5;clip-path:polygon(50% 0,64% 38%,100% 50%,64% 62%,50% 100%,36% 62%,0 50%,36% 38%)}
.result-divider i:last-child{left:auto;right:0}
.result-copy p{margin:0;color:#d4d8ce;font-size:calc(var(--p)*18);font-weight:400;line-height:1.9;letter-spacing:.035em}
.result-actions{display:flex;flex-direction:column;align-items:center;gap:calc(var(--p)*18)}
.result-actions .btn{width:calc(var(--p)*196);border-radius:999px;background:#11171936;border-color:#eef1e58c;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);color:#edf0e8;box-shadow:none;letter-spacing:.04em}
.result-actions .btn:hover{background:#e3f0f41a;border-color:#f7fbf2d9}
.result-actions .btn:focus-visible{outline:none;border-color:#f7f5dc;box-shadow:0 0 calc(var(--p)*12) #e7e7c126,inset 0 0 calc(var(--p)*8) #ffffff19}
.result-actions .btn>span{position:relative}
.result-atmosphere{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}
/* Warm completion light: sharp midground points, soft foreground bokeh and distant dust. */
.result-atmosphere{mix-blend-mode:screen}
.result-atmosphere:before{content:"";position:absolute;left:-5%;right:-5%;bottom:calc(var(--p)*-52);height:calc(var(--p)*230);background:radial-gradient(ellipse at 55% 100%,#e9b92f73,#dba72826 46%,#c5951700 76%);animation:result-gold-haze 16s ease-in-out infinite alternate}
.result-atmosphere:after{content:"";position:absolute;left:0;right:0;bottom:calc(var(--p)*-20);height:calc(var(--p)*100);background:radial-gradient(ellipse at 20% 100%,#e9be4338,transparent 55%),radial-gradient(ellipse at 84% 100%,#e2b33126,transparent 46%);opacity:.7;animation:result-gold-haze 21s ease-in-out -7s infinite alternate-reverse}
.result-atmosphere .result-mote{position:absolute;border-radius:50%;width:calc(var(--p)*var(--mote-size));height:calc(var(--p)*var(--mote-size));opacity:0;animation:result-mote-drift var(--mote-duration) linear var(--mote-delay) infinite both;will-change:transform,opacity}
.result-mote--far{background:#e7cd87;box-shadow:0 0 calc(var(--p)*5) #e3b43c59;filter:blur(calc(var(--p)*.35))}
.result-mote--mid{background:radial-gradient(circle,#fff7d5 0 14%,#ffe7a0 28%,#f0c44a 52%,#d6a32a38 72%,transparent 100%);box-shadow:0 0 calc(var(--p)*7) #ffda79a3,0 0 calc(var(--p)*20) #f7c63859;filter:blur(calc(var(--p)*.3))}
.result-mote--near{background:radial-gradient(circle,#fff3c7e6 0 13%,#f8d76dcc 25%,#e0ad3d99 48%,#c78b1b38 68%,transparent 80%);filter:blur(calc(var(--p)*1.8));box-shadow:0 0 calc(var(--p)*22) #e8b6324d}
.result-mote.is-spark:before,.result-mote.is-spark:after{content:"";position:absolute;left:50%;top:50%;width:calc(var(--p)*17);height:max(.5px,calc(var(--p)*.8));background:linear-gradient(90deg,transparent,#fff8d9,transparent);opacity:0;animation:result-gold-glint calc(var(--mote-duration)*1.37) ease-in-out calc(var(--mote-delay)*.7) infinite both}
.result-mote.is-spark:after{--glint-angle:90deg;width:calc(var(--p)*12)}
.game-frame[data-page="result"] .page-footer{z-index:2}
@keyframes result-mote-drift{0%{opacity:0;transform:translate3d(0,calc(var(--p)*16),0) scale(.7)}18%{opacity:calc(var(--mote-strength)*.8)}45%{opacity:var(--mote-strength);transform:translate3d(calc(var(--p)*var(--mote-dx)*.4),calc(var(--p)*var(--mote-rise)*-.42),0) scale(.95)}78%{opacity:calc(var(--mote-strength)*.6)}100%{opacity:0;transform:translate3d(calc(var(--p)*var(--mote-dx)),calc(var(--p)*var(--mote-rise)*-1),0) scale(1.12)}}
@keyframes result-gold-haze{from{opacity:.65;transform:translateX(-2%) scaleX(.98)}to{opacity:1;transform:translateX(2%) scaleX(1.04)}}
@keyframes result-gold-glint{0%,28%,70%,100%{opacity:0;transform:translate(-50%,-50%) rotate(var(--glint-angle,0deg)) scale(.4)}47%{opacity:.8;transform:translate(-50%,-50%) rotate(var(--glint-angle,0deg)) scale(1)}58%{opacity:.12;transform:translate(-50%,-50%) rotate(var(--glint-angle,0deg)) scale(.65)}}
@media(prefers-reduced-motion:reduce){.result-atmosphere{display:none}}

/* Keep the chapter summary and rail in one bottom-anchored flow. */
.chapter-browser{position:absolute;left:0;right:0;bottom:calc(var(--p)*80);display:flex;flex-direction:column;gap:calc(var(--p)*26)}
.chapter-browser .chapter-summary{position:relative;left:auto;right:auto;top:auto;margin-inline:var(--safe)}
.chapter-rail{position:relative;min-width:0}
.chapter-rail .chapter-strip{position:relative;bottom:auto}
.chapter-rail .chapter-card{display:block}
.chapter-rail .chapter-rail-arrow{top:50%}

/* Every primary action shares the same glass material and breathing light. */
.btn:focus-visible{outline:none;border-color:#f7f5dc;box-shadow:0 0 calc(var(--p)*12) #e7e7c126,inset 0 0 calc(var(--p)*8) #ffffff19}
.chapter-actions{--glass-label-color:#f0f2ee}
.btn.btn-glass{--glass-light-min:.08;--glass-light-max:.95;--glass-hover-boost:0;color:var(--glass-label-color,#edf0e8);background:linear-gradient(180deg,rgba(244,249,252,.28),rgba(207,223,230,.1) 48%,rgba(231,242,248,.25));border-color:#eff8fca1;box-shadow:inset 0 calc(var(--p)*2) calc(var(--p)*7) #ffffff45,inset 0 calc(var(--p)*-2) calc(var(--p)*7) #ffffff2e;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);isolation:isolate;overflow:visible;animation:glass-capsule-rim-breathe 3.8s ease-in-out infinite}
.btn.btn-glass:is(:hover,:focus-visible){--glass-light-min:.4;--glass-light-max:1;--glass-hover-boost:.06;background:linear-gradient(180deg,rgba(244,249,252,.34),rgba(207,223,230,.16) 48%,rgba(231,242,248,.31))}
.btn.btn-glass:focus-visible{animation:none;outline:none;border-color:#f7f5dc;box-shadow:0 0 calc(var(--p)*12) #e7e7c126,inset 0 0 calc(var(--p)*8) #ffffff19}
.btn.btn-glass>span,.btn.btn-glass>svg{position:relative;z-index:1}
.btn.btn-glass:before{content:"";position:absolute;inset:0;z-index:0;border-radius:inherit;background:radial-gradient(ellipse at 24% 0%,#ffffff8c,transparent 35%),radial-gradient(ellipse at 78% 100%,#ffffff6b,transparent 38%);pointer-events:none;opacity:.7;animation:glass-capsule-breathe 3.8s ease-in-out infinite}
.btn.btn-glass:after{content:"";position:absolute;inset:0;z-index:0;border-radius:inherit;pointer-events:none;background:linear-gradient(180deg,#f5fbff40,transparent 40%,transparent 60%,#f5fbff33);opacity:var(--glass-light-min);animation:glass-capsule-breathe 3.8s ease-in-out infinite}
.btn.btn-glass:disabled,.btn.btn-glass:disabled:before,.btn.btn-glass:disabled:after{animation:none}
@keyframes glass-capsule-breathe{0%,100%{opacity:var(--glass-light-min)}50%{opacity:var(--glass-light-max)}}
@keyframes glass-capsule-rim-breathe{0%,100%{border-color:rgba(239,248,252,calc(.28 + var(--glass-hover-boost)));box-shadow:inset 0 calc(var(--p)*1) calc(var(--p)*4) rgba(255,255,255,calc(.08 + var(--glass-hover-boost))),inset 0 calc(var(--p)*-1) calc(var(--p)*4) rgba(255,255,255,calc(.05 + var(--glass-hover-boost))),0 0 calc(var(--p)*3) rgba(223,243,255,var(--glass-hover-boost))}50%{border-color:rgba(249,253,255,calc(.94 + var(--glass-hover-boost)));box-shadow:inset 0 calc(var(--p)*2) calc(var(--p)*10) rgba(255,255,255,calc(.65 + var(--glass-hover-boost))),inset 0 calc(var(--p)*-2) calc(var(--p)*10) rgba(255,255,255,calc(.48 + var(--glass-hover-boost))),0 0 calc(var(--p)*16) rgba(223,243,255,calc(.27 + var(--glass-hover-boost)))}}
@media(prefers-reduced-motion:reduce){.btn.btn-glass{animation:none;border-color:#eff8fca1;box-shadow:inset 0 calc(var(--p)*2) calc(var(--p)*7) #ffffff45,inset 0 calc(var(--p)*-2) calc(var(--p)*7) #ffffff2e}.btn.btn-glass:before{animation:none;opacity:.7}.btn.btn-glass:after{animation:none;opacity:.2}.btn.btn-glass:focus-visible{border-color:#f7f5dc;box-shadow:0 0 calc(var(--p)*12) #e7e7c126,inset 0 0 calc(var(--p)*8) #ffffff19}}

/* Menu focus reveals in layers and reverses promptly on departure. */
.home-menu button{
  isolation:isolate;
  min-width:calc(var(--p)*168);
  text-shadow:0 0 calc(var(--p)*6) #eaf1e400,0 0 calc(var(--p)*14) #c8e1e800;
  transition:color .2s var(--soft),transform .3s var(--ease),text-shadow .34s var(--soft);
}
.home-menu button::after{
  content:"";
  position:absolute;
  z-index:-1;
  inset:0 calc(var(--p)*-10);
  background:linear-gradient(90deg,transparent 2%,#eef3df24 24%,#eef3df6b 48%,#d6e6e532 70%,transparent 98%) left top / 100% 1px no-repeat,
             linear-gradient(90deg,transparent 2%,#dce9e216 24%,#dce9e23d 48%,#c6dde520 70%,transparent 98%) left bottom / 100% 1px no-repeat;
  opacity:0;
  transform:translateX(calc(var(--p)*-2)) scaleX(.18);
  transform-origin:50% 50%;
  filter:blur(calc(var(--p)*1.2));
  pointer-events:none;
  transition:opacity .16s var(--soft),transform .24s var(--ease),filter .16s var(--soft);
}
.home-menu button::before{
  background:#e7ebdf;
  box-shadow:0 0 calc(var(--p)*3) #dce8dc00;
  transform:translateX(calc(var(--p)*-3)) scale(.55);
  transition:opacity .14s var(--soft),transform .22s var(--ease),box-shadow .26s var(--soft);
}
.home-menu [data-enter="menu"] button:is(:hover,:focus-visible){
  color:#f7f6ee;
  text-shadow:0 0 calc(var(--p)*6) #eaf1e438,0 0 calc(var(--p)*14) #c8e1e81c;
  transition-delay:.025s,0s,.045s;
}
.home-menu [data-enter="menu"] button:is(:hover,:focus-visible)::before{
  opacity:1;
  transform:none;
  box-shadow:0 0 calc(var(--p)*6) #dce8dc4d;
  transition-duration:.18s,.28s,.28s;
  transition-delay:.015s;
}
.home-menu [data-enter="menu"] button:is(:hover,:focus-visible)::after{
  opacity:.8;
  transform:none;
  filter:blur(0);
  transition-duration:.24s,.42s,.28s;
}
.home-menu button:focus-visible{outline:none;}

/* Playback speed stays in the existing footer; its menu floats above it. */
.playback-tools{display:flex;align-items:center;gap:calc(var(--p)*28);}
.playback-speed{position:relative;z-index:6;}
.playback-speed-toggle{
  justify-content:center;
  min-width:calc(var(--p)*90);
  height:calc(var(--p)*38);
  padding:0 calc(var(--p)*12);
  gap:calc(var(--p)*9);
  border:1px solid #dce8e02e;
  border-radius:calc(var(--p)*20);
  background:linear-gradient(180deg,#e0e9e408,transparent);
  font-variant-numeric:tabular-nums;
}
.playback-speed-toggle>svg{width:calc(var(--p)*12);height:calc(var(--p)*12);}
/* Both option lists share one glass surface and selection treatment. */
.select-button{
  border-color:#c9d6cd38;border-radius:calc(var(--p)*3);
  background:#d2e1d507;
}
:is(.select-button,.playback-speed-toggle){
  transition:color .22s var(--soft),border-color .22s var(--soft),background .22s var(--soft),box-shadow .28s var(--soft);
}
:is(.select-button,.playback-speed-toggle):is(:hover,:focus-visible,[aria-expanded="true"]){
  color:#f3f4e9;border-color:#e6eddb73;background:#dae5df0b;
  box-shadow:0 0 calc(var(--p)*12) #dce8df17;
}
:is(.select-button,.playback-speed-toggle)>svg{opacity:.65;transition:transform .28s var(--ease);}
:is(.select-button,.playback-speed-toggle)[aria-expanded="true"]>svg{transform:rotate(180deg);}
.select-options{
  --menu-option-height:40;--menu-option-font:18;
  top:calc(100% + var(--p)*7);left:0;right:0;transform-origin:50% 0;
}
.playback-speed-options{
  right:0;bottom:calc(100% + var(--p)*12);
  width:calc(var(--p)*150);transform-origin:50% 100%;
}
.glass-menu{
  position:absolute;z-index:6;
  display:flex;
  flex-direction:column;
  gap:calc(var(--p)*2);
  padding:calc(var(--p)*6);
  border:1px solid #dce8df26;
  border-radius:calc(var(--p)*8);
  background:linear-gradient(180deg,#273238bf,#0e1820cc);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:inset 0 1px 0 #f1f7ed0d,0 calc(var(--p)*8) calc(var(--p)*24) #00000033;
}
.glass-menu[hidden]{display:none;}
.glass-menu[inert]{pointer-events:none;}
.glass-menu button{
  position:relative;isolation:isolate;
  display:flex;align-items:center;justify-content:space-between;
  width:100%;height:calc(var(--p)*var(--menu-option-height,36));padding:0 calc(var(--p)*12);
  border:1px solid transparent;
  border-radius:calc(var(--p)*4);
  background:transparent;
  backdrop-filter:none;-webkit-backdrop-filter:none;
  color:#a7b1ad;font-size:calc(var(--p)*var(--menu-option-font,16));font-variant-numeric:tabular-nums;
  box-shadow:none;
  transition:color .22s var(--soft),border-color .24s var(--soft),background .24s var(--soft),box-shadow .32s var(--soft);
}
.glass-menu button::before{
  content:"";position:absolute;inset:-1px;border-radius:inherit;
  background:linear-gradient(90deg,transparent 20%,#e8f1e342 50%,transparent 80%) top / 100% 1px no-repeat,
             linear-gradient(90deg,transparent 20%,#dce9de24 50%,transparent 80%) bottom / 100% 1px no-repeat;
  opacity:0;transition:opacity .28s var(--soft);pointer-events:none;
}
.glass-menu button:is(:hover,:focus-visible){
  color:#e9eee4;border-color:#e5eedb1f;
  background:#dce8df0d;
  box-shadow:inset 0 1px 0 #e8f1e30a;
  outline:none;
}
.glass-menu button:is([aria-checked="true"],[aria-selected="true"]){
  color:#f0f3e8;border-color:#e4ecdf42;
  background:linear-gradient(180deg,#edf3e82b,#c4d3cb0d 48%,#e0eae323);
  box-shadow:inset 0 1px calc(var(--p)*4) #f4fff31f,inset 0 -1px calc(var(--p)*4) #e6eee217,0 0 calc(var(--p)*8) #dde9df08;
}
.glass-menu button:is(:hover,:focus-visible,[aria-checked="true"],[aria-selected="true"])::before{opacity:.8;}
.glass-menu-check{opacity:0;color:#d8c7a5;transition:opacity .18s var(--soft);}
.glass-menu-check svg{width:calc(var(--p)*14);height:calc(var(--p)*14);}
.glass-menu button:is([aria-checked="true"],[aria-selected="true"]) .glass-menu-check{opacity:1;}
/* Keep the language frame; option states share the speed menu's edge light. */
.select-options.glass-menu{
  gap:calc(var(--p)*2);border-radius:calc(var(--p)*3);
  background:linear-gradient(180deg,#1b2329d9,#10181ee6);
  box-shadow:inset 0 1px 0 #f1f7ed06,0 calc(var(--p)*8) calc(var(--p)*24) #00000026;
}
.select-options.glass-menu button{
  text-align:left;line-height:1.35;
}
@media(prefers-reduced-motion:reduce){
  .home-menu button,.home-menu button::before,.home-menu button::after,
  .home-menu [data-enter="menu"] button:is(:hover,:focus-visible),.home-menu [data-enter="menu"] button:is(:hover,:focus-visible)::before,.home-menu [data-enter="menu"] button:is(:hover,:focus-visible)::after,.playback-speed-toggle,.playback-speed-toggle svg,.glass-menu button,.glass-menu button::before,.glass-menu button::after,.glass-menu-check,.select-button,.select-button>svg{transition:none;}
}

/* Reference hierarchy: one prompt header, body copy and capsule actions. */
.modal-scrim{
  background:radial-gradient(ellipse at 50% 48%,#03070a4d 18%,#03070a80 100%),#03070a40;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.modal{
  --dialog-edge-light:linear-gradient(90deg,transparent 6%,#dce8dd26 32%,#edf2e54d 50%,#dce8dd26 68%,transparent 94%);
  position:relative;
  isolation:isolate;
  width:100%;
  padding:calc(var(--p)*88) calc(var(--p)*54) calc(var(--p)*32);
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.modal>p,.modal>.modal-actions{
  width:min(100%,calc(var(--p)*1040));
  margin-inline:auto;
}
.modal::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  background:linear-gradient(90deg,#84949d00,#84949d1f 25%,#a4b1b92e 50%,#84949d1f 75%,#84949d00);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent),linear-gradient(180deg,transparent,#000 7%,#000);
  mask-image:linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent),linear-gradient(180deg,transparent,#000 7%,#000);
  -webkit-mask-composite:source-in;
  mask-composite:intersect;
  -webkit-mask-size:100% 100%,100% 100%;
  mask-size:100% 100%,100% 100%;
  -webkit-mask-position:center;
  mask-position:center;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  animation:dialog-material-unfold 700ms cubic-bezier(.22,.61,.36,1) both;
  pointer-events:none;
}
.modal::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:1px;
  background:var(--dialog-edge-light);
  transform-origin:50% 50%;
  animation:dialog-line-unfold 700ms cubic-bezier(.22,.61,.36,1) both;
  pointer-events:none;
}
.modal>.modal-caption{
  position:absolute;
  isolation:isolate;
  top:0;
  left:0;
  width:100%;
  height:calc(var(--p)*36);
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
  font-size:calc(var(--p)*20);
  font-weight:500;
  line-height:1;
  letter-spacing:.16em;
  text-indent:.16em;
  color:#dce4d8;
}
.modal-caption::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  background:var(--dialog-edge-light) left top / 100% 1px no-repeat,
             linear-gradient(90deg,transparent 6%,#dce8dd1a 32%,#edf2e533 50%,#dce8dd1a 68%,transparent 94%) left bottom / 100% 1px no-repeat,
             linear-gradient(90deg,transparent 6%,#bdd0c30d 28%,#d1e0d31f 50%,#bdd0c30d 72%,transparent 94%);
  transform-origin:50% 50%;
  animation:dialog-line-unfold 700ms cubic-bezier(.22,.61,.36,1) both;
  pointer-events:none;
}
.modal-caption::after{
  content:"";
  position:absolute;
  inset-block:0;
  left:50%;
  width:calc(var(--p)*180);
  transform:translateX(-50%);
  background:radial-gradient(circle,#c5d1c0 0 1.4px,transparent 1.8px) left center / 4px 4px no-repeat,
             radial-gradient(circle,#c5d1c0 0 1.4px,transparent 1.8px) right center / 4px 4px no-repeat;
  opacity:.6;
  animation:dialog-detail-appear 380ms cubic-bezier(.16,1,.3,1) 180ms both;
  pointer-events:none;
}
.modal-caption-label{display:block;}
.modal p{
  margin-block:0 calc(var(--p)*28);
  text-align:center;
  font-size:calc(var(--p)*20);
  font-weight:400;
  line-height:1.7;
  letter-spacing:.035em;
  color:#e8eae3;
}
.modal p>span{display:block;}
.modal-actions{
  justify-content:center;
  gap:calc(var(--p)*40);
}
.modal-actions .btn{
  flex:0 1 calc(var(--p)*264);
  border-radius:calc(var(--p)*24);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.modal-actions [data-action="modal-cancel"]{background:transparent;border-color:#d4ded573;color:#e7ebe3;}
.modal-actions [data-action="modal-cancel"]:hover{background:#e2e9df0d;border-color:#f1f2e9b3;}
@keyframes dialog-material-unfold{
  from{opacity:0;-webkit-mask-size:4% 100%,100% 100%;mask-size:4% 100%,100% 100%;}
  to{opacity:1;-webkit-mask-size:100% 100%,100% 100%;mask-size:100% 100%,100% 100%;}
}
@keyframes dialog-line-unfold{
  from{opacity:0;transform:scaleX(.04);}
  to{opacity:1;transform:scaleX(1);}
}
@keyframes dialog-detail-appear{from{opacity:0;}to{opacity:.6;}}
.modal-scrim[data-closing="true"]{pointer-events:none;}
.modal-scrim[data-closing="true"] .modal::before{animation:dialog-material-fold var(--dialog-fold-duration,280ms) cubic-bezier(.4,0,.2,1) var(--dialog-fold-delay,80ms) both;}
.modal-scrim[data-closing="true"] .modal::after{animation:dialog-edge-fold var(--dialog-fold-duration,280ms) cubic-bezier(.4,0,.2,1) var(--dialog-fold-delay,80ms) both;}
.modal-scrim[data-closing="true"] .modal-caption::before{animation:dialog-header-fold var(--dialog-fold-duration,280ms) cubic-bezier(.4,0,.2,1) var(--dialog-fold-delay,80ms) both;}
.modal-scrim[data-closing="true"] .modal-caption::after{animation:dialog-detail-disappear var(--dialog-content-exit-duration,110ms) ease-out both;}
@keyframes dialog-material-fold{
  from{opacity:var(--dialog-fold-surface-opacity,1);-webkit-mask-size:var(--dialog-fold-mask,100% 100%,100% 100%);mask-size:var(--dialog-fold-mask,100% 100%,100% 100%);}
  to{opacity:0;-webkit-mask-size:4% 100%,100% 100%;mask-size:4% 100%,100% 100%;}
}
@keyframes dialog-edge-fold{
  from{opacity:var(--dialog-fold-edge-opacity,1);transform:var(--dialog-fold-edge-transform,scaleX(1));}
  to{opacity:0;transform:scaleX(.04);}
}
@keyframes dialog-header-fold{
  from{opacity:var(--dialog-fold-header-opacity,1);transform:var(--dialog-fold-header-transform,scaleX(1));}
  to{opacity:0;transform:scaleX(.04);}
}
@keyframes dialog-detail-disappear{from{opacity:var(--dialog-fold-dots-opacity,.6);}to{opacity:0;}}
@media(prefers-reduced-motion:reduce){
  .modal::before,.modal::after,.modal-caption::before,.modal-caption::after,
  .modal-scrim[data-closing="true"] .modal::before,.modal-scrim[data-closing="true"] .modal::after,
  .modal-scrim[data-closing="true"] .modal-caption::before,.modal-scrim[data-closing="true"] .modal-caption::after{animation:none;}
}
/* Shared operation feedback sits below the header, clear of bottom controls. */
.toast{
  top:max(16px,calc(var(--p)*108));
  bottom:auto;
  isolation:isolate;
  justify-content:center;
  min-width:calc(var(--p)*300);
  max-width:calc(100% - var(--safe)*2);
  gap:calc(var(--p)*12);
  padding:calc(var(--p)*14) calc(var(--p)*46);
  border:0;
  border-radius:0;
  background:transparent;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  color:#e1e7df;
  box-shadow:none;
}
.toast-material{
  position:absolute;
  z-index:-1;
  inset:0 calc(var(--p)*-18);
  background:#20202070;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 20%,#000 80%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 20%,#000 80%,transparent);
  -webkit-mask-size:4% 100%;mask-size:4% 100%;
  -webkit-mask-position:center;mask-position:center;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  opacity:0;
  pointer-events:none;
}
.toast-edge{
  position:absolute;
  inset:0 calc(var(--p)*-18);
  background:linear-gradient(90deg,transparent 8%,#dce8df17 32%,#edf2e542 50%,#dce8df17 68%,transparent 92%) top / 100% 1px no-repeat,
             linear-gradient(90deg,transparent 8%,#d3e1df12 32%,#e1e9dc2e 50%,#d3e1df12 68%,transparent 92%) bottom / 100% 1px no-repeat;
  opacity:0;transform:scaleX(.04);transform-origin:center;
  pointer-events:none;
}
.toast-content{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:inherit;min-width:0;opacity:0;}
.toast-mark{
  flex:0 0 calc(var(--p)*10);
  width:calc(var(--p)*10);height:calc(var(--p)*10);
  background:#d8c7a5;opacity:.8;
  clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);
  filter:drop-shadow(0 0 calc(var(--p)*4) #e7d9b366);
}
.toast-copy{min-width:0;text-align:center;letter-spacing:.045em;text-shadow:0 0 calc(var(--p)*12) #e3ece114;}

/* Shared back arrow; playback controls retain the original one-pixel progress line. */
.game-hud .hud-leading{position:static;flex:1;min-width:0;gap:calc(var(--p)*20)}
.game-hud .hud-leading .hud-scene{min-width:0}
#play-progress{width:0}
.playback-track{--seek-knob:max(6px,calc(var(--p)*8))}
.playback-seek{appearance:none;-webkit-appearance:none;position:absolute;inset:auto calc(var(--seek-knob)*-.5);top:50%;transform:translateY(-50%);width:calc(100% + var(--seek-knob));height:max(28px,calc(var(--p)*44));padding:0;margin:0;border:0;background:transparent;color:transparent;cursor:ew-resize;touch-action:none}
.playback-seek::-webkit-slider-runnable-track{height:1px;border:0;background:transparent}
.playback-seek::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:var(--seek-knob);height:var(--seek-knob);margin-top:calc((1px - var(--seek-knob))/2);border:0;background:transparent;box-shadow:none}
.playback-seek::-moz-range-track,.playback-seek::-moz-range-progress{height:1px;border:0;background:transparent}
.playback-seek::-moz-range-thumb{width:var(--seek-knob);height:var(--seek-knob);border:0;background:transparent;box-shadow:none}
.playback-seek:focus-visible{outline:none}
.playback-track:focus-within #play-progress{filter:drop-shadow(0 0 calc(var(--p)*3) #d8c7a544)}


/* A film-game timeline spans the bottom; playback and speed share its left controls. */
.playback-bar{flex-direction:column;align-items:stretch;gap:calc(var(--p)*16)}
.playback-bar>.playback-track{width:100%;flex:none}
.playback-controls{display:flex;justify-content:space-between;align-items:center;gap:calc(var(--p)*20)}

/* The visible handle follows the continuous fill, avoiding stepped motion during playback. */
.playback-track>span{position:relative}
.playback-track>span::after{content:"";box-sizing:border-box;position:absolute;right:0;top:50%;width:var(--seek-knob);height:var(--seek-knob);transform:translate(50%,-50%);border:1px solid #d8c7a599;border-radius:50%;background:#eee9dc;box-shadow:0 0 calc(var(--p)*5) #e5dbc933;pointer-events:none;transition:background .18s,box-shadow .2s,transform .2s var(--soft)}
.playback-track:is(:hover,:focus-within)>span::after{background:#fff9eb;box-shadow:0 0 calc(var(--p)*8) #e5dbc966;transform:translate(50%,-50%) scale(1.15)}
.playback-track:active>span::after{transform:translate(50%,-50%) scale(1.25)}
.playback-time{white-space:nowrap;color:#96a59a;font-size:calc(var(--p)*13);letter-spacing:.025em;font-variant-numeric:tabular-nums}

/* Header and transport share one idle state, independently of their initial entrance. */
:is(.game-hud,.playback-bar,.suite-top,.suite-stage-controls)[data-controls-visibility]{opacity:1;transform:translate3d(0,0,0);visibility:visible;transition:opacity .36s cubic-bezier(.22,.61,.36,1),transform .48s cubic-bezier(.16,1,.3,1),visibility 0s,gap .24s var(--soft)}
:is(.game-hud,.playback-bar,.suite-top,.suite-stage-controls)[data-controls-visibility=hidden]{opacity:0;transform:translate3d(0,6px,0);visibility:hidden;pointer-events:none;transition:opacity .48s cubic-bezier(.4,0,.3,1),transform .56s cubic-bezier(.4,0,.3,1),visibility 0s .56s,gap .24s var(--soft)}
@media(prefers-reduced-motion:reduce){:is(.game-hud,.playback-bar,.suite-top,.suite-stage-controls)[data-controls-visibility]{transform:none;transition:none}}
/* playtests.css */
.suite-frame{--suite-rim:#dce8df33;--suite-gold:#d8c7a5;--suite-soft:#cbd9d1;}
.suite-background{position:absolute;inset:0;z-index:-4;background:#0a1014;overflow:hidden;}
.suite-background>img{width:100%;height:100%;object-fit:cover;filter:blur(20px) brightness(.42);transform:scale(1.08);opacity:.9;}
.suite-shade{position:absolute;inset:0;z-index:-3;background:linear-gradient(90deg,#070c10ed,#081016b3 45%,#08101673),linear-gradient(0deg,#060a0fe8,transparent 65%);pointer-events:none;}
.suite-screen{overflow:hidden;}
.suite-loading{position:absolute;inset:0;display:flex;gap:calc(var(--p)*16);align-items:center;justify-content:center;font-size:calc(var(--p)*18);letter-spacing:.1em;color:#a5b0ab;}
.suite-loading>span{width:calc(var(--p)*6);height:calc(var(--p)*6);border-radius:50%;background:var(--suite-gold);animation:suite-breathe 2.6s ease-in-out infinite;}
.suite-top{position:absolute;left:var(--safe);right:var(--safe);top:calc(var(--p)*44);display:flex;justify-content:space-between;align-items:center;gap:calc(var(--p)*40);height:calc(var(--p)*42);z-index:20;}
.suite-top .back-heading{position:static;gap:calc(var(--p)*18);}
.suite-top h1{font-size:calc(var(--p)*30);letter-spacing:.06em;}
.suite-top-actions{display:flex;align-items:center;gap:calc(var(--p)*20);}
.suite-top-actions .subtle-btn{font-size:calc(var(--p)*16);gap:calc(var(--p)*9);}
.suite-categories{position:absolute;left:var(--safe);top:calc(var(--p)*180);bottom:calc(var(--p)*95);width:calc(var(--p)*263);display:flex;flex-direction:column;gap:calc(var(--p)*8);padding-right:calc(var(--p)*35);border-right:1px solid #dce8df16;}
.suite-category{position:relative;display:flex;gap:calc(var(--p)*17);align-items:center;min-height:calc(var(--p)*58);padding:0 calc(var(--p)*7);text-align:left;font-size:calc(var(--p)*19);color:#98a6a3;letter-spacing:.05em;transition:color .22s var(--soft),transform .32s var(--ease);}
.suite-category>small{font-size:calc(var(--p)*12);letter-spacing:.08em;color:#6f807e;font-variant-numeric:tabular-nums;}
.suite-category[aria-current="true"],.suite-category:hover,.suite-category:focus-visible{color:#eef0e8;transform:translateX(calc(var(--p)*3));outline:none;}
.suite-category[aria-current="true"]::before{content:"";position:absolute;left:calc(var(--p)*-15);width:calc(var(--p)*4);height:calc(var(--p)*4);border-radius:50%;background:var(--suite-gold);box-shadow:0 0 calc(var(--p)*9) #d8c7a552;}
.suite-library{position:absolute;left:calc(var(--safe) + var(--p)*310);right:var(--safe);top:calc(var(--p)*175);bottom:calc(var(--p)*80);display:flex;flex-direction:column;min-width:0;}
.suite-library-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:calc(var(--p)*30);padding:0 0 calc(var(--p)*36);}
.suite-library-heading h2{font-size:calc(var(--p)*38);font-weight:400;letter-spacing:.06em;margin:0 0 calc(var(--p)*12);line-height:1.35;}
.suite-library-heading p{font-size:calc(var(--p)*16);color:#a4b1ab;line-height:1.7;margin:0;letter-spacing:.045em;}
.suite-library-heading .btn{height:calc(var(--p)*46);min-width:calc(var(--p)*165);font-size:calc(var(--p)*17);flex:none;}
.suite-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:calc(var(--p)*24);overflow:auto;scrollbar-width:none;padding:calc(var(--p)*4) calc(var(--p)*3) calc(var(--p)*48);mask-image:linear-gradient(#000 0%,#000 calc(100% - var(--p)*40),transparent);}
.suite-grid::-webkit-scrollbar{display:none;}
.suite-card{position:relative;display:block;aspect-ratio:16/10;min-width:0;padding:0;overflow:hidden;border:1px solid #c4d5ce30;border-radius:calc(var(--p)*10);text-align:left;background:#121d23;transition:border-color .26s var(--soft),transform .4s var(--ease),box-shadow .4s var(--soft);}
.suite-card:hover,.suite-card:focus-visible{border-color:#d8dfd79c;transform:translateY(calc(var(--p)*-4));box-shadow:0 0 calc(var(--p)*20) #dce8df0b;outline:none;}
.suite-card>img{width:100%;height:100%;object-fit:cover;display:block;opacity:.32;filter:saturate(.6);transition:opacity .4s,transform .65s var(--ease);}
.suite-card:hover>img{opacity:.46;transform:scale(1.035);}
.suite-card::after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#071016ed,transparent 90%);pointer-events:none;}
.suite-card-symbol{position:absolute;z-index:1;left:calc(var(--p)*25);top:calc(var(--p)*26);font-size:calc(var(--p)*31);color:#d5daccd9;}
.suite-card-copy{position:absolute;left:calc(var(--p)*25);right:calc(var(--p)*22);bottom:calc(var(--p)*23);z-index:2;}
.suite-card-copy strong{display:block;font-size:calc(var(--p)*20);font-weight:400;line-height:1.4;letter-spacing:.04em;color:#e6eae1;}
.suite-card-copy small{display:block;margin-top:calc(var(--p)*7);font-size:calc(var(--p)*13);line-height:1.6;color:#93a39a;}
.suite-card-time{position:absolute;z-index:2;right:calc(var(--p)*20);top:calc(var(--p)*25);display:flex;gap:calc(var(--p)*7);align-items:center;font-size:calc(var(--p)*13);color:#bdc8be;}
.suite-footer{position:absolute;left:var(--safe);right:var(--safe);bottom:calc(var(--p)*37);display:flex;justify-content:space-between;align-items:center;font-size:calc(var(--p)*13);letter-spacing:.07em;color:#74857f;z-index:3;}
.suite-footer a{display:flex;gap:calc(var(--p)*9);align-items:center;color:#9daea4;}
.suite-footer a:hover{color:#e8ebe0;}
.suite-player{position:absolute;inset:0;isolation:isolate;}
.suite-media{position:absolute;inset:0;z-index:-2;overflow:hidden;background:#0b1115;}
.suite-media video,.suite-media>img{display:block;width:100%;height:100%;object-fit:cover;}
.suite-media::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#050a0d88,transparent 28%,transparent 60%,#050a0de8),linear-gradient(90deg,#050a0d38,transparent 45%,#050a0d24);}
.suite-player.is-board .suite-media,.suite-player.is-native .suite-media{filter:blur(18px) brightness(.36);transform:scale(1.06);}
.suite-play-heading{position:absolute;left:var(--safe);right:var(--safe);top:calc(var(--p)*126);z-index:4;text-align:center;pointer-events:none;}
.suite-play-heading h2{font-size:calc(var(--p)*27);font-weight:400;line-height:1.45;letter-spacing:.07em;margin:0 0 calc(var(--p)*11);}
.suite-play-heading p{margin:0 auto;font-size:calc(var(--p)*16);line-height:1.7;color:#b0bdb5;max-width:calc(var(--p)*1060);letter-spacing:.035em;}
.suite-timer{position:absolute;left:50%;top:calc(var(--p)*48);translate:-50% 0;display:flex;gap:calc(var(--p)*9);align-items:center;color:#d7ddcf;font-size:calc(var(--p)*16);font-variant-numeric:tabular-nums;}
.suite-timer svg{font-size:calc(var(--p)*17);opacity:.7;}
.suite-timer.is-urgent{color:#dbaea3;}
.suite-playbody{position:absolute;inset:calc(var(--p)*218) var(--safe) calc(var(--p)*145);display:grid;place-items:center;}
.suite-playbody.is-spatial{inset:0;}
.suite-board{position:relative;width:calc(var(--p)*620);height:calc(var(--p)*620);border:1px solid #dce8df26;background:linear-gradient(145deg,#223036db,#111c24eb);box-shadow:inset 0 1px 0 #e2e9df0a;border-radius:calc(var(--p)*6);}
.suite-stage-controls{position:absolute;left:var(--safe);right:var(--safe);bottom:calc(var(--p)*48);display:flex;align-items:center;justify-content:space-between;gap:calc(var(--p)*26);z-index:6;}
.suite-transport{display:flex;align-items:center;gap:calc(var(--p)*16);font-size:calc(var(--p)*15);color:#b3c0b7;}
.suite-transport>button{display:flex;gap:calc(var(--p)*10);align-items:center;padding:calc(var(--p)*7) 0;}
.suite-transport svg{font-size:calc(var(--p)*18);}
.suite-transport small{color:#8d9e92;font-size:calc(var(--p)*13);font-variant-numeric:tabular-nums;}
.suite-track{height:calc(var(--p)*18);width:calc(var(--p)*175);accent-color:var(--suite-gold);cursor:pointer;}
.suite-controls-right{display:flex;align-items:center;gap:calc(var(--p)*24);}
.suite-controls-right .subtle-btn{font-size:calc(var(--p)*15);}
.suite-controls-right .btn{height:calc(var(--p)*43);min-width:calc(var(--p)*142);font-size:calc(var(--p)*17);}
.suite-status{position:absolute;left:50%;bottom:calc(var(--p)*102);translate:-50% 0;display:flex;align-items:center;justify-content:center;gap:calc(var(--p)*10);font-size:calc(var(--p)*16);letter-spacing:.06em;color:#e1e4d6;min-height:calc(var(--p)*29);pointer-events:none;z-index:8;}
.suite-status.is-failure{color:#d5a294;}
.suite-status>svg{font-size:calc(var(--p)*19);color:var(--suite-gold);}
.suite-readiness{position:absolute;inset:0;z-index:5;display:grid;place-items:center;pointer-events:none;background:linear-gradient(180deg,transparent 45%,#080e1438);}
.suite-readiness>div{align-self:end;margin-bottom:calc(var(--p)*155);display:flex;flex-direction:column;align-items:center;gap:calc(var(--p)*18);pointer-events:auto;}
.suite-readiness .btn{height:calc(var(--p)*48);min-width:calc(var(--p)*176);font-size:calc(var(--p)*19);}
.suite-readiness small{font-size:calc(var(--p)*14);color:#a4b0a6;}
.suite-progress{height:calc(var(--p)*2);background:#d2dcd521;overflow:hidden;border-radius:1px;}
.suite-progress>span{display:block;height:100%;width:0;background:#d8c7a5;transition:width .15s linear;}
.suite-counter{display:flex;gap:calc(var(--p)*7);font-size:calc(var(--p)*17);color:#b6c4ba;font-variant-numeric:tabular-nums;align-items:baseline;}
.suite-counter strong{font-size:calc(var(--p)*27);font-weight:300;color:#e9ebdd;}
.suite-choices{position:absolute;left:var(--safe);right:var(--safe);bottom:calc(var(--p)*185);display:flex;flex-direction:column;align-items:center;gap:calc(var(--p)*29);z-index:3;}
.suite-question{font-size:calc(var(--p)*26);font-weight:400;line-height:1.6;letter-spacing:.065em;text-align:center;margin:0;max-width:calc(var(--p)*1400);}
.suite-question.is-long{font-size:calc(var(--p)*21);line-height:1.8;max-width:calc(var(--p)*1250);}
.suite-choice-rule{width:100%;height:1px;position:relative;background:linear-gradient(90deg,transparent,#e1e8da55 22%,#e1e8da88 50%,#e1e8da55 78%,transparent);}
.suite-choice-rule::before{content:"";position:absolute;left:50%;top:50%;translate:-50% -50%;width:calc(var(--p)*4);height:calc(var(--p)*4);background:#e6e9dd;border-radius:50%;box-shadow:0 0 0 calc(var(--p)*7) #0b1115;}
.suite-choice-grid{display:flex;flex-wrap:wrap;gap:calc(var(--p)*18) calc(var(--p)*38);justify-content:center;max-width:calc(var(--p)*1220);}
.suite-choice{position:relative;display:flex;align-items:center;justify-content:center;gap:calc(var(--p)*12);min-height:calc(var(--p)*53);min-width:calc(var(--p)*290);max-width:calc(var(--p)*570);padding:calc(var(--p)*9) calc(var(--p)*29);border:1px solid #e1e7db66;border-radius:calc(var(--p)*30);font-size:calc(var(--p)*20);font-weight:400;line-height:1.4;letter-spacing:.04em;background:linear-gradient(#dce8df04,#0c151a0d);color:#e4e9df;transition:background .3s var(--soft),border-color .26s var(--soft),box-shadow .32s var(--soft),transform .32s var(--ease);}
.suite-choice:hover,.suite-choice:focus-visible{border-color:#e5ecdfb3;box-shadow:inset 0 1px calc(var(--p)*5) #e7f0df1c,0 0 calc(var(--p)*15) #e1eadd0a;background:#e0e9df0c;outline:none;transform:translateY(calc(var(--p)*-2));}
.suite-choice[aria-disabled="true"]{color:#9ba59f9c;border-color:#c0cdb831;background:#0c151a26;cursor:not-allowed;}
.suite-choice[aria-disabled="true"] svg{font-size:calc(var(--p)*16);opacity:.75;}
.suite-choice[aria-disabled="true"]:hover{transform:none;border-color:#cbd6c64d;box-shadow:none;background:#c1cdb808;}
.suite-orb{position:relative;display:grid;place-items:center;width:calc(var(--p)*150);height:calc(var(--p)*150);padding:0;border-radius:50%;border:1px solid #dce8df70;background:radial-gradient(circle,#dce8df0f 0%,#14232b87 68%,#14232b00 73%);color:#e8edde;box-shadow:inset 0 0 calc(var(--p)*25) #dce8df0c;touch-action:none;user-select:none;}
.suite-orb svg{font-size:calc(var(--p)*40);}
.suite-orb::before{content:"";position:absolute;inset:calc(var(--p)*-9);border-radius:50%;border:1px solid #d8c7a54d;animation:suite-orbit-breathe 3.8s ease-in-out infinite;pointer-events:none;}
.suite-orb.is-held{background:radial-gradient(circle,#dce8df22,#263c4280 65%,transparent);border-color:#e7ead8bd;}
.suite-hold-progress{position:absolute;inset:calc(var(--p)*-12);width:calc(100% + var(--p)*24);height:calc(100% + var(--p)*24);rotate:-90deg;pointer-events:none;}
.suite-hold-progress circle{fill:none;stroke:#ddcfaf;stroke-width:1.5;stroke-dasharray:100;stroke-dashoffset:100;transition:stroke-dashoffset .08s linear;}
.suite-operation{display:grid;justify-items:center;gap:calc(var(--p)*25);}
.suite-operation-label{font-size:calc(var(--p)*16);letter-spacing:.1em;color:#a5b5a8;}
.suite-gesture-zone{position:relative;width:calc(var(--p)*700);height:calc(var(--p)*340);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--p)*28);touch-action:none;user-select:none;border-radius:calc(var(--p)*10);border:1px solid #dce8df1f;background:radial-gradient(ellipse,#2b3d4426,transparent 75%);overflow:hidden;}
.suite-gesture-zone>.suite-gesture-arrow{font-size:calc(var(--p)*88);color:#dbe5d3;}
.suite-gesture-zone>.suite-progress{width:calc(var(--p)*220);}
.suite-gesture-trail{position:absolute;font-size:calc(var(--p)*40);opacity:0;pointer-events:none;animation:suite-trail 1.5s ease-out infinite;}
.suite-paper{width:calc(var(--p)*660);height:calc(var(--p)*660);position:relative;}
.suite-paper svg{width:100%;height:100%;overflow:visible;touch-action:none;}
.suite-paper .paper-outline{fill:#b8bdad0a;stroke:#d6ddc461;stroke-width:1.4;stroke-dasharray:5 5;}
.suite-paper .paper-trace{fill:none;stroke:#e4d4ad;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 3px #e4d4ad33);}
.suite-paper .paper-start{fill:#eee2c7;stroke:#eee2c738;stroke-width:6;}
.suite-mini-actions{display:flex;gap:calc(var(--p)*23);align-items:center;justify-content:center;font-size:calc(var(--p)*15);color:#a8b9aa;}
.suite-mini-actions button{font:inherit;color:inherit;}
.suite-mini-actions button:hover{color:#eef1e4;}
.suite-balance{width:calc(var(--p)*750);display:grid;gap:calc(var(--p)*36);justify-items:center;touch-action:none;user-select:none;}
.suite-balance-track{position:relative;width:100%;height:calc(var(--p)*24);border:1px solid #dce8df2e;border-radius:calc(var(--p)*15);background:#111d2466;}
.suite-balance-zone{position:absolute;top:-1px;bottom:-1px;background:#d8c7a526;border:1px solid #d8c7a57a;border-radius:calc(var(--p)*12);}
.suite-balance-needle{position:absolute;top:calc(var(--p)*-10);height:calc(var(--p)*44);width:calc(var(--p)*3);border-radius:2px;background:#eef0de;box-shadow:0 0 calc(var(--p)*8) #e2e6d54d;}
.suite-scratch{width:calc(var(--p)*820);height:calc(var(--p)*460);position:relative;border:1px solid #dce8df40;border-radius:calc(var(--p)*7);overflow:hidden;touch-action:none;}
.suite-scratch>img,.suite-scratch>video,.suite-scratch>canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.suite-hotspot{position:absolute;translate:-50% -50%;padding:0;display:grid;place-items:center;min-width:calc(var(--p)*38);min-height:calc(var(--p)*38);border:0;border-radius:50%;color:#e2e9d8;touch-action:none;}
.suite-hotspot::before{content:"";position:absolute;width:calc(var(--p)*14);height:calc(var(--p)*14);border:1px solid #e2e9d8a6;rotate:45deg;background:#1b2e3780;box-shadow:0 0 calc(var(--p)*20) #d4e5db17;transition:transform .3s var(--soft),background .3s;}
.suite-hotspot:hover::before,.suite-hotspot:focus-visible::before{transform:scale(1.3);background:#d6e3d747;}
.suite-hotspot.is-found::before{background:#d8c7a5;opacity:.6;transform:scale(.6);}
.suite-hotspot .hotspot-label{position:absolute;top:100%;left:50%;translate:-50% calc(var(--p)*4);white-space:nowrap;font-size:calc(var(--p)*16);letter-spacing:.04em;color:#e0e8d8;text-shadow:0 2px 8px #000;}
.suite-direction{position:absolute;translate:-50% -50%;display:flex;gap:calc(var(--p)*16);align-items:center;padding:calc(var(--p)*14) calc(var(--p)*24);min-width:calc(var(--p)*220);border:1px solid #dbe5da4d;border-radius:calc(var(--p)*4);font-size:calc(var(--p)*20);background:linear-gradient(90deg,#12222c8c,#172b3180);backdrop-filter:blur(10px);color:#e3e9db;transition:background .3s,box-shadow .3s,border-color .3s;}
.suite-direction:hover{border-color:#dfe7daa3;box-shadow:inset 0 1px calc(var(--p)*6) #e3eddd26;background:#dae5df12;}
.suite-direction svg{font-size:calc(var(--p)*20);}
.suite-direction[data-dir="left"] svg{rotate:180deg;}
.suite-side-tools{position:absolute;right:var(--safe);top:calc(var(--p)*260);z-index:5;display:grid;gap:calc(var(--p)*18);}
.suite-side-tools .btn{min-width:calc(var(--p)*154);height:calc(var(--p)*45);font-size:calc(var(--p)*16);border-radius:calc(var(--p)*24);}
.suite-layer-switch{display:flex;padding:calc(var(--p)*4);border:1px solid #dce8df30;border-radius:calc(var(--p)*28);background:#0f20298c;backdrop-filter:blur(12px);}
.suite-layer-switch button{min-width:calc(var(--p)*64);height:calc(var(--p)*35);font-size:calc(var(--p)*16);color:#99ada3;border-radius:calc(var(--p)*20);}
.suite-layer-switch button[aria-pressed="true"]{color:#efe8d4;background:#d8c7a51c;box-shadow:inset 0 0 calc(var(--p)*10) #e8e8d514;}
.suite-inventory{display:flex;gap:calc(var(--p)*25);justify-content:center;align-items:center;}
.suite-item{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--p)*17);width:calc(var(--p)*150);height:calc(var(--p)*180);border:1px solid #cddbd03b;background:linear-gradient(145deg,#26343b87,#11212b9c);border-radius:calc(var(--p)*7);touch-action:none;}
.suite-item>svg{font-size:calc(var(--p)*47);color:#d8c7a5;}
.suite-item>span{font-size:calc(var(--p)*18);color:#dce6d7;}
.suite-item small{position:absolute;right:calc(var(--p)*14);top:calc(var(--p)*12);font-size:calc(var(--p)*14);color:#aebfae;}
.suite-item[aria-pressed="true"]{border-color:#d8c7a58c;box-shadow:inset 0 0 calc(var(--p)*20) #d8c7a512;}
.suite-drop-target{position:absolute;translate:-50% -50%;border:1px dashed #d8c7a587;border-radius:50%;display:grid;place-items:center;background:#d8c7a508;pointer-events:none;font-size:calc(var(--p)*15);color:#d8cfb8;}
.suite-craft{display:grid;justify-items:center;gap:calc(var(--p)*38);}
.suite-craft-slots{display:flex;align-items:center;gap:calc(var(--p)*28);}
.suite-craft-slot{width:calc(var(--p)*142);height:calc(var(--p)*142);border:1px solid #dce8df3d;border-radius:calc(var(--p)*8);background:#13252e73;display:grid;place-items:center;color:#d8c7a5;}
.suite-craft-slot>svg{font-size:calc(var(--p)*40);}
.suite-craft-plus{font-size:calc(var(--p)*24);font-weight:200;color:#8ea195;}
.suite-dials{display:flex;gap:calc(var(--p)*28);align-items:center;}
.suite-dial{display:grid;gap:calc(var(--p)*15);justify-items:center;width:calc(var(--p)*130);}
.suite-dial button{height:calc(var(--p)*36);width:100%;display:grid;place-items:center;font-size:calc(var(--p)*21);color:#b0c0b3;}
.suite-dial button:first-child svg{rotate:180deg;}
.suite-dial output{display:grid;place-items:center;width:calc(var(--p)*115);height:calc(var(--p)*145);font-size:calc(var(--p)*56);font-weight:300;font-variant-numeric:tabular-nums;color:#eceadd;background:linear-gradient(#1c2d3680,#2e3c4280 50%,#15252d80);border-block:1px solid #dce8df4d;border-radius:calc(var(--p)*5);}
.suite-calendar{width:calc(var(--p)*820);padding:calc(var(--p)*30) calc(var(--p)*35);background:linear-gradient(145deg,#20323be6,#111e27e6);border:1px solid #dce8df2e;border-radius:calc(var(--p)*8);}
.suite-calendar-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:calc(var(--p)*25);font-size:calc(var(--p)*24);font-weight:300;letter-spacing:.08em;color:#e4e8db;}
.suite-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:calc(var(--p)*5);}
.suite-calendar-grid>span{height:calc(var(--p)*32);text-align:center;font-size:calc(var(--p)*13);color:#83968c;}
.suite-calendar-day{position:relative;height:calc(var(--p)*63);display:grid;place-items:center;font-size:calc(var(--p)*18);font-weight:300;font-variant-numeric:tabular-nums;border-radius:calc(var(--p)*5);color:#8fa195;}
.suite-calendar-day.has-event{color:#e4dbc1;background:#d8c7a50e;border:1px solid #d8c7a535;}
.suite-calendar-day.has-event::after{content:"";position:absolute;bottom:calc(var(--p)*9);width:calc(var(--p)*3);height:calc(var(--p)*3);border-radius:50%;background:#d8c7a5;}
.suite-calendar-day[aria-pressed="true"]{box-shadow:inset 0 0 calc(var(--p)*20) #d8c7a51a;border-color:#dfd2b17a;}
.suite-calendar-day.is-viewed{opacity:.55;}
.suite-note-panel{position:absolute;inset:calc(var(--p)*155) calc(var(--p)*235) calc(var(--p)*140);z-index:10;border:1px solid #dce8df2e;border-radius:calc(var(--p)*7);background:#11222af2;backdrop-filter:blur(20px);padding:calc(var(--p)*35);overflow:auto;scrollbar-width:none;}
.suite-note-panel h3{font-size:calc(var(--p)*25);font-weight:400;letter-spacing:.07em;margin:0 0 calc(var(--p)*25);}
.suite-note-panel p{font-size:calc(var(--p)*18);line-height:2;color:#b8c6b9;}
.suite-note-panel .note-close{position:absolute;top:calc(var(--p)*19);right:calc(var(--p)*19);font-size:calc(var(--p)*22);}
.suite-photo-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:calc(var(--p)*16);}
.suite-photo-card{padding:0;border:1px solid #dce8df33;border-radius:calc(var(--p)*5);overflow:hidden;text-align:left;background:#1c2e3799;}
.suite-photo-card img{width:100%;aspect-ratio:1.35;object-fit:contain;display:block;background:#0a151c;}
.suite-photo-card span{display:block;font-size:calc(var(--p)*15);padding:calc(var(--p)*11);color:#c3d0c0;}
.suite-photo-card[aria-pressed="true"]{border-color:#d8c7a596;}
.suite-note-text{white-space:pre-line;}
.suite-note-text select{background:#e0e6db0a;border:0;border-bottom:1px solid #d8c7a58c;color:#e1d4b2;font-size:inherit;max-width:calc(var(--p)*140);padding:calc(var(--p)*2) calc(var(--p)*7);}
.suite-voice{display:grid;justify-items:center;gap:calc(var(--p)*30);}
.suite-voice-quote{font-size:calc(var(--p)*30);font-weight:300;letter-spacing:.16em;color:#e9e5d5;margin-bottom:calc(var(--p)*10);}
.suite-voice input{width:calc(var(--p)*430);height:calc(var(--p)*49);background:#14273287;border:1px solid #dce8df40;border-radius:calc(var(--p)*4);color:#e2e8d9;padding:0 calc(var(--p)*17);font-size:calc(var(--p)*18);text-align:center;}
.suite-voice input::placeholder{color:#82968b;}
.suite-puzzle{width:calc(var(--p)*630);height:calc(var(--p)*630);display:grid;gap:calc(var(--p)*4);border:1px solid #dce8df3b;border-radius:calc(var(--p)*5);padding:calc(var(--p)*7);background:#10232a80;}
.suite-puzzle-piece{position:relative;border:1px solid #dce8df26;touch-action:none;cursor:grab;background-repeat:no-repeat;transition:transform .3s var(--ease),border-color .25s;}
.suite-puzzle-piece[aria-pressed="true"]{border-color:#e5d4ab;box-shadow:0 0 calc(var(--p)*12) #d8c7a52e;z-index:2;transform:scale(.96);}
.suite-game-hud{position:absolute;left:var(--safe);right:var(--safe);top:calc(var(--p)*225);display:flex;justify-content:space-between;pointer-events:none;font-size:calc(var(--p)*16);color:#bccbbd;z-index:3;}
.suite-game-hud .hud-stat{display:flex;flex-direction:column;gap:calc(var(--p)*9);}
.suite-game-hud .hud-stat:last-child{text-align:right;}
.suite-game-hud strong{font-size:calc(var(--p)*30);font-weight:300;color:#e5e9dc;letter-spacing:.05em;}
.suite-native{position:relative;width:100%;height:100%;display:grid;place-items:center;}
.suite-native-stage{position:relative;display:grid;place-items:center;width:calc(var(--p)*730);height:calc(var(--p)*620);}
.suite-native-title{position:absolute;top:calc(var(--p)*-31);font-size:calc(var(--p)*16);color:#cfdbc9;letter-spacing:.08em;}
.suite-native-notice{position:absolute;bottom:calc(var(--p)*-35);font-size:calc(var(--p)*13);color:#879d90;letter-spacing:.04em;}
.suite-chess-board{display:grid;position:relative;width:calc(var(--p)*590);aspect-ratio:1;border:1px solid #dce8df4d;box-shadow:0 0 0 calc(var(--p)*9) #16262e9c;border-radius:calc(var(--p)*2);overflow:hidden;}
.suite-chess-cell{padding:0;display:grid;place-items:center;font-size:calc(var(--p)*42);line-height:1;color:#e7e4d4;background:#6c7b7366;transition:background .2s;}
.suite-chess-cell.is-dark{background:#20343eaa;}
.suite-chess-cell.is-black{color:#0a1720;text-shadow:0 0 1px #d0dfd5;}
.suite-chess-cell:hover,.suite-chess-cell.is-selected{background:#d8c7a54d;}
.suite-gomoku{position:relative;width:calc(var(--p)*590);height:calc(var(--p)*590);padding:calc(var(--p)*20);background:#22343be6;border:1px solid #dce8df45;border-radius:calc(var(--p)*5);}
.suite-gomoku svg{position:absolute;inset:calc(var(--p)*20);width:calc(100% - var(--p)*40);height:calc(100% - var(--p)*40);stroke:#c9d8c852;stroke-width:.8;pointer-events:none;}
.suite-gomoku-grid{position:absolute;inset:0;display:grid;grid-template-columns:repeat(15,1fr);grid-template-rows:repeat(15,1fr);padding:calc(var(--p)*1);}
.suite-gomoku-cell{position:relative;padding:0;display:grid;place-items:center;}
.suite-gomoku-cell::before{content:"";width:72%;height:72%;border-radius:50%;background:transparent;transition:background .2s;}
.suite-gomoku-cell:hover::before{background:#d8c7a530;}
.suite-gomoku-cell[data-stone="1"]::before{background:radial-gradient(circle at 35% 30%,#53616a,#0a1720 75%);box-shadow:0 2px 4px #0005;}
.suite-gomoku-cell[data-stone="2"]::before{background:radial-gradient(circle at 35% 30%,#f4f0dd,#bdc5b8 80%);}
.suite-sudoku{display:grid;grid-template-columns:repeat(6,1fr);width:calc(var(--p)*540);height:calc(var(--p)*540);background:#142a34b3;border:1px solid #dce8df60;border-radius:calc(var(--p)*5);overflow:hidden;}
.suite-sudoku button{font-size:calc(var(--p)*31);font-weight:300;border-right:1px solid #dce8df24;border-bottom:1px solid #dce8df24;color:#c6d3c1;}
.suite-sudoku button:nth-child(3n){border-right-color:#dce8df60;}
.suite-sudoku button:nth-child(n+13):nth-child(-n+18),.suite-sudoku button:nth-child(n+25):nth-child(-n+30){border-bottom-color:#dce8df60;}
.suite-sudoku button:hover,.suite-sudoku button.is-selected{background:#d8c7a521;}
.suite-number-pad{position:absolute;bottom:calc(var(--p)*-25);display:flex;gap:calc(var(--p)*12);}
.suite-number-pad button{width:calc(var(--p)*47);height:calc(var(--p)*41);font-size:calc(var(--p)*20);border:1px solid #dce8df40;border-radius:calc(var(--p)*4);background:#21343b80;color:#d7e0cd;}
.suite-tiles{position:relative;width:calc(var(--p)*670);height:calc(var(--p)*470);display:flex;justify-content:center;align-content:center;flex-wrap:wrap;gap:calc(var(--p)*10);padding:calc(var(--p)*25);}
.suite-tile{display:grid;place-items:center;width:calc(var(--p)*74);height:calc(var(--p)*86);border:1px solid #dce8df55;border-radius:calc(var(--p)*7);background:linear-gradient(135deg,#d8e0d8d9,#8caba2b3);box-shadow:0 calc(var(--p)*4) 0 #233e46;color:#20444c;font-size:calc(var(--p)*30);transition:transform .25s var(--ease);}
.suite-tile:hover{transform:translateY(calc(var(--p)*-4));}
.suite-tile-slot{position:absolute;bottom:calc(var(--p)*-14);height:calc(var(--p)*85);width:calc(var(--p)*620);border:1px solid #dce8df55;border-radius:calc(var(--p)*8);background:linear-gradient(#101f28b3,#243e4880);display:flex;gap:calc(var(--p)*6);justify-content:center;align-items:center;}
.suite-tile-slot::before{content:"";position:absolute;inset:calc(var(--p)*8);border:1px dashed #dce8df1f;border-radius:calc(var(--p)*4);pointer-events:none;}
.suite-tile-slot .suite-tile{width:calc(var(--p)*65);height:calc(var(--p)*65);font-size:calc(var(--p)*25);}
.suite-xiangqi{position:relative;width:calc(var(--p)*530);height:calc(var(--p)*590);display:grid;grid-template-columns:repeat(9,1fr);grid-template-rows:repeat(10,1fr);padding:calc(var(--p)*5);border:1px solid #dce8df5c;border-radius:calc(var(--p)*5);background:repeating-linear-gradient(0deg,transparent,transparent calc(var(--p)*57),#c9d8c838 calc(var(--p)*58),transparent calc(var(--p)*59)),repeating-linear-gradient(90deg,#25383be6,#25383be6 calc(var(--p)*57),#c9d8c838 calc(var(--p)*58),#25383be6 calc(var(--p)*59));}
.suite-xiangqi::before{content:"楚 河　　　汉 界";position:absolute;top:45%;left:0;right:0;height:10%;display:grid;place-items:center;background:#25383b;font-size:calc(var(--p)*24);color:#9ead9d;letter-spacing:.1em;pointer-events:none;}
.suite-xiangqi button{position:relative;padding:0;display:grid;place-items:center;z-index:1;}
.suite-xiangqi-piece{display:grid;place-items:center;width:calc(var(--p)*46);height:calc(var(--p)*46);border:1px solid #d0c1a4;border-radius:50%;background:radial-gradient(#d6d0b8,#89998d);font-size:calc(var(--p)*25);color:#593b35;box-shadow:0 2px 4px #0005;}
.suite-xiangqi-piece.is-black{color:#263c43;}
.suite-xiangqi button.is-selected .suite-xiangqi-piece{box-shadow:0 0 calc(var(--p)*18) #d8c7a54d;outline:1px solid #e7dbc0;outline-offset:2px;}
.suite-race-scene{position:relative;width:calc(var(--p)*970);height:calc(var(--p)*535);overflow:hidden;background:linear-gradient(#102331,#6d8277 47%,#132a2a 48%,#182727);border:1px solid #dce8df2e;border-radius:calc(var(--p)*5);}
.suite-race-road{position:absolute;left:14%;right:14%;top:32%;bottom:-10%;background:repeating-linear-gradient(90deg,#506063 0 1%,#1c292c 1% 32%,#77837a 32% 33%,#1c292c 33% 66%,#77837a 66% 67%,#1c292c 67% 99%,#506063 99%);clip-path:polygon(45% 0,55% 0,100% 100%,0 100%);}
.suite-race-sun{position:absolute;left:58%;top:18%;width:calc(var(--p)*70);height:calc(var(--p)*70);border-radius:50%;background:#c7c6a642;box-shadow:0 0 calc(var(--p)*100) #d8c7a521;}
.suite-race-car{position:absolute;bottom:12%;left:calc(50% - var(--p)*45);width:calc(var(--p)*90);height:calc(var(--p)*135);border:1px solid #b4a783;border-radius:25% 25% 15% 15%;background:linear-gradient(90deg,#695f40,#ac9871 45%,#73684a);box-shadow:0 8px 12px #0007;transition:translate .3s var(--ease);}
.suite-race-car::before{content:"";position:absolute;inset:16% 13% 40%;border-radius:18% 18% 8% 8%;background:#152a32;border:1px solid #8d9f9870;}
.suite-race-instruments{position:absolute;bottom:calc(var(--p)*25);left:calc(var(--p)*25);right:calc(var(--p)*25);display:flex;justify-content:space-between;align-items:flex-end;color:#dce5d5;}
.suite-race-speed{font-size:calc(var(--p)*44);font-weight:200;font-variant-numeric:tabular-nums;}
.suite-race-speed small{font-size:calc(var(--p)*12);margin-left:calc(var(--p)*6);color:#9cafa2;}
.suite-race-rank{font-size:calc(var(--p)*27);font-weight:300;}
.suite-pool{position:relative;width:calc(var(--p)*900);height:calc(var(--p)*475);border:calc(var(--p)*20) solid #3d4b49;border-radius:calc(var(--p)*35);background:radial-gradient(ellipse,#356565,#1d4149);box-shadow:inset 0 0 calc(var(--p)*24) #07191f80;overflow:hidden;touch-action:none;}
.suite-pool-hole{position:absolute;width:calc(var(--p)*31);height:calc(var(--p)*31);border-radius:50%;background:#091c22;translate:-50% -50%;box-shadow:inset 0 0 4px #000;}
.suite-pool-ball{position:absolute;translate:-50% -50%;width:calc(var(--p)*25);height:calc(var(--p)*25);border-radius:50%;background:radial-gradient(circle at 32% 28%,#f1ead4,#a8c1b4);box-shadow:0 2px 3px #0007;display:grid;place-items:center;font-size:calc(var(--p)*10);color:#102d34;}
.suite-pool-ball.is-color{background:radial-gradient(circle at 32% 28%,#d7b785,#8c724b);}
.suite-pool-aim{position:absolute;left:23%;top:50%;width:40%;height:1px;transform-origin:left;background:linear-gradient(90deg,#e0e6d8b3,transparent);pointer-events:none;}
.suite-shot-power{position:absolute;right:calc(var(--p)*-80);height:calc(var(--p)*260);display:flex;flex-direction:column;align-items:center;gap:calc(var(--p)*12);font-size:calc(var(--p)*14);color:#a9bca9;}
.suite-shot-power input{writing-mode:vertical-lr;direction:rtl;appearance:slider-vertical;width:calc(var(--p)*22);height:100%;accent-color:#d8c7a5;}
.suite-basket-court{position:relative;width:calc(var(--p)*800);height:calc(var(--p)*510);overflow:hidden;background:linear-gradient(#10242f,#253b41 65%,#56605a 65%,#38473e);border:1px solid #dce8df33;border-radius:calc(var(--p)*5);touch-action:none;}
.suite-basket-board{position:absolute;left:43%;top:14%;width:14%;height:20%;border:1px solid #dce8df9c;background:#dce8df0e;}
.suite-basket-ring{position:absolute;left:46%;top:32%;width:8%;height:calc(var(--p)*12);border:2px solid #d8ba8a;border-radius:50%;}
.suite-basket-ball{position:absolute;left:45%;bottom:8%;width:calc(var(--p)*65);height:calc(var(--p)*65);border:1px solid #d7b17e;border-radius:50%;background:radial-gradient(circle at 30% 25%,#c6a46d,#75593f);}
.suite-basket-ball::before{content:"";position:absolute;inset:0;border-radius:50%;background:linear-gradient(90deg,transparent 48%,#674e38 49% 51%,transparent 52%),linear-gradient(0deg,transparent 48%,#674e38 49% 51%,transparent 52%);}
.suite-rhythm-note{position:absolute;translate:-50% -50%;width:calc(var(--p)*130);height:calc(var(--p)*130);padding:0;border-radius:50%;border:1px solid #dce8dfb3;background:radial-gradient(circle,#dce8df14,#1a303b73 65%,transparent);color:#e6eadb;display:grid;place-items:center;touch-action:none;}
.suite-rhythm-note>svg{font-size:calc(var(--p)*39);}
.suite-rhythm-note::before{content:"";position:absolute;inset:calc(var(--p)*-27);border-radius:50%;border:1px solid #d8c7a5a6;transform:scale(var(--approach,1));opacity:var(--note-opacity,.8);pointer-events:none;}
.suite-rhythm-note.is-hit{border-color:#e9dfba;box-shadow:0 0 calc(var(--p)*30) #d8c7a526;}
.suite-rhythm-judgment{position:absolute;translate:-50% -50%;font-size:calc(var(--p)*24);font-weight:300;letter-spacing:.12em;color:#e9dfc2;pointer-events:none;animation:suite-judgment 1s var(--ease) both;}
.suite-rhythm-judgment.is-miss{color:#aab4ad;font-size:calc(var(--p)*19);}
.suite-moles{display:grid;grid-template-columns:repeat(3,1fr);gap:calc(var(--p)*28);width:calc(var(--p)*650);}
.suite-mole{position:relative;aspect-ratio:1.3;border:1px solid #dce8df26;border-radius:50%;background:radial-gradient(ellipse,#10242d 40%,#2a3f4380 65%,transparent 68%);display:grid;place-items:center;padding:0;overflow:hidden;}
.suite-mole>span{width:60%;height:75%;border:1px solid #d8c7a573;border-radius:50% 50% 30% 30%;background:linear-gradient(#8e9f8666,#3b5c5cb3);display:grid;place-items:center;color:#f0e7c9;font-size:calc(var(--p)*23);translate:0 130%;transition:translate .18s var(--ease);}
.suite-mole.is-visible>span{translate:0 0;}
.suite-mole.is-hit>span{translate:0 110%;opacity:.5;}
.suite-engine-badge{position:absolute;left:50%;bottom:calc(var(--p)*100);translate:-50% 0;font-size:calc(var(--p)*13);letter-spacing:.06em;color:#7d9487;}
.suite-webgame{position:absolute;inset:calc(var(--p)*115) var(--safe) calc(var(--p)*110);border:1px solid #dce8df29;border-radius:calc(var(--p)*5);overflow:hidden;background:#10232a;}
.suite-webgame iframe{width:100%;height:100%;border:0;}
.suite-web-intro{height:100%;display:grid;place-content:center;justify-items:center;gap:calc(var(--p)*25);background:radial-gradient(ellipse at 50% 30%,#40676a26,transparent 70%);}
.suite-web-intro>svg{font-size:calc(var(--p)*60);color:#d1d6bd;}
.suite-web-intro h3{font-size:calc(var(--p)*30);font-weight:300;letter-spacing:.12em;margin:0;}
.suite-web-intro p{font-size:calc(var(--p)*16);color:#9cb0a0;margin:0;}
.suite-review{overflow-y:auto;scrollbar-width:none;max-height:80vh;}
.suite-review nav{display:grid;gap:calc(var(--p)*5);max-height:45vh;overflow:auto;scrollbar-width:none;}
.suite-review nav button{font-size:calc(var(--p)*14);text-align:left;padding:calc(var(--p)*10);color:#a6b9a9;border-bottom:1px solid #dce8df12;}
.suite-review nav button:hover{color:#edf0df;background:#dce8df0b;}
.suite-review-states{display:flex;flex-wrap:wrap;gap:calc(var(--p)*7);padding-top:calc(var(--p)*15);border-top:1px solid #dce8df26;margin-top:calc(var(--p)*14);}
.suite-review-states>span{width:100%;font-size:calc(var(--p)*12);color:#7d9487;margin-bottom:calc(var(--p)*5);}
.suite-review-states>button{font-size:calc(var(--p)*13);padding:calc(var(--p)*7) calc(var(--p)*9);color:#b4c3af;border:1px solid #dce8df1f;border-radius:calc(var(--p)*3);}
.suite-float-dot{position:absolute;width:calc(var(--p)*2);height:calc(var(--p)*2);border-radius:50%;background:#d4dfc9;opacity:.2;pointer-events:none;animation:suite-dust 9s ease-in-out infinite;}
.suite-dust-field{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden;}
@keyframes suite-breathe{0%,100%{opacity:.3}50%{opacity:.8}}
@keyframes suite-orbit-breathe{0%,100%{scale:.98;opacity:.35}50%{scale:1.035;opacity:.75}}
@keyframes suite-trail{0%{translate:calc(var(--trail-x,0)*var(--p)) calc(var(--trail-y,0)*var(--p));opacity:.4}100%{translate:calc(var(--trail-x,0)*var(--p)*2) calc(var(--trail-y,0)*var(--p)*2);opacity:0}}
@keyframes suite-judgment{0%{opacity:0;transform:translateY(6px) scale(.98)}20%{opacity:1;transform:translateY(0) scale(1)}70%{opacity:1}100%{opacity:0;transform:translateY(-12px)}}
@keyframes suite-dust{0%,100%{translate:0 0;opacity:.07}50%{translate:calc(var(--p)*9) calc(var(--p)*-20);opacity:.24}}
@media(prefers-reduced-motion:reduce){.suite-frame *,.suite-frame *::before,.suite-frame *::after{animation:none!important;transition:none!important;}.suite-float-dot{display:none;}}

/* Spatial media keeps its original coordinate system; the blurred cover fills the viewport. */
.suite-frame{isolation:isolate;min-height:100dvh;}
.suite-frame [hidden]{display:none!important;}
.suite-frame svg{width:1em;height:1em;flex:none;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;}
.suite-spatial-plane{position:absolute;inset:0;margin:auto;width:min(100vw,177.7778dvh);height:min(56.25vw,100dvh);pointer-events:none;}
.suite-spatial-plane .suite-playbody{pointer-events:auto;}
.suite-player.is-ready .suite-playbody{opacity:.32;pointer-events:none;filter:blur(1px);}
.suite-playbody{transition:opacity .55s var(--soft),filter .55s;}
.suite-playbody button:focus-visible{outline:1px solid #ddd5be;outline-offset:4px;}
.suite-player .suite-media video{object-fit:contain;}
.suite-player .suite-media{background:transparent;}
.suite-player .suite-media::after{background:linear-gradient(180deg,#050a0da6,transparent 30%,transparent 58%,#050a0ded);}
.suite-player.is-board .suite-media,.suite-player.is-native .suite-media{opacity:.25;}
.suite-sound{width:calc(var(--p)*36);height:calc(var(--p)*36);font-size:calc(var(--p)*22);color:#b7c5bb;display:grid;place-items:center;}
.suite-sound:hover{color:#f1eee0;filter:drop-shadow(0 0 6px #dce8df40);}
.suite-top .back-btn{width:calc(var(--p)*28);height:calc(var(--p)*36);font-size:calc(var(--p)*25);background:transparent;border:0;box-shadow:none;}
.suite-top h1{margin:0;font-weight:400;}
.suite-review nav{grid-template-columns:1fr;}
.suite-review hr{width:100%;border:0;border-top:1px solid #dce8df20;}
.suite-review-note,.suite-review-source{font-size:11px!important;line-height:1.8;color:#849b90!important;}
.suite-area-option{position:absolute;translate:-50% -50%;display:grid;place-items:center;overflow:hidden;border:1px solid #dce8df50;border-radius:calc(var(--p)*8);background:#162a34aa;box-shadow:inset 0 0 calc(var(--p)*30) #e1eadc08;transition:border-color .3s,box-shadow .4s,transform .4s var(--ease);}
.suite-area-option>img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;opacity:.7;}
.suite-area-option>svg{font-size:calc(var(--p)*55);opacity:.6;}
.suite-area-option>span{position:absolute;bottom:8%;font-size:calc(var(--p)*19);letter-spacing:.08em;}
.suite-area-option:hover,.suite-area-option.is-selected{border-color:#e3d8b8;box-shadow:0 0 calc(var(--p)*24) #dce8df17;transform:translateY(calc(var(--p)*-4));}
.suite-orb:active{transform:scale(.985);}
.suite-player[data-feedback="success"] .suite-orb::before{animation:suite-feedback-ring 1s var(--ease) both;}
.suite-player[data-feedback="success"] .suite-status{color:#e5dcc2;}
.suite-summary{display:flex;flex-direction:column;align-items:center;gap:calc(var(--p)*24);text-align:center;max-width:calc(var(--p)*1150);}
.suite-summary-symbol{font-size:calc(var(--p)*68);color:#dccb9d;filter:drop-shadow(0 0 20px #d8c7a53b);}
.suite-summary h2{font-size:calc(var(--p)*47);letter-spacing:.12em;font-weight:300;margin:0;}
.suite-summary p{font-size:calc(var(--p)*18);line-height:1.9;color:#a9b9aa;max-width:calc(var(--p)*900);}
.suite-summary-actions{display:flex;gap:calc(var(--p)*23);margin-top:calc(var(--p)*20);}
.suite-narrative{display:grid;justify-items:center;gap:calc(var(--p)*18);text-align:center;max-width:calc(var(--p)*1100);}
.suite-narrative>span{font-size:calc(var(--p)*42);color:#b6c4b5;opacity:.7;}
.suite-narrative h3{font-size:calc(var(--p)*27);font-weight:300;line-height:1.9;letter-spacing:.05em;}
.suite-narrative p{font-size:calc(var(--p)*15);letter-spacing:.16em;color:#83998a;}
.suite-scan-light{position:absolute;left:50%;top:50%;translate:-50% -50%;width:calc(var(--p)*230);height:calc(var(--p)*230);border-radius:50%;background:radial-gradient(circle,#dce8df26,transparent 70%);mix-blend-mode:screen;pointer-events:none;}
.suite-use-items{display:grid;gap:calc(var(--p)*24);justify-items:center;}
.suite-playbody.is-spatial .suite-use-items{position:absolute;bottom:14%;left:50%;translate:-50% 0;}
.suite-playbody.is-spatial .suite-use-items .suite-item{width:calc(var(--p)*118);height:calc(var(--p)*140);}
.suite-playbody.is-spatial .suite-use-items .suite-item>svg{font-size:calc(var(--p)*32);}
.suite-drop-target{z-index:-1;}
.suite-puzzle-timeout{position:absolute;inset:0;display:grid;place-items:center;font-size:calc(var(--p)*110);color:#ece4ca;background:#0b172288;animation:suite-timeout-word 2.5s ease-out both;}
.suite-shoot-target{position:absolute;translate:-50% -50%;display:grid;place-items:center;color:#d7dfce;}
.suite-shoot-target>svg{width:75%;height:75%;opacity:.85;stroke-width:.5;}
.suite-shot-mark{position:absolute;width:calc(var(--p)*14);height:calc(var(--p)*14);border-radius:50%;border:1px solid #e3d7b7;translate:-50% -50%;animation:suite-shot .6s ease-out both;pointer-events:none;}
.suite-memory{display:grid;grid-template-columns:calc(var(--p)*280) 1fr;gap:calc(var(--p)*30);align-items:center;}
.suite-memory img{width:100%;max-height:calc(var(--p)*360);object-fit:contain;grid-row:span 2;}
.suite-memory .btn{justify-self:start;}
.suite-character-stats{display:grid;grid-template-columns:1fr 1fr;gap:calc(var(--p)*60);}
.suite-peek-media{position:absolute!important;inset:0;opacity:0;transition:opacity .25s;}
.suite-emotion{display:grid;grid-template-columns:auto calc(var(--p)*240) auto;gap:calc(var(--p)*18);align-items:center;font-size:calc(var(--p)*15);color:#a9b7a8;}
.suite-emotion small{min-width:calc(var(--p)*40);}
.suite-rhythm-field{position:absolute;inset:0;touch-action:none;}
.suite-rhythm-note{touch-action:none;user-select:none;}
.suite-rhythm-note>span{pointer-events:none;font-size:calc(var(--p)*18);}
.suite-rhythm-note .note-progress{position:absolute;inset:-2%;width:104%;height:104%;rotate:-90deg;pointer-events:none;}
.suite-rhythm-note .note-progress circle{fill:none;stroke:#e5d8b0;stroke-width:1.5;stroke-dasharray:100;stroke-dashoffset:100;}
.suite-rhythm-score{position:absolute;right:var(--safe);top:calc(var(--p)*220);display:flex;gap:calc(var(--p)*10);align-items:baseline;font-size:calc(var(--p)*14);color:#a6b8aa;pointer-events:none;}
.suite-rhythm-score strong{font-size:calc(var(--p)*29);font-weight:300;color:#e4e8da;}
.suite-timed-feedback{position:absolute;left:50%;top:30%;translate:-50% 0;display:flex;align-items:center;gap:calc(var(--p)*15);font-size:calc(var(--p)*27);letter-spacing:.15em;color:#e7dfc5;animation:suite-judgment .7s var(--ease) both;}
.suite-timed-feedback.is-miss{color:#a7b4ad;}
.suite-speed-wrap{position:relative;}
.suite-speed-menu{position:absolute;left:calc(var(--p)*-26);bottom:calc(var(--p)*44);width:calc(var(--p)*155);padding:calc(var(--p)*9);border-radius:calc(var(--p)*7);background:linear-gradient(135deg,#1a292ef2,#0b171deb);border:1px solid #dce8df3a;box-shadow:inset 0 1px 0 #dce8df0a,0 15px 35px #0003;backdrop-filter:blur(18px);z-index:30;transform-origin:50% 100%;}
.suite-speed-menu>button{width:100%;display:flex;justify-content:space-between;align-items:center;height:calc(var(--p)*44);padding:0 calc(var(--p)*13);font-size:calc(var(--p)*17);border-radius:calc(var(--p)*4);border:1px solid transparent;color:#a7b6ae;transition:background .24s,color .24s,border-color .24s,box-shadow .24s;}
.suite-speed-menu>button:hover{background:#e0e7dd0a;color:#edf0e4;}
.suite-speed-menu>button[aria-checked="true"]{color:#eeeadb;border-color:#e2e7dc31;background:linear-gradient(145deg,#dce8df14,#dce8df05);box-shadow:inset 0 1px 7px #dce8df0d;}
.suite-native-shoot{min-width:calc(var(--p)*90);}
.suite-pool .pool-hole{position:absolute;width:calc(var(--p)*30);height:calc(var(--p)*30);border-radius:50%;translate:-50% -50%;background:#07181e;}
.suite-pool-ball:not(.is-cue){background:radial-gradient(circle at 30% 25%,hsl(var(--ball-hue) 45% 70%),hsl(var(--ball-hue) 35% 37%));}
.suite-native-stage .suite-shot-power{right:calc(var(--p)*-150);}
.suite-web-close{position:absolute;right:calc(var(--p)*105);top:calc(var(--p)*130);display:flex;align-items:center;gap:calc(var(--p)*10);padding:calc(var(--p)*10) calc(var(--p)*18);font-size:calc(var(--p)*15);color:#e0e6d8;background:#101f29c9;border:1px solid #dce8df40;border-radius:calc(var(--p)*25);}
.suite-web-state{font-size:calc(var(--p)*13);color:#7f9788;}
@keyframes suite-feedback-ring{0%{opacity:.8;scale:1}100%{opacity:0;scale:1.6}}
@keyframes suite-shot{0%{scale:.5;opacity:1}100%{scale:4;opacity:0}}
@keyframes suite-timeout-word{from{opacity:0;filter:blur(6px)}to{opacity:1;filter:blur(0)}}

.suite-frame .btn{border-radius:999px;border-color:#e7e9e57d;background:#131d2230;box-shadow:inset 0 1px 0 #e7ede50d;}
.suite-frame .btn-primary{background:radial-gradient(ellipse at 50% -15%,#f2f5f16b,transparent 67%),radial-gradient(ellipse at 50% 120%,#e3ece155,transparent 70%),linear-gradient(#e8ede50a,#c7d4d214);box-shadow:inset 0 1px 3px #f4f7f16b,inset 0 -1px 4px #e2ede55c;border-color:#f3f5f1a3;}
.suite-frame .btn:hover{border-color:#eef2e6b3;box-shadow:inset 0 1px 7px #e9f0e433,0 0 12px #dce8df0b;}
.suite-frame .suite-hold-progress{position:absolute;inset:calc(var(--p)*-12);width:calc(100% + var(--p)*24);height:calc(100% + var(--p)*24);}
.suite-frame .suite-paper>svg{width:100%;height:100%;}
.suite-frame .suite-gomoku>svg{width:calc(100% - var(--p)*40);height:calc(100% - var(--p)*40);}
.suite-frame .suite-rhythm-note>.note-progress{position:absolute;inset:-2%;width:104%;height:104%;}
.suite-rhythm-field{position:absolute;inset:0;touch-action:none;}
.suite-character-stats{display:grid;grid-template-columns:1fr 1fr;gap:calc(var(--p)*60);padding:calc(var(--p)*35);}
.suite-character-stats h3{font-size:calc(var(--p)*29);font-weight:300;}
.suite-memory,.suite-evidence{display:grid;justify-items:center;gap:calc(var(--p)*18);}
.suite-memory>img,.suite-evidence>img{max-height:calc(var(--p)*410);max-width:90%;object-fit:contain;border:1px solid #dce8df26;border-radius:calc(var(--p)*5);}
.suite-memory>p,.suite-evidence>p{margin:0;text-align:center;}
.suite-evidence>small{color:#d8c7a5;font-size:calc(var(--p)*15);}
.suite-emotion{display:grid;grid-template-columns:auto calc(var(--p)*300) auto;align-items:center;gap:calc(var(--p)*20);font-size:calc(var(--p)*16);color:#b2bfae;}
.suite-emotion small{font-size:calc(var(--p)*14);color:#d8c7a5;}
.suite-player:not(.has-spatial) .suite-media video{object-fit:cover;}
.suite-media video{mask-image:linear-gradient(transparent,#000 1%,#000 99%,transparent);}
.suite-peek-media{position:absolute!important;inset:0;opacity:0;transition:opacity .2s ease;}

.suite-flow-actions{display:grid;justify-items:center;gap:calc(var(--p)*12);padding-top:calc(var(--p)*5);}
.suite-flow-actions>.subtle-btn{font-size:calc(var(--p)*13);color:#93a89b;}
.suite-gomoku-cell.is-selected::before{background:#dce8df44;box-shadow:0 0 calc(var(--p)*15) #d8c7a52e;}
.suite-tile.is-selected{outline:1px solid #e9dcba;outline-offset:3px;transform:translateY(calc(var(--p)*-5));}

.suite-native-preview{position:absolute;inset:0;display:grid;place-items:center;}
.suite-engine-mount{position:absolute;inset:0;overflow:hidden;background:#0d1c24;border:1px solid #dce8df30;border-radius:calc(var(--p)*5);}
.suite-engine-mount>canvas,.suite-engine-mount>iframe{display:block;width:100%;height:100%;border:0;}
.suite-native-stage.is-embedded{width:100%;height:100%;}
.suite-native-hud{position:absolute;left:0;right:0;top:calc(var(--p)*-32);display:flex;justify-content:space-between;gap:calc(var(--p)*20);pointer-events:none;font-size:calc(var(--p)*15);color:#c4d2bf;}
.suite-gomoku-cell.is-selected::before{background:#d8c7a547;outline:1px solid #d8c7a5a6;}
.suite-tile.is-selected{outline:1px solid #e9dfc8;outline-offset:3px;transform:translateY(calc(var(--p)*-4));}

.suite-frame .suite-gomoku>svg{stroke:#c9d8c852;stroke-width:.8;}
.suite-gomoku-grid .suite-gomoku-cell:focus-visible{outline:none;}
.suite-gomoku-cell:focus-visible::before{background:#d8c7a530;outline:1px solid #d8c7a56b;}
.suite-chess-cell:focus-visible,.suite-sudoku>button:focus-visible,.suite-xiangqi>button:focus-visible{outline:none!important;background:#d8c7a52b;}

.suite-player[data-feedback="success"] .suite-item,.suite-player[data-feedback="success"] .suite-craft-slot{border-color:#d9cfb68c;box-shadow:inset 0 0 calc(var(--p)*22) #d8c7a513;transition:border-color .5s,box-shadow .5s;}
.suite-player[data-feedback="success"] .suite-puzzle{gap:0;border-color:#d9cfb680;transition:gap .65s var(--ease),border-color .65s;}
.suite-player[data-feedback="success"] .suite-puzzle-piece{border-color:transparent;}

/* Keep poster rows intrinsic when the landscape viewport becomes short. */
.suite-grid{grid-auto-rows:max-content;align-content:start;align-items:start;min-height:0;}

/* Watch-only segments share the film timeline; interactive nodes fold it away. */
.suite-stage-controls{flex-direction:column;align-items:stretch;gap:calc(var(--p)*16);transition:gap .24s var(--soft)}
.suite-timeline{width:100%;flex:none;height:1px;opacity:1;transition:opacity .2s var(--soft),transform .28s var(--soft),height .24s var(--soft)}
.suite-timeline>span{width:0}
.suite-player .suite-timeline .suite-track{width:calc(100% + var(--seek-knob));height:max(28px,calc(var(--p)*44));max-width:none;min-width:0;flex:none;cursor:ew-resize}
.suite-player[data-video-timeline=hidden] .suite-stage-controls{gap:0}
.suite-player[data-video-timeline=hidden] .suite-timeline{height:0;opacity:0;transform:translateY(calc(var(--p)*5));pointer-events:none}
@media(prefers-reduced-motion:reduce){.suite-stage-controls,.suite-timeline{transition:none}}
.suite-player[data-video-timeline=visible] .suite-status{bottom:calc(var(--p)*126)}
/* mobile.css */
/* Phone-only presentation. Desktop geometry and motion stay in the original stylesheets. */
html.mobile-ui{--mobile-px:calc(1px * var(--mobile-visual-scale,.8));--mobile-left:calc(env(safe-area-inset-left,0px) + var(--mobile-gutter));--mobile-right:calc(env(safe-area-inset-right,0px) + var(--mobile-gutter));--mobile-top:env(safe-area-inset-top,0px);--mobile-bottom:env(safe-area-inset-bottom,0px);-webkit-text-size-adjust:100%;text-size-adjust:100%;--mobile-gutter:12px;--mobile-space-1:4px;--mobile-space-2:8px;--mobile-space-3:12px;--mobile-space-4:16px;--mobile-space-5:24px;}
.mobile-ui body{overscroll-behavior:none;-webkit-tap-highlight-color:transparent;}
.mobile-ui .game-frame{--p:var(--mobile-unit);--safe:var(--mobile-left);height:var(--app-height,100dvh);font-size:max(11px,calc(var(--mobile-px)*15));}
.mobile-ui button,.mobile-ui a,.mobile-ui input{touch-action:manipulation;}
.mobile-ui .suite-orb,.mobile-ui .suite-rhythm-note,.mobile-ui .suite-puzzle-piece{touch-action:none;-webkit-user-select:none;user-select:none;}
.mobile-ui .btn{height:calc(var(--mobile-px)*46);min-height:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*128);padding-inline:calc(var(--mobile-px)*20);font-size:max(11px,calc(var(--mobile-px)*15));letter-spacing:.04em;}
.mobile-ui .btn-small{height:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*112);padding-inline:calc(var(--mobile-px)*16);font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .icon-button,.mobile-ui .back-btn{width:calc(var(--mobile-px)*44);height:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*44);min-height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*24));}
.mobile-ui .icon-button svg{width:calc(var(--mobile-px)*23);height:calc(var(--mobile-px)*23);}
.mobile-ui .back-heading{left:var(--mobile-left);right:var(--mobile-right);top:calc(var(--mobile-top) + 8px);height:calc(var(--mobile-px)*44);gap:var(--mobile-space-1);}
.mobile-ui .back-heading h1{font-size:max(11px,calc(var(--mobile-px)*22));letter-spacing:.05em;}
.mobile-ui .page-footer{left:var(--mobile-left);right:var(--mobile-right);bottom:calc(var(--mobile-bottom) + 8px);font-size:max(11px,calc(var(--mobile-px)*12));min-height:calc(var(--mobile-px)*28);gap:var(--mobile-space-2);}
.mobile-ui .page-footer .key-hints{display:none;}
.mobile-ui .page-footer:empty{display:none;}
.mobile-ui .review-toggle{right:calc(var(--mobile-right) + 1px);bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*6));min-height:calc(var(--mobile-px)*36);padding:calc(var(--mobile-px)*8) calc(var(--mobile-px)*12);}
.mobile-ui .review-toggle>span{display:none;}
.mobile-ui .review-panel{right:var(--mobile-right);bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*48));max-height:calc(var(--app-height,100dvh) - var(--mobile-top) - var(--mobile-bottom) - calc(var(--mobile-px)*72));width:min(calc(var(--mobile-px)*320),calc(100vw - var(--mobile-left) - var(--mobile-right)));font-size:max(11px,calc(var(--mobile-px)*13));overscroll-behavior:contain;}
.mobile-ui .review-panel nav button,.mobile-ui .review-actions button,.mobile-ui .review-actions a,.mobile-ui .review-sound button{min-height:calc(var(--mobile-px)*40);font-size:max(11px,calc(var(--mobile-px)*12));display:flex;align-items:center;}
.mobile-ui .review-heading button{width:calc(var(--mobile-px)*44);height:calc(var(--mobile-px)*44);}
.mobile-ui .review-panel p{font-size:max(11px,calc(var(--mobile-px)*11));line-height:1.7;}
.mobile-ui .topbar{left:var(--mobile-left);right:var(--mobile-right);top:calc(var(--mobile-top) + 8px);height:calc(var(--mobile-px)*44);}
.mobile-ui .brand img{width:calc(var(--mobile-px)*108);height:auto;}
.mobile-ui .header-actions{gap:calc(var(--mobile-px)*6);}
.mobile-ui .account{min-width:calc(var(--mobile-px)*44);min-height:calc(var(--mobile-px)*44);padding:0;}
.mobile-ui .account>span:not(.avatar){display:none;}
.mobile-ui .account .avatar{width:calc(var(--mobile-px)*40);height:calc(var(--mobile-px)*40);}
.mobile-ui .home-menu{left:var(--mobile-left);gap:calc(var(--mobile-px)*8);top:30%;}
.mobile-ui .home-menu button{min-height:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*172);padding:calc(var(--mobile-px)*6) calc(var(--mobile-px)*12) calc(var(--mobile-px)*6) 0;font-size:max(11px,calc(var(--mobile-px)*19));}
.mobile-ui .home-menu button::after{inset:0 calc(var(--mobile-px)*-4);}
.mobile-ui .splash-logo{width:calc(var(--mobile-px)*154);}
.mobile-ui .splash-start{font-size:max(11px,calc(var(--mobile-px)*16));min-height:calc(var(--mobile-px)*48);padding:calc(var(--mobile-px)*12) calc(var(--mobile-px)*18);}
.mobile-ui .splash-copy{font-size:10px;bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*28));}
.mobile-ui .chapter-browser{bottom:calc(var(--mobile-bottom) + 40px);gap:var(--mobile-space-3);}
.mobile-ui .chapter-browser .chapter-summary{margin-left:var(--mobile-left);margin-right:var(--mobile-right);gap:var(--mobile-space-3);}
.mobile-ui .chapter-info h2{font-size:max(11px,calc(var(--mobile-px)*34));line-height:1.3;margin:0 0 6px;}
.mobile-ui .chapter-desc{font-size:max(11px,calc(var(--mobile-px)*14));line-height:1.6;margin:0 0 8px;}
.mobile-ui .chapter-info .small-progress{width:calc(var(--mobile-px)*110);height:2px;}
.mobile-ui .chapter-actions{gap:var(--mobile-space-2);}
.mobile-ui .chapter-actions .btn{height:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*120);font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .chapter-actions .btn svg{font-size:max(11px,calc(var(--mobile-px)*19));}
.mobile-ui .chapter-rail .chapter-strip{gap:var(--mobile-space-2);padding:8px var(--mobile-right) 12px var(--mobile-left);scroll-padding-inline:var(--mobile-left);}
.mobile-ui .chapter-card{width:calc(var(--mobile-px)*200);height:calc(var(--mobile-px)*113);border-radius:calc(var(--mobile-px)*9);}
.mobile-ui .chapter-card .card-label{font-size:max(11px,calc(var(--mobile-px)*16));padding:0;left:8px;right:8px;bottom:8px;}
.mobile-ui .chapter-rail-arrow{display:none;}
.mobile-ui .chapter-browse-meta>span:last-child{display:none;}
.mobile-ui .tree-layout{left:0;right:0;top:calc(var(--mobile-top) + 56px);bottom:calc(var(--mobile-bottom) + 36px);}
.mobile-ui .tree-node .node-number{font-size:max(11px,calc(var(--mobile-px)*12));letter-spacing:.12em;}
.mobile-ui .tree-node .node-info strong{font-size:max(11px,calc(var(--mobile-px)*16));line-height:1.4;}
.mobile-ui .tree-node .node-info{left:calc(var(--mobile-px)*14);right:calc(var(--mobile-px)*14);bottom:calc(var(--mobile-px)*12);}
.mobile-ui .tree-node .node-progress-value{font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .tree-node .node-lock{font-size:max(11px,calc(var(--mobile-px)*23));}
.mobile-ui .tree-legend{font-size:max(11px,calc(var(--mobile-px)*12));gap:calc(var(--mobile-px)*16);}
.mobile-ui .tree-browse-tip{display:none;}
.mobile-ui .saves-layout{top:calc(var(--mobile-top) + 56px);bottom:calc(var(--mobile-bottom) + 40px);width:calc(100% - var(--mobile-left) - var(--mobile-right));display:flex;align-items:center;}
.mobile-ui .saves-grid{gap:var(--mobile-space-3);height:auto;width:100%;max-width:none;justify-content:center;}
.mobile-ui .saves-layout .section-line{display:none;}
.mobile-ui .save-meta{height:calc(var(--mobile-px)*32);margin-bottom:var(--mobile-space-1);font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .save-date{font-size:max(11px,calc(var(--mobile-px)*11));line-height:1.6;}
.mobile-ui .save-date>span{display:block;font-size:max(11px,calc(var(--mobile-px)*11));}
.mobile-ui .delete-save{position:static;width:calc(var(--mobile-px)*44);height:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*19));opacity:1;}
.mobile-ui .save-card{min-height:0;}
.mobile-ui .save-info{padding:var(--mobile-space-3);}
.mobile-ui .save-info h2{font-size:max(11px,calc(var(--mobile-px)*18));line-height:1.4;}
.mobile-ui .save-number{font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .save-percent{font-size:max(11px,calc(var(--mobile-px)*17));}
.mobile-ui .save-active{font-size:max(11px,calc(var(--mobile-px)*12));padding:calc(var(--mobile-px)*7) calc(var(--mobile-px)*10);}
.mobile-ui .save-empty-copy small{font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .save-empty-copy .plus{font-size:max(11px,calc(var(--mobile-px)*35));}
.mobile-ui .affinity-layout{left:0;top:calc(var(--mobile-top) + 56px);bottom:calc(var(--mobile-bottom) + 36px);width:100%;max-width:none;translate:0 0;display:flex;align-items:center;gap:var(--mobile-space-3);padding:12px calc(var(--mobile-right) + 8px) 12px calc(var(--mobile-left) + 8px);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;touch-action:pan-x;scroll-snap-type:x proximity;scroll-padding-inline:var(--mobile-left);}
.mobile-ui .affinity-layout::-webkit-scrollbar{display:none;}
.mobile-ui .affinity-cell{flex:0 0 calc(var(--mobile-px)*165);min-width:0;scroll-snap-align:center;}
.mobile-ui .affinity-card{height:min(calc(var(--mobile-px)*360),calc(var(--app-height,100dvh) - var(--mobile-top) - var(--mobile-bottom) - calc(var(--mobile-px)*160)));}
.mobile-ui .affinity-art img{width:calc(100% * 1920 / 314);left:calc(100% * var(--source-x) / -314);top:calc(100% * var(--source-y) / -314);}
.mobile-ui .affinity-card-info{left:calc(var(--mobile-px)*14);right:calc(var(--mobile-px)*8);bottom:calc(var(--mobile-px)*30);gap:var(--mobile-space-2);}
.mobile-ui .affinity-name{font-size:max(11px,calc(var(--mobile-px)*23));}
.mobile-ui .affinity-hearts{gap:calc(var(--mobile-px)*5);}
.mobile-ui .affinity-heart{width:calc(var(--mobile-px)*19);height:calc(var(--mobile-px)*19);}
.mobile-ui .settings-layout{left:var(--mobile-left);right:var(--mobile-right);top:calc(var(--mobile-top) + 56px);bottom:calc(var(--mobile-bottom) + 52px);display:block;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;padding-bottom:var(--mobile-space-2);}
.mobile-ui .setting-row{grid-template-columns:calc(var(--mobile-px)*88) minmax(0,1fr) calc(var(--mobile-px)*44);gap:var(--mobile-space-2);height:calc(var(--mobile-px)*60);font-size:max(11px,calc(var(--mobile-px)*15));}
.mobile-ui .setting-row output{font-size:max(11px,calc(var(--mobile-px)*13));}
.mobile-ui input[type=range]{min-height:calc(var(--mobile-px)*44);cursor:pointer;}
.mobile-ui .range{height:calc(var(--mobile-px)*44);}
.mobile-ui .sound-setting{height:calc(var(--mobile-px)*50);}
.mobile-ui .sound-state-button{height:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*72);font-size:max(11px,calc(var(--mobile-px)*15));}
.mobile-ui .language{margin-top:var(--mobile-space-2);}
.mobile-ui .select-button{min-height:calc(var(--mobile-px)*44);height:calc(var(--mobile-px)*44);padding:0 calc(var(--mobile-px)*13);font-size:max(11px,calc(var(--mobile-px)*15));}
.mobile-ui .select-options{position:fixed;left:auto;right:var(--mobile-right);top:auto;bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*72));width:min(calc(var(--mobile-px)*340),calc(100vw - var(--mobile-left) - var(--mobile-right)));max-height:calc(var(--app-height,100dvh) - var(--mobile-top) - var(--mobile-bottom) - calc(var(--mobile-px)*96));overflow:auto;z-index:20;}
.mobile-ui .glass-menu button{min-height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*15));padding-inline:calc(var(--mobile-px)*14);}
.mobile-ui .settings-note{font-size:max(11px,calc(var(--mobile-px)*12));line-height:1.8;margin:12px 0 0;}
.mobile-ui .game-hud{left:var(--mobile-left);right:var(--mobile-right);top:calc(var(--mobile-top) + calc(var(--mobile-px)*8));gap:calc(var(--mobile-px)*12);min-height:calc(var(--mobile-px)*44);}
.mobile-ui .hud-scene{font-size:max(11px,calc(var(--mobile-px)*13));gap:calc(var(--mobile-px)*10);max-width:calc(100% - calc(var(--mobile-px)*100));flex-wrap:wrap;line-height:1.6;}
.mobile-ui .hud-scene-label:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:calc(var(--mobile-px)*170);}
.mobile-ui .hud-actions{gap:calc(var(--mobile-px)*4);}
.mobile-ui .subtitle{bottom:calc(var(--mobile-bottom) + 80px);width:calc(100% - var(--mobile-left) - var(--mobile-right));font-size:max(11px,calc(var(--mobile-px)*18));line-height:1.7;}
.mobile-ui .speaker{font-size:max(11px,calc(var(--mobile-px)*13));margin-right:calc(var(--mobile-px)*12);}
.mobile-ui .playback-bar{left:var(--mobile-left);right:var(--mobile-right);bottom:calc(var(--mobile-bottom) + 8px);gap:var(--mobile-space-3);font-size:max(11px,calc(var(--mobile-px)*13));min-height:calc(var(--mobile-px)*44);}
.mobile-ui .play-control{min-height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*14));gap:calc(var(--mobile-px)*8);padding:0 calc(var(--mobile-px)*6);}
.mobile-ui .playback-status{flex:1;min-width:0;gap:calc(var(--mobile-px)*14);}
.mobile-ui .playback-track{width:auto;flex:1;min-width:calc(var(--mobile-px)*40);}
.mobile-ui .playback-tools{gap:var(--mobile-space-2);padding-right:56px;}
.mobile-ui .playback-speed-toggle{height:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*68);padding-inline:calc(var(--mobile-px)*10);}
.mobile-ui .playback-speed-options{width:calc(var(--mobile-px)*150);bottom:calc(100% + calc(var(--mobile-px)*8));max-height:calc(var(--app-height,100dvh) - calc(var(--mobile-px)*100));overflow:auto;}
.mobile-ui .choice-panel{width:calc(100% - var(--mobile-left) - var(--mobile-right));bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*72));}
.mobile-ui .choice-panel h2{font-size:max(11px,calc(var(--mobile-px)*24));line-height:1.5;margin:0 0 calc(var(--mobile-px)*18);}
.mobile-ui .choice-options{gap:var(--mobile-space-3);}
.mobile-ui .choice-options>div{flex:0 1 calc(var(--mobile-px)*240);min-width:0;}
.mobile-ui .choice-option{width:100%;height:calc(var(--mobile-px)*48);min-height:calc(var(--mobile-px)*44);padding-inline:calc(var(--mobile-px)*18);font-size:max(11px,calc(var(--mobile-px)*16));}
.mobile-ui .choice-divider{margin-bottom:calc(var(--mobile-px)*22);margin:12px 0 16px;}
.mobile-ui .time-toggle{min-height:calc(var(--mobile-px)*40);font-size:max(11px,calc(var(--mobile-px)*13));}
.mobile-ui .qte-widget{gap:calc(var(--mobile-px)*14);left:68%;top:46%;}
.mobile-ui .qte-ring{width:calc(var(--mobile-px)*100);height:calc(var(--mobile-px)*100);}
.mobile-ui .qte-key{inset:calc(var(--mobile-px)*16);font-size:max(11px,calc(var(--mobile-px)*30));}
.mobile-ui .qte-label{font-size:max(11px,calc(var(--mobile-px)*18));}
.mobile-ui .qte-tip{font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .qte-subtitle{font-size:max(11px,calc(var(--mobile-px)*16));bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*62));}
.mobile-ui .pause-menu{top:22%;width:calc(var(--mobile-px)*260);}
.mobile-ui .pause-menu h1{font-size:max(11px,calc(var(--mobile-px)*30));margin:8px 0 12px;}
.mobile-ui .pause-menu .eyebrow{font-size:max(11px,calc(var(--mobile-px)*11));}
.mobile-ui .pause-list{gap:calc(var(--mobile-px)*5);}
.mobile-ui .pause-list button{font-size:max(11px,calc(var(--mobile-px)*18));min-height:calc(var(--mobile-px)*44);}
.mobile-ui .result-layout{top:25%;bottom:auto;width:min(48%,calc(var(--mobile-px)*420));right:var(--mobile-right);justify-content:flex-start;gap:var(--mobile-space-5);}
.mobile-ui .result-layout h1{font-size:clamp(calc(var(--mobile-px)*34),calc(6vw * var(--mobile-visual-scale,.8)),calc(var(--mobile-px)*56));}
.mobile-ui .result-layout.failure-layout h1{font-size:clamp(calc(var(--mobile-px)*32),calc(5.8vw * var(--mobile-visual-scale,.8)),calc(var(--mobile-px)*54));}
.mobile-ui .result-emblem{width:calc(var(--mobile-px)*180);top:calc(var(--mobile-px)*-86);}
.mobile-ui .result-copy p{font-size:max(11px,calc(var(--mobile-px)*13));line-height:1.8;}
.mobile-ui .result-divider{margin:12px 0;}
.mobile-ui .result-actions{gap:var(--mobile-space-3);width:100%;}
.mobile-ui .result-actions>div{width:100%;}
.mobile-ui .result-actions .btn{width:min(100%,calc(var(--mobile-px)*210));height:calc(var(--mobile-px)*44);min-width:0;font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .gameover-heading{left:0;right:0;gap:calc(var(--mobile-px)*18);}
.mobile-ui .gameover-heading h1{font-size:clamp(calc(var(--mobile-px)*36),calc(7vw * var(--mobile-visual-scale,.8)),calc(var(--mobile-px)*64));}
.mobile-ui .gameover-mark{width:calc(var(--mobile-px)*230);height:calc(var(--mobile-px)*230);}
.mobile-ui .gameover-actions{top:calc(47% + var(--mobile-px)*136);bottom:auto;width:calc(var(--mobile-px)*210);}
.mobile-ui .modal-scrim{padding-block:calc(var(--mobile-top) + calc(var(--mobile-px)*12)) calc(var(--mobile-bottom) + calc(var(--mobile-px)*12));overflow:auto;}
.mobile-ui .modal{width:100%;max-height:calc(var(--app-height,100dvh) - var(--mobile-top) - var(--mobile-bottom) - calc(var(--mobile-px)*24));padding:calc(var(--mobile-px)*36 + 12px) var(--mobile-left) 16px;overflow:auto;}
.mobile-ui .modal>.modal-caption{height:calc(var(--mobile-px)*36);font-size:max(11px,calc(var(--mobile-px)*16));}
.mobile-ui .modal-caption::after{width:calc(var(--mobile-px)*148);}
.mobile-ui .modal p{font-size:max(11px,calc(var(--mobile-px)*15));line-height:1.75;margin-bottom:var(--mobile-space-4);}
.mobile-ui .modal p>span+span{margin-top:calc(var(--mobile-px)*5);}
.mobile-ui .modal-actions{gap:var(--mobile-space-3);}
.mobile-ui .modal-actions .btn{flex:0 1 calc(var(--mobile-px)*180);min-width:0;height:calc(var(--mobile-px)*46);min-height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*15));}
.mobile-ui .toast{top:calc(var(--mobile-top) + 56px);min-width:min(calc(var(--mobile-px)*280),calc(100% - var(--mobile-left) - var(--mobile-right)));max-width:calc(100% - var(--mobile-left) - var(--mobile-right));font-size:max(11px,calc(var(--mobile-px)*14));line-height:1.6;padding:8px 20px;text-align:center;}

html.mobile-ui[data-ui-orientation=landscape] .setting-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--mobile-space-4);}
html.mobile-ui[data-ui-orientation=landscape] .settings-layout{top:calc(var(--mobile-top) + 56px);}
html.mobile-ui[data-ui-orientation=landscape] .setting-row{height:44px;}
html.mobile-ui[data-ui-orientation=landscape] .language{width:calc(50% - calc(var(--mobile-px)*12));margin-top:calc(var(--mobile-px)*4);}
html.mobile-ui[data-ui-orientation=landscape] .settings-note{position:static;max-width:none;margin:12px 0 0;}

html.mobile-ui[data-ui-orientation=landscape]{--mobile-gutter:16px;}
html.mobile-ui[data-ui-orientation=portrait]{--mobile-left:calc(env(safe-area-inset-left,0px) + var(--mobile-gutter));--mobile-right:calc(env(safe-area-inset-right,0px) + var(--mobile-gutter));}
html.mobile-ui[data-ui-orientation=portrait] .home-menu{top:auto;bottom:calc(var(--mobile-bottom) + 48px);gap:calc(var(--mobile-px)*10);}
html.mobile-ui[data-ui-orientation=portrait] .home-menu button{font-size:max(11px,calc(var(--mobile-px)*21));min-width:calc(var(--mobile-px)*190);}
html.mobile-ui[data-ui-orientation=portrait] .cover-wordmark{left:50%;top:29%;width:90%;}
html.mobile-ui[data-ui-orientation=portrait] .game-frame[data-page=cover] .scene>iframe{object-position:62% center;}
html.mobile-ui[data-ui-orientation=portrait] .chapter-browser{bottom:calc(var(--mobile-bottom) + 40px);gap:var(--mobile-space-3);}
html.mobile-ui[data-ui-orientation=portrait] .chapter-browser .chapter-summary{flex-direction:column;align-items:stretch;gap:var(--mobile-space-3);}
html.mobile-ui[data-ui-orientation=portrait] .chapter-info{max-width:100%;}
html.mobile-ui[data-ui-orientation=portrait] .chapter-info h2{font-size:max(11px,calc(var(--mobile-px)*38));}
html.mobile-ui[data-ui-orientation=portrait] .chapter-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:var(--mobile-space-2);}
html.mobile-ui[data-ui-orientation=portrait] .chapter-actions .btn{width:100%;min-width:0;height:calc(var(--mobile-px)*48);}
html.mobile-ui[data-ui-orientation=portrait] .chapter-card{width:min(60.8vw,calc(var(--mobile-px)*300));height:auto;aspect-ratio:16/9;}
html.mobile-ui[data-ui-orientation=portrait] .saves-layout{left:0;right:0;translate:0 0;width:100%;}
html.mobile-ui[data-ui-orientation=portrait] .saves-grid{gap:var(--mobile-space-3);overflow-x:auto;overflow-y:hidden;padding:16px var(--mobile-right) 16px var(--mobile-left);scroll-snap-type:x proximity;scroll-padding-inline:var(--mobile-left);scrollbar-width:none;touch-action:pan-x;justify-content:flex-start;}
html.mobile-ui[data-ui-orientation=portrait] .save-shell{flex:0 0 min(57.6vw,calc(var(--mobile-px)*280));scroll-snap-align:center;transition:flex-basis .65s var(--ease);}
html.mobile-ui[data-ui-orientation=portrait] .save-shell.is-active{flex:0 0 min(65.6vw,calc(var(--mobile-px)*320));}
html.mobile-ui[data-ui-orientation=portrait] .save-card{min-height:calc(var(--mobile-px)*330);}
html.mobile-ui[data-ui-orientation=portrait] .save-cover{height:calc(var(--mobile-px)*220);}
html.mobile-ui[data-ui-orientation=portrait] .save-info{padding:var(--mobile-space-4);}
html.mobile-ui[data-ui-orientation=portrait] .affinity-cell{flex-basis:min(52.8vw,calc(var(--mobile-px)*270));}
html.mobile-ui[data-ui-orientation=portrait] .affinity-card{height:min(calc(var(--mobile-px)*560),calc(var(--app-height,100dvh) - var(--mobile-top) - var(--mobile-bottom) - calc(var(--mobile-px)*170)));}
html.mobile-ui[data-ui-orientation=portrait] .affinity-card-info{bottom:calc(var(--mobile-px)*54);left:calc(var(--mobile-px)*20);}
html.mobile-ui[data-ui-orientation=portrait] .affinity-name{font-size:max(11px,calc(var(--mobile-px)*30));}
html.mobile-ui[data-ui-orientation=portrait] .affinity-heart{width:calc(var(--mobile-px)*25);height:calc(var(--mobile-px)*25);}
html.mobile-ui[data-ui-orientation=portrait] .setting-row{height:48px;}
html.mobile-ui[data-ui-orientation=portrait] .sound-setting{height:44px;}
html.mobile-ui[data-ui-orientation=portrait] .settings-note{max-width:100%;}
html.mobile-ui[data-ui-orientation=portrait] .subtitle{bottom:calc(var(--mobile-bottom) + 104px);font-size:max(11px,calc(var(--mobile-px)*20));}
html.mobile-ui[data-ui-orientation=portrait] .playback-bar{flex-wrap:wrap;row-gap:calc(var(--mobile-px)*6);}
html.mobile-ui[data-ui-orientation=portrait] .playback-status{flex-basis:100%;}
html.mobile-ui[data-ui-orientation=portrait] .playback-tools{width:100%;justify-content:flex-end;}
html.mobile-ui[data-ui-orientation=portrait] .choice-panel{bottom:calc(var(--mobile-bottom) + 80px);}
html.mobile-ui[data-ui-orientation=portrait] .choice-options{flex-direction:column;gap:var(--mobile-space-3);align-items:stretch;padding-inline:calc(var(--mobile-px)*20);}
html.mobile-ui[data-ui-orientation=portrait] .choice-options>div{flex:auto;}
html.mobile-ui[data-ui-orientation=portrait] .choice-option{height:calc(var(--mobile-px)*52);}
html.mobile-ui[data-ui-orientation=portrait] .qte-widget{left:50%;top:46%;gap:calc(var(--mobile-px)*18);}
html.mobile-ui[data-ui-orientation=portrait] .qte-ring{width:calc(var(--mobile-px)*128);height:calc(var(--mobile-px)*128);}
html.mobile-ui[data-ui-orientation=portrait] .qte-key{font-size:max(11px,calc(var(--mobile-px)*38));inset:calc(var(--mobile-px)*21);}
html.mobile-ui[data-ui-orientation=portrait] .qte-subtitle{bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*102));font-size:max(11px,calc(var(--mobile-px)*18));}
html.mobile-ui[data-ui-orientation=portrait] .pause-menu{top:29%;width:calc(100% - var(--mobile-left) - var(--mobile-right));}
html.mobile-ui[data-ui-orientation=portrait] .pause-menu h1{font-size:max(11px,calc(var(--mobile-px)*36));margin-bottom:var(--mobile-space-4);}
html.mobile-ui[data-ui-orientation=portrait] .pause-list{gap:calc(var(--mobile-px)*12);}
html.mobile-ui[data-ui-orientation=portrait] .result-layout{left:var(--mobile-left);right:var(--mobile-right);top:36%;bottom:auto;width:auto;gap:var(--mobile-space-5);justify-content:flex-start;}
html.mobile-ui[data-ui-orientation=portrait] .result-emblem{width:calc(var(--mobile-px)*230);top:calc(var(--mobile-px)*-155);}
html.mobile-ui[data-ui-orientation=portrait] .result-layout h1{font-size:clamp(calc(var(--mobile-px)*40),calc(12vw * var(--mobile-visual-scale,.8)),calc(var(--mobile-px)*58));}
html.mobile-ui[data-ui-orientation=portrait] .result-layout.failure-layout h1{font-size:clamp(calc(var(--mobile-px)*36),calc(10.8vw * var(--mobile-visual-scale,.8)),calc(var(--mobile-px)*54));}
html.mobile-ui[data-ui-orientation=portrait] .result-copy p{font-size:max(11px,calc(var(--mobile-px)*14));line-height:1.9;}
html.mobile-ui[data-ui-orientation=portrait] .result-actions .btn{width:calc(var(--mobile-px)*220);height:calc(var(--mobile-px)*48);font-size:max(11px,calc(var(--mobile-px)*15));}
html.mobile-ui[data-ui-orientation=portrait] .gameover-heading h1{font-size:max(11px,calc(var(--mobile-px)*40));letter-spacing:.08em;}
html.mobile-ui[data-ui-orientation=portrait] .gameover-heading{gap:calc(var(--mobile-px)*12);}
html.mobile-ui[data-ui-orientation=portrait] .gameover-mark{width:calc(var(--mobile-px)*290);height:calc(var(--mobile-px)*290);}
html.mobile-ui[data-ui-orientation=portrait] .gameover-actions{bottom:auto;width:calc(var(--mobile-px)*220);top:calc(47% + var(--mobile-px)*166);}

.mobile-ui .affinity-art{container-type:inline-size;}
.mobile-ui .affinity-art img{width:calc(100cqw * 1920 / 314);left:calc(100cqw * var(--source-x) / -314);top:calc(100cqw * var(--source-y) / -314);}
html.mobile-ui[data-ui-orientation=landscape] .home-menu{top:calc(var(--mobile-top) + 56px);gap:2px;}
html.mobile-ui[data-ui-orientation=landscape] .chapter-info h2{font-size:max(11px,calc(var(--mobile-px)*28));margin-bottom:calc(var(--mobile-px)*6);line-height:1.2;}
html.mobile-ui[data-ui-orientation=landscape] .chapter-desc{font-size:max(11px,calc(var(--mobile-px)*13));margin-bottom:calc(var(--mobile-px)*8);line-height:1.5;}
html.mobile-ui[data-ui-orientation=landscape] .chapter-browser{gap:var(--mobile-space-2);}
html.mobile-ui[data-ui-orientation=landscape] .chapter-rail .chapter-strip{padding-block:8px 12px;}
html.mobile-ui[data-ui-orientation=landscape] .chapter-card{width:calc(var(--mobile-px)*170);height:calc(var(--mobile-px)*96);}

/* The gameplay coordinate plane and media share one fitted rectangle. */
.mobile-ui .suite-frame{--stage-top:104px;--stage-bottom:64px;--content-aspect:1.777777778;--stage-height:max(calc(var(--mobile-px)*100),calc(var(--app-height,100dvh) - var(--mobile-top) - var(--mobile-bottom) - var(--stage-top) - var(--stage-bottom)));}
.mobile-ui .suite-top{top:calc(var(--mobile-top) + 8px);left:var(--mobile-left);right:var(--mobile-right);height:calc(var(--mobile-px)*44);gap:calc(var(--mobile-px)*8);}
.mobile-ui .suite-top .back-heading{position:static;gap:var(--mobile-space-1);height:calc(var(--mobile-px)*44);min-width:0;flex:1;}
.mobile-ui .suite-top h1{font-size:max(11px,calc(var(--mobile-px)*21));letter-spacing:.04em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.mobile-ui .suite-top .back-btn{width:calc(var(--mobile-px)*44);height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*24));}
.mobile-ui .suite-top-actions{gap:calc(var(--mobile-px)*4);}
.mobile-ui .suite-top-actions .subtle-btn{width:calc(var(--mobile-px)*44);height:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*44);padding:0;justify-content:center;font-size:max(11px,calc(var(--mobile-px)*21));}
.mobile-ui .suite-top-actions .subtle-btn>span{display:none;}
.mobile-ui .suite-sound{width:calc(var(--mobile-px)*44);height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*22));}
.mobile-ui .suite-categories{left:0;right:0;top:calc(var(--mobile-top) + 48px);bottom:auto;width:auto;height:44px;display:flex;flex-direction:row;gap:var(--mobile-space-1);padding:0 var(--mobile-left);overflow-x:auto;overflow-y:hidden;border:0;scrollbar-width:none;touch-action:pan-x;}
.mobile-ui .suite-category{flex:0 0 auto;min-height:44px;padding:0 8px;font-size:max(11px,calc(var(--mobile-px)*14));gap:6px;border-bottom:1px solid transparent;}
.mobile-ui .suite-category>small{font-size:10px;}
.mobile-ui .suite-category[aria-current=true]{border-bottom-color:#d8c7a56b;}
.mobile-ui .suite-category[aria-current=true]::before{display:none;}
.mobile-ui .suite-library{left:var(--mobile-left);right:var(--mobile-right);top:calc(var(--mobile-top) + 100px);bottom:calc(var(--mobile-bottom) + 32px);}
.mobile-ui .suite-library-heading{padding-bottom:var(--mobile-space-2);gap:var(--mobile-space-2);align-items:center;}
.mobile-ui .suite-library-heading h2{font-size:max(11px,calc(var(--mobile-px)*24));margin-bottom:calc(var(--mobile-px)*6);line-height:1.3;}
.mobile-ui .suite-library-heading p{font-size:max(11px,calc(var(--mobile-px)*13));line-height:1.6;}
.mobile-ui .suite-library-heading .btn{min-width:calc(var(--mobile-px)*112);height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .suite-library-heading>.subtle-btn{font-size:max(11px,calc(var(--mobile-px)*12));min-height:calc(var(--mobile-px)*44);}
.mobile-ui .suite-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--mobile-space-2);padding:2px 2px 20px;grid-auto-rows:max-content;}
.mobile-ui .suite-card{aspect-ratio:16/10;border-radius:calc(var(--mobile-px)*8);}
.mobile-ui .suite-card-symbol{left:calc(var(--mobile-px)*16);top:calc(var(--mobile-px)*15);font-size:max(11px,calc(var(--mobile-px)*23));}
.mobile-ui .suite-card-time{right:calc(var(--mobile-px)*14);top:calc(var(--mobile-px)*16);font-size:max(11px,calc(var(--mobile-px)*11));gap:calc(var(--mobile-px)*5);}
.mobile-ui .suite-card-copy{left:calc(var(--mobile-px)*16);right:calc(var(--mobile-px)*14);bottom:calc(var(--mobile-px)*14);}
.mobile-ui .suite-card-copy strong{font-size:max(11px,calc(var(--mobile-px)*15));line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.mobile-ui .suite-card-copy small{font-size:max(11px,calc(var(--mobile-px)*12));margin-top:calc(var(--mobile-px)*5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mobile-ui .suite-footer{left:var(--mobile-left);right:var(--mobile-right);bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*8));font-size:10px;padding-right:56px;}
.mobile-ui .suite-footer a{font-size:max(11px,calc(var(--mobile-px)*11));min-height:calc(var(--mobile-px)*30);}
.mobile-ui .suite-play-heading{left:var(--mobile-left);right:var(--mobile-right);top:calc(var(--mobile-top) + 52px);}
.mobile-ui .suite-play-heading h2{font-size:max(11px,calc(var(--mobile-px)*18));line-height:1.4;margin-bottom:calc(var(--mobile-px)*5);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
.mobile-ui .suite-play-heading p{font-size:max(11px,calc(var(--mobile-px)*12));line-height:1.6;max-height:calc(var(--mobile-px)*38);overflow:auto;}
.mobile-ui .suite-timer{left:50%;top:calc(var(--mobile-top) + calc(var(--mobile-px)*21));font-size:max(11px,calc(var(--mobile-px)*13));gap:calc(var(--mobile-px)*6);}
.mobile-ui .suite-timer svg{font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .suite-spatial-plane{top:calc(var(--mobile-top) + var(--stage-top));bottom:calc(var(--mobile-bottom) + var(--stage-bottom));left:var(--mobile-left);right:var(--mobile-right);width:auto;height:auto;margin:0;}
.mobile-ui .suite-playbody{inset:0;min-width:0;min-height:0;}
.mobile-ui .suite-player.has-spatial .suite-spatial-plane{left:0;right:0;margin:auto;width:min(calc(100vw - var(--mobile-left) - var(--mobile-right)),calc(var(--stage-height) * var(--content-aspect)));height:min(var(--stage-height),calc((100vw - var(--mobile-left) - var(--mobile-right)) / var(--content-aspect)));}
.mobile-ui .suite-player.has-spatial .suite-media{inset:calc(var(--mobile-top) + var(--stage-top)) var(--mobile-right) calc(var(--mobile-bottom) + var(--stage-bottom)) var(--mobile-left);}
.mobile-ui .suite-player.has-spatial .suite-media video,.mobile-ui .suite-player.has-spatial .suite-media>img{object-fit:contain;}
.mobile-ui .suite-frame[data-content-orientation=portrait]{--content-aspect:.5625;}
.mobile-ui .suite-stage-controls{left:var(--mobile-left);right:var(--mobile-right);bottom:calc(var(--mobile-bottom) + 8px);gap:var(--mobile-space-2);min-height:calc(var(--mobile-px)*44);}
.mobile-ui .suite-transport{gap:calc(var(--mobile-px)*10);min-width:0;flex:1;font-size:max(11px,calc(var(--mobile-px)*13));}
.mobile-ui .suite-transport>button{min-width:calc(var(--mobile-px)*44);height:calc(var(--mobile-px)*44);padding:0;justify-content:center;}
.mobile-ui .suite-transport small{font-size:max(11px,calc(var(--mobile-px)*11));white-space:nowrap;}
.mobile-ui .suite-track{flex:1;width:calc(var(--mobile-px)*80);max-width:calc(var(--mobile-px)*140);min-width:calc(var(--mobile-px)*45);min-height:calc(var(--mobile-px)*44);}
.mobile-ui .suite-speed-wrap .subtle-btn{height:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*54);font-size:max(11px,calc(var(--mobile-px)*13));}
.mobile-ui .suite-controls-right{gap:var(--mobile-space-2);padding-right:56px;}
.mobile-ui .suite-controls-right>.subtle-btn{min-height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*13));}
.mobile-ui .suite-controls-right .btn{height:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*104);font-size:max(11px,calc(var(--mobile-px)*13));}
.mobile-ui .suite-controls-right [data-suite=previous-node]{width:calc(var(--mobile-px)*44);min-width:calc(var(--mobile-px)*44);font-size:0;}
.mobile-ui .suite-controls-right [data-suite=previous-node] svg{font-size:max(11px,calc(var(--mobile-px)*18));}
.mobile-ui .suite-status{bottom:calc(var(--mobile-bottom) + 56px);width:calc(100% - var(--mobile-left) - var(--mobile-right));font-size:max(11px,calc(var(--mobile-px)*13));line-height:1.5;text-align:center;}
.mobile-ui .suite-readiness>div{margin-bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*72));gap:var(--mobile-space-2);}
.mobile-ui .suite-readiness .btn{height:calc(var(--mobile-px)*48);min-width:calc(var(--mobile-px)*160);font-size:max(11px,calc(var(--mobile-px)*16));}
.mobile-ui .suite-readiness small{font-size:max(11px,calc(var(--mobile-px)*12));max-width:80vw;text-align:center;line-height:1.6;}
.mobile-ui .suite-speed-menu{width:calc(var(--mobile-px)*148);bottom:calc(100% + calc(var(--mobile-px)*8));max-height:calc(var(--app-height,100dvh) - calc(var(--mobile-px)*112));overflow:auto;}
.mobile-ui .suite-speed-menu>button{height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*15));padding-inline:calc(var(--mobile-px)*14);}
.mobile-ui .suite-choices{position:relative;inset:auto;width:100%;max-height:100%;gap:var(--mobile-space-3);padding:4px;overflow:auto;scrollbar-width:none;}
.mobile-ui .suite-question,.mobile-ui .suite-question.is-long{max-width:100%;font-size:max(11px,calc(var(--mobile-px)*16));line-height:1.55;max-height:calc(var(--mobile-px)*90);overflow:auto;}
.mobile-ui .suite-choice-grid{width:100%;gap:var(--mobile-space-3);}
.mobile-ui .suite-choice{flex:1 1 calc(50% - calc(var(--mobile-px)*12));max-width:none;min-width:0;min-height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*14));line-height:1.4;padding:calc(var(--mobile-px)*10) calc(var(--mobile-px)*15);}
.mobile-ui .suite-choice[aria-disabled=true] svg{font-size:max(11px,calc(var(--mobile-px)*15));}
.mobile-ui .suite-orb{width:calc(var(--mobile-px)*84);height:calc(var(--mobile-px)*84);min-width:calc(var(--mobile-px)*84);min-height:calc(var(--mobile-px)*84);}
.mobile-ui .suite-orb>svg:not(.suite-hold-progress){font-size:max(11px,calc(var(--mobile-px)*28));}
.mobile-ui .suite-operation{gap:calc(var(--mobile-px)*10);}
.mobile-ui .suite-operation-label{font-size:max(11px,calc(var(--mobile-px)*13));line-height:1.5;letter-spacing:.05em;}
.mobile-ui .suite-counter{font-size:max(11px,calc(var(--mobile-px)*13));gap:calc(var(--mobile-px)*5);}
.mobile-ui .suite-counter strong{font-size:max(11px,calc(var(--mobile-px)*22));}
.mobile-ui .suite-gesture-zone{width:min(100%,calc(var(--mobile-px)*580));height:min(100%,calc(var(--mobile-px)*230));min-height:calc(var(--mobile-px)*140);gap:calc(var(--mobile-px)*14);}
.mobile-ui .suite-gesture-zone>.suite-gesture-arrow{font-size:max(11px,calc(var(--mobile-px)*48));}
.mobile-ui .suite-gesture-zone>.suite-progress{width:calc(var(--mobile-px)*160);}
.mobile-ui .suite-mini-actions{min-height:calc(var(--mobile-px)*40);font-size:max(11px,calc(var(--mobile-px)*12));gap:var(--mobile-space-2);flex-wrap:wrap;}
.mobile-ui .suite-mini-actions button:not(.btn){min-height:calc(var(--mobile-px)*40);}
.mobile-ui .suite-paper>svg{height:100%;}
.mobile-ui .suite-balance{width:min(100%,calc(var(--mobile-px)*600));gap:calc(var(--mobile-px)*12);}
.mobile-ui .suite-balance-track{height:calc(var(--mobile-px)*20);}
.mobile-ui .suite-balance-needle{height:calc(var(--mobile-px)*38);top:calc(var(--mobile-px)*-10);width:calc(var(--mobile-px)*3);}
.mobile-ui .suite-scratch{width:min(100%,calc(var(--stage-height) * 1.7778));height:auto;aspect-ratio:16/9;}
.mobile-ui .suite-area-option{min-width:calc(var(--mobile-px)*44);min-height:calc(var(--mobile-px)*44);}
.mobile-ui .suite-area-option>span{font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .suite-hotspot{min-width:calc(var(--mobile-px)*44);min-height:calc(var(--mobile-px)*44);}
.mobile-ui .suite-hotspot .hotspot-label{font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .suite-direction{min-width:calc(var(--mobile-px)*120);min-height:calc(var(--mobile-px)*44);padding:calc(var(--mobile-px)*10) calc(var(--mobile-px)*12);gap:calc(var(--mobile-px)*10);font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .suite-direction svg{font-size:max(11px,calc(var(--mobile-px)*17));}
.mobile-ui .suite-side-tools{top:calc(var(--mobile-px)*8);right:0;gap:calc(var(--mobile-px)*8);}
.mobile-ui .suite-side-tools .btn{min-width:calc(var(--mobile-px)*94);height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*13));padding-inline:calc(var(--mobile-px)*12);}
.mobile-ui .suite-layer-switch{padding:calc(var(--mobile-px)*3);}
.mobile-ui .suite-layer-switch button{min-width:calc(var(--mobile-px)*42);min-height:calc(var(--mobile-px)*40);font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .suite-note-panel{inset:calc(var(--mobile-top) + 56px) var(--mobile-right) calc(var(--mobile-bottom) + 72px) var(--mobile-left);padding:16px 12px;overflow:auto;}
.mobile-ui .suite-note-panel h3{font-size:max(11px,calc(var(--mobile-px)*21));margin-bottom:var(--mobile-space-3);padding-right:calc(var(--mobile-px)*36);}
.mobile-ui .suite-note-panel p{font-size:max(11px,calc(var(--mobile-px)*14));line-height:1.9;}
.mobile-ui .suite-note-panel .note-close{top:calc(var(--mobile-px)*8);right:calc(var(--mobile-px)*8);width:calc(var(--mobile-px)*44);height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*22));}
.mobile-ui .suite-photo-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--mobile-space-2);}
.mobile-ui .suite-photo-card span{font-size:max(11px,calc(var(--mobile-px)*13));padding:calc(var(--mobile-px)*10);}
.mobile-ui .suite-memory>img,.mobile-ui .suite-evidence>img{max-height:36dvh;max-width:100%;}
.mobile-ui .suite-note-text select{font-size:max(11px,calc(var(--mobile-px)*16));min-height:calc(var(--mobile-px)*40);max-width:calc(var(--mobile-px)*140);}
.mobile-ui .suite-character-stats{padding:calc(var(--mobile-px)*16) calc(var(--mobile-px)*6);gap:calc(var(--mobile-px)*24);}
.mobile-ui .suite-character-stats h3{font-size:max(11px,calc(var(--mobile-px)*22));}
.mobile-ui .suite-inventory{gap:var(--mobile-space-2);}
.mobile-ui .suite-item{width:calc(var(--mobile-px)*90);height:calc(var(--mobile-px)*108);gap:calc(var(--mobile-px)*12);min-width:calc(var(--mobile-px)*66);}
.mobile-ui .suite-item>svg{font-size:max(11px,calc(var(--mobile-px)*30));}
.mobile-ui .suite-item>span{font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .suite-item small{font-size:max(11px,calc(var(--mobile-px)*12));right:calc(var(--mobile-px)*10);top:calc(var(--mobile-px)*10);}
.mobile-ui .suite-drop-target{font-size:max(11px,calc(var(--mobile-px)*13));}
.mobile-ui .suite-frame[data-mode=use_item] .suite-use-items{position:relative;left:auto;top:auto;bottom:auto;translate:none;width:100%;gap:calc(var(--mobile-px)*14);}
.mobile-ui .suite-frame[data-mode=use_item] .suite-use-items .suite-inventory{flex-wrap:wrap;gap:calc(var(--mobile-px)*12);}
.mobile-ui .suite-frame[data-mode=use_item] .suite-playbody.is-spatial .suite-use-items{position:absolute;left:calc(100% + calc(var(--mobile-px)*12));top:50%;translate:0 -50%;width:calc(var(--mobile-px)*96);gap:calc(var(--mobile-px)*8);}
.mobile-ui .suite-frame[data-mode=use_item] .suite-playbody.is-spatial .suite-use-items .suite-inventory{flex-direction:column;flex-wrap:nowrap;gap:calc(var(--mobile-px)*8);}
.mobile-ui .suite-playbody.is-spatial .suite-use-items .suite-item{width:calc(var(--mobile-px)*86);height:calc(var(--mobile-px)*88);gap:calc(var(--mobile-px)*8);}
.mobile-ui .suite-use-items>.suite-operation-label{font-size:max(11px,calc(var(--mobile-px)*11));}
.mobile-ui .suite-craft{gap:calc(var(--mobile-px)*14);width:100%;}
.mobile-ui .suite-craft-slots{gap:calc(var(--mobile-px)*8);}
.mobile-ui .suite-craft-slot{width:calc(var(--mobile-px)*64);height:calc(var(--mobile-px)*64);border-radius:calc(var(--mobile-px)*6);}
.mobile-ui .suite-craft-slot>svg{font-size:max(11px,calc(var(--mobile-px)*27));}
.mobile-ui .suite-craft-plus{font-size:max(11px,calc(var(--mobile-px)*18));}
.mobile-ui .suite-frame[data-mode=craft_bench] .suite-craft{display:grid;grid-template-columns:1fr 1fr;gap:calc(var(--mobile-px)*12);}
.mobile-ui .suite-frame[data-mode=craft_bench] .suite-inventory{grid-column:2;grid-row:1/4;gap:calc(var(--mobile-px)*8);}
.mobile-ui .suite-frame[data-mode=craft_bench] .suite-item{width:calc(var(--mobile-px)*72);height:calc(var(--mobile-px)*98);gap:calc(var(--mobile-px)*9);}
.mobile-ui .suite-frame[data-mode=craft_bench] .suite-craft>.suite-operation-label{grid-column:1;}
.mobile-ui .suite-dials{gap:calc(var(--mobile-px)*16);}
.mobile-ui .suite-dial{width:calc(var(--mobile-px)*76);gap:calc(var(--mobile-px)*6);}
.mobile-ui .suite-dial button{height:calc(var(--mobile-px)*44);min-height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*22));}
.mobile-ui .suite-dial output{width:calc(var(--mobile-px)*68);height:calc(var(--mobile-px)*64);font-size:max(11px,calc(var(--mobile-px)*34));}
.mobile-ui .suite-frame[data-mode=dial_lock] .suite-craft{display:grid;grid-template-columns:auto auto;justify-content:center;gap:calc(var(--mobile-px)*14) calc(var(--mobile-px)*28);}
.mobile-ui .suite-frame[data-mode=dial_lock] .suite-dials{grid-column:1;grid-row:1/3;}
.mobile-ui .suite-frame[data-mode=dial_lock] .suite-craft>.suite-operation-label{grid-column:2;}
.mobile-ui .suite-calendar{width:min(100%,calc(var(--mobile-px)*560));padding:calc(var(--mobile-px)*16);max-height:var(--stage-height);overflow:auto;overscroll-behavior:contain;}
.mobile-ui .suite-calendar-head{font-size:max(11px,calc(var(--mobile-px)*20));margin-bottom:calc(var(--mobile-px)*16);}
.mobile-ui .suite-calendar-grid{gap:calc(var(--mobile-px)*4);}
.mobile-ui .suite-calendar-grid>span{height:calc(var(--mobile-px)*20);font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .suite-calendar-day{min-height:calc(var(--mobile-px)*44);height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*15));}
.mobile-ui .suite-calendar-day.has-event::after{bottom:calc(var(--mobile-px)*5);}
.mobile-ui .suite-voice{width:min(100%,calc(var(--mobile-px)*520));display:grid;grid-template-columns:calc(var(--mobile-px)*100) minmax(0,1fr);gap:calc(var(--mobile-px)*12) calc(var(--mobile-px)*22);}
.mobile-ui .suite-voice>.suite-operation{grid-column:1;grid-row:1/4;}
.mobile-ui .suite-voice-quote{font-size:max(11px,calc(var(--mobile-px)*18));grid-column:2;margin:0;text-align:center;letter-spacing:.06em;}
.mobile-ui .suite-voice input{width:100%;height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*16));grid-column:2;}
.mobile-ui .suite-voice>.btn{grid-column:2;}
.mobile-ui .suite-puzzle{width:min(100%,var(--stage-height));height:auto;aspect-ratio:1;padding:calc(var(--mobile-px)*5);gap:calc(var(--mobile-px)*3);}
.mobile-ui .suite-puzzle-timeout{font-size:max(11px,calc(var(--mobile-px)*72));}
.mobile-ui .suite-game-hud{top:calc(var(--mobile-px)*4);left:0;right:0;font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .suite-game-hud strong{font-size:max(11px,calc(var(--mobile-px)*23));}
.mobile-ui .suite-moles{width:min(100%,calc(var(--mobile-px)*460));gap:calc(var(--mobile-px)*12);}
.mobile-ui .suite-mole{width:100%;height:clamp(calc(var(--mobile-px)*44),calc((var(--stage-height) - calc(var(--mobile-px)*24))/3),calc(var(--mobile-px)*85));aspect-ratio:auto;min-width:calc(var(--mobile-px)*48);min-height:calc(var(--mobile-px)*44);max-height:calc(var(--mobile-px)*85);}
.mobile-ui .suite-mole>span{font-size:max(11px,calc(var(--mobile-px)*17));}
.mobile-ui .suite-rhythm-note{width:calc(var(--mobile-px)*64);height:calc(var(--mobile-px)*64);min-width:calc(var(--mobile-px)*56);min-height:calc(var(--mobile-px)*56);}
.mobile-ui .suite-rhythm-note>span{font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .suite-rhythm-note>small{font-size:max(11px,calc(var(--mobile-px)*11));}
.mobile-ui .suite-rhythm-note::before{inset:calc(var(--mobile-px)*-12);}
.mobile-ui .suite-rhythm-score{top:0;right:0;font-size:max(11px,calc(var(--mobile-px)*12));gap:calc(var(--mobile-px)*7);}
.mobile-ui .suite-rhythm-score strong{font-size:max(11px,calc(var(--mobile-px)*22));}
.mobile-ui .suite-rhythm-judgment{font-size:max(11px,calc(var(--mobile-px)*18));}
.mobile-ui .suite-rhythm-judgment.is-miss{font-size:max(11px,calc(var(--mobile-px)*15));}
.mobile-ui .suite-timed-feedback{font-size:max(11px,calc(var(--mobile-px)*23));}
.mobile-ui .suite-native-stage{width:100%;height:100%;}
.mobile-ui .suite-native-preview{top:calc(var(--mobile-px)*30);bottom:calc(var(--mobile-px)*28);}
.mobile-ui .suite-native-title{top:0;left:0;right:0;text-align:center;font-size:max(11px,calc(var(--mobile-px)*13));line-height:calc(var(--mobile-px)*20);}
.mobile-ui .suite-native-notice{bottom:0;left:0;right:0;text-align:center;font-size:max(11px,calc(var(--mobile-px)*11));line-height:calc(var(--mobile-px)*18);}
.mobile-ui .suite-native-hud{top:0;font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .suite-native-stage .suite-number-pad{bottom:0;gap:calc(var(--mobile-px)*10);}
.mobile-ui .suite-number-pad button{min-width:calc(var(--mobile-px)*44);min-height:calc(var(--mobile-px)*44);width:auto;padding-inline:calc(var(--mobile-px)*12);font-size:max(11px,calc(var(--mobile-px)*16));}
.mobile-ui .mobile-board-viewport{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-width:none;display:grid;place-items:center;}
.mobile-ui .mobile-board-viewport.is-zoomed{display:flex;align-items:flex-start;justify-content:flex-start;}
.mobile-ui .mobile-board-viewport.is-zoomed>:first-child{flex:none;align-self:flex-start;margin:0;}
.mobile-ui .mobile-board-zoom{position:absolute;z-index:5;right:0;bottom:0;min-width:calc(var(--mobile-px)*44);min-height:calc(var(--mobile-px)*44);padding:calc(var(--mobile-px)*8) calc(var(--mobile-px)*10);display:flex;gap:calc(var(--mobile-px)*7);align-items:center;font-size:max(11px,calc(var(--mobile-px)*12));color:#c7d3c4;background:#14262e9c;border:1px solid #dce8df38;border-radius:calc(var(--mobile-px)*22);backdrop-filter:blur(calc(var(--mobile-px)*12));}
.mobile-ui .mobile-board-zoom svg{width:calc(var(--mobile-px)*18);height:calc(var(--mobile-px)*18);}
.mobile-ui .suite-sudoku button{font-size:clamp(calc(var(--mobile-px)*18),calc(var(--p)*31),calc(var(--mobile-px)*32));}
.mobile-ui .suite-chess-cell{font-size:calc(var(--p)*42);}
.mobile-ui .suite-tiles{width:min(100%,calc(var(--mobile-px)*450));height:auto;gap:calc(var(--mobile-px)*7);padding:calc(var(--mobile-px)*8);}
.mobile-ui .suite-tile{width:calc(var(--mobile-px)*46);height:calc(var(--mobile-px)*54);min-width:calc(var(--mobile-px)*44);min-height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*24));}
.mobile-ui .suite-tile-slot{width:100%;height:calc(var(--mobile-px)*62);bottom:0;gap:calc(var(--mobile-px)*5);}
.mobile-ui .suite-tile-slot .suite-tile{width:calc(var(--mobile-px)*40);height:calc(var(--mobile-px)*46);min-width:0;font-size:max(11px,calc(var(--mobile-px)*20));}
.mobile-ui .suite-shot-power,.mobile-ui .suite-native-stage .suite-shot-power{left:0;right:0;bottom:0;top:auto;min-height:calc(var(--mobile-px)*44);height:auto;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:calc(var(--mobile-px)*12);font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .suite-shot-power input{writing-mode:horizontal-tb;direction:ltr;appearance:auto;width:calc(var(--mobile-px)*120);height:calc(var(--mobile-px)*44);}
.mobile-ui .suite-shot-power .btn{min-width:calc(var(--mobile-px)*90);height:calc(var(--mobile-px)*44);}
.mobile-ui .suite-summary{gap:calc(var(--mobile-px)*16);max-height:100%;overflow:auto;}
.mobile-ui .suite-summary-symbol{font-size:max(11px,calc(var(--mobile-px)*48));}
.mobile-ui .suite-summary h2{font-size:max(11px,calc(var(--mobile-px)*30));}
.mobile-ui .suite-summary p{font-size:max(11px,calc(var(--mobile-px)*14));line-height:1.7;max-width:100%;margin:0;}
.mobile-ui .suite-summary-actions{margin-top:calc(var(--mobile-px)*4);gap:calc(var(--mobile-px)*12);}
.mobile-ui .suite-narrative{gap:calc(var(--mobile-px)*12);max-height:100%;overflow:auto;}
.mobile-ui .suite-narrative h3{font-size:max(11px,calc(var(--mobile-px)*19));line-height:1.6;margin:0;}
.mobile-ui .suite-narrative>span{font-size:max(11px,calc(var(--mobile-px)*30));}
.mobile-ui .suite-narrative p{font-size:max(11px,calc(var(--mobile-px)*13));margin:0;}
.mobile-ui .suite-webgame{inset:0;}
.mobile-ui .suite-web-intro{gap:calc(var(--mobile-px)*16);padding:calc(var(--mobile-px)*20);text-align:center;}
.mobile-ui .suite-web-intro>svg{font-size:max(11px,calc(var(--mobile-px)*36));}
.mobile-ui .suite-web-intro h3{font-size:max(11px,calc(var(--mobile-px)*22));}
.mobile-ui .suite-web-intro p{font-size:max(11px,calc(var(--mobile-px)*14));}
.mobile-ui .suite-web-state{font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .suite-web-close{top:calc(var(--mobile-px)*8);right:calc(var(--mobile-px)*8);min-height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*13));}
.mobile-ui .suite-emotion{grid-template-columns:auto minmax(calc(var(--mobile-px)*70),calc(var(--mobile-px)*200)) auto;font-size:max(11px,calc(var(--mobile-px)*13));gap:calc(var(--mobile-px)*12);}
.mobile-ui .suite-emotion small{font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .suite-review nav{max-height:45dvh;}
.mobile-ui .suite-review nav button,.mobile-ui .suite-review-states>button{min-height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*13));}
.mobile-ui .suite-review-states>span{font-size:max(11px,calc(var(--mobile-px)*12));}

html.mobile-ui[data-ui-orientation=portrait] .suite-frame{--stage-top:124px;--stage-bottom:128px;}
html.mobile-ui[data-ui-orientation=portrait] .suite-library{top:calc(var(--mobile-top) + 100px);bottom:calc(var(--mobile-bottom) + 36px);}
html.mobile-ui[data-ui-orientation=portrait] .suite-library-heading{display:grid;grid-template-columns:1fr auto;gap:8px 12px;}
html.mobile-ui[data-ui-orientation=portrait] .suite-library-heading>div{grid-column:1/-1;}
html.mobile-ui[data-ui-orientation=portrait] .suite-library-heading h2{font-size:max(11px,calc(var(--mobile-px)*26));}
html.mobile-ui[data-ui-orientation=portrait] .suite-library-heading p{font-size:max(11px,calc(var(--mobile-px)*13));line-height:1.7;}
html.mobile-ui[data-ui-orientation=portrait] .suite-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--mobile-space-2);}
html.mobile-ui[data-ui-orientation=portrait] .suite-card{aspect-ratio:5/4;}
html.mobile-ui[data-ui-orientation=portrait] .suite-card-copy{left:calc(var(--mobile-px)*14);right:calc(var(--mobile-px)*12);bottom:calc(var(--mobile-px)*12);}
html.mobile-ui[data-ui-orientation=portrait] .suite-card-symbol{font-size:max(11px,calc(var(--mobile-px)*20));left:calc(var(--mobile-px)*14);top:calc(var(--mobile-px)*14);}
html.mobile-ui[data-ui-orientation=portrait] .suite-card-time{font-size:10px;right:calc(var(--mobile-px)*12);top:calc(var(--mobile-px)*15);}
html.mobile-ui[data-ui-orientation=portrait] .suite-play-heading{top:calc(var(--mobile-top) + 52px);}
html.mobile-ui[data-ui-orientation=portrait] .suite-play-heading h2{font-size:max(11px,calc(var(--mobile-px)*20));}
html.mobile-ui[data-ui-orientation=portrait] .suite-play-heading p{font-size:max(11px,calc(var(--mobile-px)*13));max-height:36px;}
html.mobile-ui[data-ui-orientation=portrait] .suite-timer{top:calc(var(--mobile-top) + calc(var(--mobile-px)*118));font-size:max(11px,calc(var(--mobile-px)*12));}
html.mobile-ui[data-ui-orientation=portrait] .suite-stage-controls{display:flex;flex-direction:column;align-items:stretch;gap:var(--mobile-space-2);}
html.mobile-ui[data-ui-orientation=portrait] .suite-transport{justify-content:space-between;gap:calc(var(--mobile-px)*10);}
html.mobile-ui[data-ui-orientation=portrait] .suite-track{max-width:none;}
html.mobile-ui[data-ui-orientation=portrait] .suite-controls-right{justify-content:flex-end;gap:var(--mobile-space-3);}
html.mobile-ui[data-ui-orientation=portrait] .suite-status{bottom:calc(var(--mobile-bottom) + 108px);font-size:max(11px,calc(var(--mobile-px)*14));}
html.mobile-ui[data-ui-orientation=portrait] .suite-readiness>div{margin-bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*126));}
html.mobile-ui[data-ui-orientation=portrait] .suite-choice{font-size:max(11px,calc(var(--mobile-px)*15));min-height:calc(var(--mobile-px)*48);flex-basis:100%;}
html.mobile-ui[data-ui-orientation=portrait] .suite-question,.mobile-ui[data-ui-orientation=portrait] .suite-question.is-long{font-size:max(11px,calc(var(--mobile-px)*18));max-height:calc(var(--mobile-px)*160);}
html.mobile-ui[data-ui-orientation=portrait] .suite-orb{width:calc(var(--mobile-px)*112);height:calc(var(--mobile-px)*112);}
html.mobile-ui[data-ui-orientation=portrait] .suite-orb>svg:not(.suite-hold-progress){font-size:max(11px,calc(var(--mobile-px)*34));}
html.mobile-ui[data-ui-orientation=portrait] .suite-operation{gap:var(--mobile-space-3);}
html.mobile-ui[data-ui-orientation=portrait] .suite-balance{gap:var(--mobile-space-4);}
html.mobile-ui[data-ui-orientation=portrait] .suite-gesture-zone{height:calc(var(--mobile-px)*260);gap:var(--mobile-space-4);}
html.mobile-ui[data-ui-orientation=portrait] .suite-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
html.mobile-ui[data-ui-orientation=portrait] .suite-note-panel{bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*104));padding-top:calc(var(--mobile-px)*26);}
html.mobile-ui[data-ui-orientation=portrait] .suite-side-tools{right:0;top:calc(100% + calc(var(--mobile-px)*16));display:flex;flex-wrap:wrap;justify-content:center;gap:calc(var(--mobile-px)*8);width:100%;}
html.mobile-ui[data-ui-orientation=portrait] .suite-frame[data-mode=use_item] .suite-playbody.is-spatial .suite-use-items{left:50%;top:calc(100% + calc(var(--mobile-px)*16));bottom:auto;translate:-50% 0;width:100%;gap:calc(var(--mobile-px)*10);}
html.mobile-ui[data-ui-orientation=portrait] .suite-frame[data-mode=use_item] .suite-playbody.is-spatial .suite-use-items .suite-inventory{flex-direction:row;gap:var(--mobile-space-3);}
html.mobile-ui[data-ui-orientation=portrait] .suite-frame[data-mode=craft_bench] .suite-craft{display:flex;flex-direction:column;align-items:center;gap:var(--mobile-space-4);}
html.mobile-ui[data-ui-orientation=portrait] .suite-frame[data-mode=craft_bench] .suite-item{width:calc(var(--mobile-px)*90);height:calc(var(--mobile-px)*108);}
html.mobile-ui[data-ui-orientation=portrait] .suite-craft-slots{gap:calc(var(--mobile-px)*12);}
html.mobile-ui[data-ui-orientation=portrait] .suite-craft-slot{width:calc(var(--mobile-px)*72);height:calc(var(--mobile-px)*72);}
html.mobile-ui[data-ui-orientation=portrait] .suite-frame[data-mode=dial_lock] .suite-craft{display:flex;flex-direction:column;align-items:center;gap:var(--mobile-space-3);}
html.mobile-ui[data-ui-orientation=portrait] .suite-dial output{width:calc(var(--mobile-px)*86);height:calc(var(--mobile-px)*112);font-size:max(11px,calc(var(--mobile-px)*45));}
html.mobile-ui[data-ui-orientation=portrait] .suite-dial{width:calc(var(--mobile-px)*90);gap:calc(var(--mobile-px)*10);}
html.mobile-ui[data-ui-orientation=portrait] .suite-calendar{padding:calc(var(--mobile-px)*18) calc(var(--mobile-px)*12);width:100%;}
html.mobile-ui[data-ui-orientation=portrait] .suite-calendar-grid{gap:calc(var(--mobile-px)*3);}
html.mobile-ui[data-ui-orientation=portrait] .suite-voice{display:flex;flex-direction:column;gap:var(--mobile-space-4);}
html.mobile-ui[data-ui-orientation=portrait] .suite-voice input{max-width:calc(var(--mobile-px)*300);}
html.mobile-ui[data-ui-orientation=portrait] .suite-voice-quote{font-size:max(11px,calc(var(--mobile-px)*22));}
html.mobile-ui[data-ui-orientation=portrait] .suite-moles{width:100%;gap:calc(var(--mobile-px)*10);}
html.mobile-ui[data-ui-orientation=portrait] .suite-mole{min-height:calc(var(--mobile-px)*70);}
html.mobile-ui[data-ui-orientation=portrait] .suite-summary h2{font-size:max(11px,calc(var(--mobile-px)*28));}
html.mobile-ui[data-ui-orientation=portrait] .suite-summary-actions{flex-direction:column;}

/* Standalone landing background uses the same safe areas and original reveal timeline. */
.mobile-ui .experience{height:var(--app-height,100dvh);--scene-scale:.9;}
.mobile-ui .experience .header{padding:calc(var(--mobile-top) + calc(var(--mobile-px)*10)) var(--mobile-right) 0 var(--mobile-left);gap:calc(var(--mobile-px)*12);}
.mobile-ui .experience .header .brand img{width:calc(var(--mobile-px)*108);}
.mobile-ui .experience .header-actions{gap:calc(var(--mobile-px)*6);}
.mobile-ui .experience .account-status>span:last-child{display:none;}
.mobile-ui .experience .main-menu{left:var(--mobile-left);top:calc(var(--mobile-top) + calc(var(--mobile-px)*70));gap:calc(var(--mobile-px)*3);}
.mobile-ui .experience .main-menu button{font-size:max(11px,calc(var(--mobile-px)*19));min-height:calc(var(--mobile-px)*44);padding-block:calc(var(--mobile-px)*6);}
.mobile-ui .experience .preview-controls{bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*12));}
.mobile-ui .experience .replay-control{min-height:calc(var(--mobile-px)*44);font-size:max(11px,calc(var(--mobile-px)*12));}
.mobile-ui .experience .settings{top:calc(var(--mobile-top) + calc(var(--mobile-px)*64));right:var(--mobile-right);max-width:calc(100vw - var(--mobile-left) - var(--mobile-right));max-height:calc(var(--app-height,100dvh) - var(--mobile-top) - var(--mobile-bottom) - calc(var(--mobile-px)*80));overflow:auto;}
.mobile-ui .experience .settings button{min-height:calc(var(--mobile-px)*44);}
.mobile-ui .experience .settings label{font-size:max(11px,calc(var(--mobile-px)*13));}
html.mobile-ui[data-ui-orientation=portrait] .experience{--scene-scale:.86;}
html.mobile-ui[data-ui-orientation=portrait] .experience .main-menu{top:auto;bottom:calc(var(--mobile-bottom) + 64px);gap:var(--mobile-space-1);}
html.mobile-ui[data-ui-orientation=portrait] .experience .main-menu button{font-size:max(11px,calc(var(--mobile-px)*21));}
html.mobile-ui[data-ui-orientation=portrait] .experience .cover-logo{left:50%;top:29%;width:92%;}
html.mobile-ui[data-ui-orientation=portrait] .experience .menu-backdrop{width:100%;mask-image:linear-gradient(0deg,#000 10%,#0009 45%,transparent 85%);-webkit-mask-image:linear-gradient(0deg,#000 10%,#0009 45%,transparent 85%);}

.mobile-ui .topbar .brand{min-height:calc(var(--mobile-px)*44);display:flex;align-items:center;}
.mobile-ui .saves-layout .section-line{display:none;}
.mobile-ui .save-meta{height:calc(var(--mobile-px)*44);margin-bottom:var(--mobile-space-1);}
.mobile-ui .save-date{display:block;}
.mobile-ui .save-date>span{font-size:max(11px,calc(var(--mobile-px)*11));}
.mobile-ui .affinity-layout{--heart-size:calc(var(--mobile-px)*19);top:calc(var(--mobile-top) + 56px);bottom:calc(var(--mobile-bottom) + 36px);gap:var(--mobile-space-3);padding:12px calc(var(--mobile-right) + 8px) 12px calc(var(--mobile-left) + 8px);}
.mobile-ui .affinity-heart-fill svg{width:var(--heart-size);height:var(--heart-size);}
html.mobile-ui[data-ui-orientation=portrait] .affinity-layout{--heart-size:calc(var(--mobile-px)*25);}
html.mobile-ui[data-ui-orientation=portrait] .saves-layout .section-line{font-size:max(11px,calc(var(--mobile-px)*12));}
html.mobile-ui[data-ui-orientation=portrait] .save-shell{flex-basis:min(57.6vw,calc(var(--mobile-px)*270));}
html.mobile-ui[data-keyboard-open=true] .suite-frame[data-mode=tencent_voice]{--stage-top:calc(var(--mobile-px)*64);--stage-bottom:calc(var(--mobile-px)*12);}
html.mobile-ui[data-keyboard-open=true] .suite-frame[data-mode=tencent_voice] .suite-play-heading,html.mobile-ui[data-keyboard-open=true] .suite-frame[data-mode=tencent_voice] .suite-stage-controls{display:none;}
html.mobile-ui[data-keyboard-open=true] .suite-frame[data-mode=tencent_voice] .suite-voice{display:flex;flex-direction:column;gap:calc(var(--mobile-px)*8);max-height:100%;overflow:auto;}
html.mobile-ui[data-keyboard-open=true] .suite-frame[data-mode=tencent_voice] .suite-voice>.suite-operation,html.mobile-ui[data-keyboard-open=true] .suite-frame[data-mode=tencent_voice] .suite-voice-quote{display:none;}

/* A compact game header leaves the board clear of transport and engine controls. */
html.mobile-ui .suite-frame:has(.suite-native-stage){--stage-top:56px;--stage-bottom:72px;}
.mobile-ui .suite-frame:has(.suite-native-stage) .suite-play-heading{display:none;}
.mobile-ui .suite-native-stage .suite-native-preview{top:calc(var(--mobile-px)*26);bottom:calc(var(--mobile-px)*26);}
.mobile-ui .suite-native-preview .suite-number-pad{gap:calc(var(--mobile-px)*3);}
html.mobile-ui[data-ui-orientation=portrait] .suite-frame:has(.suite-native-stage){--stage-bottom:128px;}

html.mobile-ui[data-ui-orientation=landscape] .save-shell>.save-card{max-height:calc(var(--app-height,100dvh) - var(--mobile-top) - var(--mobile-bottom) - calc(var(--mobile-px)*174));}
html.mobile-ui[data-ui-orientation=landscape] .pause-menu{top:calc(var(--mobile-top) + calc(var(--mobile-px)*62));bottom:calc(var(--mobile-bottom) + calc(var(--mobile-px)*38));width:calc(100% - var(--mobile-left) - var(--mobile-right));display:grid;grid-template-columns:minmax(calc(var(--mobile-px)*140),calc(var(--mobile-px)*200)) minmax(calc(var(--mobile-px)*200),calc(var(--mobile-px)*260));gap:0 calc(var(--mobile-px)*28);align-content:center;column-gap:var(--mobile-space-5);}
html.mobile-ui[data-ui-orientation=landscape] .pause-menu .eyebrow,html.mobile-ui[data-ui-orientation=landscape] .pause-menu h1{grid-column:1;}
html.mobile-ui[data-ui-orientation=landscape] .pause-list{grid-column:2;grid-row:1/3;gap:0;}
@media(max-height:360px){
 html.mobile-ui[data-ui-orientation=landscape] .result-layout{top:calc(var(--mobile-px)*58);bottom:auto;gap:var(--mobile-space-3);}
 html.mobile-ui[data-ui-orientation=landscape] .result-layout h1{font-size:max(11px,calc(var(--mobile-px)*34));}
 html.mobile-ui[data-ui-orientation=landscape] .result-actions{flex-direction:row;gap:calc(var(--mobile-px)*10);}
 html.mobile-ui[data-ui-orientation=landscape] .result-actions>div{flex:1;min-width:0;}
 html.mobile-ui[data-ui-orientation=landscape] .result-actions .btn{width:100%;font-size:max(11px,calc(var(--mobile-px)*13));padding-inline:calc(var(--mobile-px)*10);}
}

.mobile-ui .suite-orb,.mobile-ui .suite-rhythm-note,.mobile-ui .suite-puzzle-piece{touch-action:none;-webkit-user-select:none;user-select:none;}

@media(max-height:700px){
 html.mobile-ui[data-ui-orientation=portrait] .suite-dial{width:calc(var(--mobile-px)*76);gap:calc(var(--mobile-px)*6);}
 html.mobile-ui[data-ui-orientation=portrait] .suite-dial output{width:calc(var(--mobile-px)*68);height:calc(var(--mobile-px)*64);font-size:max(11px,calc(var(--mobile-px)*34));}
 html.mobile-ui[data-ui-orientation=portrait] .suite-frame:is([data-mode=dial_lock],[data-mode=craft_bench]) .suite-craft{gap:calc(var(--mobile-px)*14);}
 html.mobile-ui[data-ui-orientation=portrait] .suite-frame[data-mode=craft_bench] .suite-item{height:calc(var(--mobile-px)*88);}
 html.mobile-ui[data-ui-orientation=portrait] .suite-craft-slot{width:calc(var(--mobile-px)*64);height:calc(var(--mobile-px)*64);}
 html.mobile-ui[data-ui-orientation=portrait] .suite-voice{display:grid;grid-template-columns:calc(var(--mobile-px)*84) minmax(0,1fr);gap:var(--mobile-space-3);align-items:center;}
 html.mobile-ui[data-ui-orientation=portrait] .suite-voice>.suite-operation .suite-orb{width:calc(var(--mobile-px)*84);height:calc(var(--mobile-px)*84);min-width:calc(var(--mobile-px)*84);min-height:calc(var(--mobile-px)*84);}
 html.mobile-ui[data-ui-orientation=portrait] .suite-voice-quote{font-size:max(11px,calc(var(--mobile-px)*18));}
}

/* Visible controls are smaller; transparent children retain a 44px touch area. */
.mobile-ui .mobile-hit-control{position:relative;overflow:visible;}
.mobile-ui .mobile-hit-control>.mobile-hit-area{position:absolute;display:block;left:50%;top:50%;translate:-50% -50%;width:max(100%,44px);height:max(100%,44px);z-index:3;border:0;border-radius:inherit;background:transparent;pointer-events:auto;}
.mobile-ui .header-actions,.mobile-ui .suite-top-actions,.mobile-ui .suite-transport{gap:9px;}
.mobile-ui .home-menu button,.mobile-ui .pause-list button{min-height:40px;}
html.mobile-ui[data-ui-orientation] .home-menu,html.mobile-ui[data-ui-orientation] .pause-list{gap:4px;}
.mobile-ui .glass-menu{gap:4px;}
.mobile-ui .glass-menu button{height:40px;min-height:40px;}
.mobile-ui input[type=range]{min-height:44px;}
.mobile-ui .setting-row{min-height:44px;gap:var(--mobile-space-2);}
.mobile-ui .suite-hotspot,.mobile-ui .suite-area-option,.mobile-ui .suite-rhythm-note,.mobile-ui .suite-mole,.mobile-ui .suite-number-pad button{min-width:44px;min-height:44px;}
.mobile-ui .suite-voice input,.mobile-ui .suite-note-text select{font-size:16px;}
html.mobile-ui[data-ui-orientation=portrait] .chapter-actions{display:flex;justify-content:flex-start;width:auto;}
html.mobile-ui[data-ui-orientation=portrait] .chapter-actions .btn{width:calc(var(--mobile-px)*180);flex:0 1 calc(var(--mobile-px)*180);}
html.mobile-ui[data-ui-orientation=portrait] .choice-options{align-items:center;padding-inline:0;gap:var(--mobile-space-3);}
html.mobile-ui[data-ui-orientation=portrait] .choice-options>div{width:min(100%,calc(var(--mobile-px)*340));}
.mobile-ui .suite-choice-grid{max-width:calc(var(--mobile-px)*780);gap:var(--mobile-space-3);}
html.mobile-ui[data-ui-orientation=portrait] .suite-choice-grid{max-width:calc(var(--mobile-px)*380);}
.mobile-ui .btn,.mobile-ui .chapter-actions .btn,.mobile-ui .result-actions .btn,.mobile-ui .modal-actions .btn,.mobile-ui .suite-controls-right .btn,.mobile-ui .suite-choice,.mobile-ui .choice-option{font-size:max(12px,calc(var(--mobile-px)*15));}
.mobile-ui .suite-paper>svg{display:block;}
.mobile-ui .suite-paper .suite-mini-actions{position:absolute;top:calc(100% + 6px);left:50%;translate:-50% 0;width:max-content;max-width:calc(100vw - var(--mobile-left) - var(--mobile-right));min-height:44px;flex-wrap:nowrap;gap:var(--mobile-space-2);}
.mobile-ui .suite-paper .suite-mini-actions>span{white-space:nowrap;}
.mobile-ui .suite-paper .suite-mini-actions button{min-width:44px;}
.mobile-ui .suite-paper{translate:0 -28px;}
.mobile-ui .suite-note-panel p,.mobile-ui .suite-summary p,.mobile-ui .suite-narrative p,.mobile-ui .suite-web-intro p{font-size:12px;}

/* A card and its scroll slot share one width, avoiding leftover desktop gaps. */
.mobile-ui .chapter-cell{flex:0 0 auto;width:max-content;}

/* The playback back arrow keeps the existing phone control size and safe insets. */
.mobile-ui .game-hud .hud-leading{gap:var(--mobile-space-1)}
.mobile-ui .hud-leading .hud-scene{max-width:none}
.mobile-ui .playback-track{--seek-knob:8px}
.mobile-ui .playback-seek{height:44px}
.mobile-ui .playback-bar{flex-wrap:nowrap;gap:var(--mobile-space-2)}
.mobile-ui .playback-bar>.playback-track{width:100%;flex:none}
.mobile-ui .playback-controls{gap:var(--mobile-space-2)}
html.mobile-ui[data-ui-orientation=portrait] .playback-status{flex-basis:auto}
html.mobile-ui[data-ui-orientation=portrait] .playback-tools{width:auto}
.mobile-ui .suite-timeline{width:100%;flex:none}
.mobile-ui .suite-player .suite-timeline .suite-track{height:44px;min-height:44px;max-width:none;min-width:0;flex:none}
html.mobile-ui[data-ui-orientation=portrait] .suite-stage-controls>.playback-controls{flex-wrap:wrap;row-gap:var(--mobile-space-2)}
html.mobile-ui[data-ui-orientation=portrait] .suite-stage-controls .suite-transport{flex-basis:100%;justify-content:flex-start}
html.mobile-ui[data-ui-orientation=portrait] .suite-stage-controls .suite-controls-right{width:100%}
.mobile-ui .suite-player[data-video-timeline=visible] .suite-status{bottom:calc(var(--mobile-bottom) + 76px)}
html.mobile-ui[data-ui-orientation=portrait] .suite-player[data-video-timeline=visible] .suite-status{bottom:calc(var(--mobile-bottom) + 128px)}
.mobile-ui .playback-status{gap:var(--mobile-space-1)}
.mobile-ui .playback-status>[data-action=playback]{width:44px;min-width:44px;padding:0;justify-content:center}
.mobile-ui .playback-status>[data-action=playback]>span{display:none}
.mobile-ui .playback-time{font-size:11px;letter-spacing:0}
@media(max-width:360px){.mobile-ui .playback-controls{gap:6px}}
/* host.css */
/* 接入真实剧本后补充的少量样式；其余全部来自设计稿的 style.css / playtests.css / mobile.css。 */
.suite-subtitle {
  position: absolute;
  left: 50%;
  bottom: calc(var(--p) * 150);
  z-index: 3;
  max-width: 76%;
  translate: -50% 0;
  font-size: calc(var(--p) * 27);
  line-height: 1.7;
  letter-spacing: 0.06em;
  text-align: center;
  white-space: pre-line;
  text-shadow: 0 2px 15px #000;
  pointer-events: none;
}

.suite-subtitle[hidden] {
  display: none;
}

.suite-load-detail {
  max-width: min(560px, 86vw);
  margin: 12px auto 0;
  padding: 0;
  list-style: none;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.6;
  word-break: break-all;
  user-select: text;
  -webkit-user-select: text;
}

/* 设备方向与内容方向不一致时（竖持手机看横屏剧，或反过来），完整显示画面而不是裁切铺满；
   画面之外仍是设计稿的模糊背景。 */
html[data-ui-orientation='portrait'] .game-frame[data-content-orientation='landscape'] .suite-media > video,
html[data-ui-orientation='portrait'] .game-frame[data-content-orientation='landscape'] .suite-media > img,
html[data-ui-orientation='landscape'] .game-frame[data-content-orientation='portrait'] .suite-media > video,
html[data-ui-orientation='landscape'] .game-frame[data-content-orientation='portrait'] .suite-media > img {
  object-fit: contain;
}

/* 只剩操作说明一行时，说明文字不再缩在标题下面 */
.suite-play-heading > p:only-child {
  margin: 0;
}

/* 选集与剧情树：盖在暂停的画面上，内部版式用设计稿原有的 .chapter-* / .tree-* 规则 */
/* 层级：高于播放页（它自成一层），低于确认弹窗（10）和提示条（30），这样从暂停菜单点退出时弹窗盖在菜单上 */
.suite-overlay{z-index:5;background:linear-gradient(180deg,#05090bd9,#05090bb8 38%,#05090bf2);backdrop-filter:blur(calc(var(--p)*16)) saturate(.8);-webkit-backdrop-filter:blur(calc(var(--p)*16)) saturate(.8)}
.suite-overlay:is(.suite-overlay-chapters,.suite-overlay-tree,.suite-overlay-pause){isolation:isolate;background:#070c0e;backdrop-filter:none;-webkit-backdrop-filter:none;}
.suite-chapter-background,.suite-tree-background,.suite-pause-background{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:#0a1014;}
.suite-chapter-background>img,.suite-chapter-background>canvas{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;filter:saturate(.8);transform:scale(1.025);}
.suite-chapter-background::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#05090bd9,#05090bb8 38%,#05090bf2);}
.suite-chapter-background>.chapter-frame-loader{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;}
/* 沿用原版的底图和模糊分层，减轻遮罩，保留实际封面的明暗轮廓。 */
.suite-tree-background>.suite-chapter-background{inset:-1%;filter:blur(22px) brightness(.65);transform:scale(1.06);}
.suite-tree-background>.suite-chapter-background::after{display:none;}
.suite-tree-background .suite-chapter-background>img,.suite-tree-background .suite-chapter-background>canvas{filter:none;}
.suite-tree-background::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#080d12cc,#080d12a3 46%,#080d126b);}
.suite-overlay .chapter-card.is-locked{cursor:not-allowed}
.suite-overlay .tree-node.is-locked[aria-disabled=true]{opacity:1;pointer-events:none;border-color:#c4d4ca1f;box-shadow:none;transform:none;}
.suite-overlay .tree-node.is-locked[aria-disabled=true] img{opacity:.29;filter:grayscale(.65) brightness(.8);}
.suite-overlay .tree-node:focus-visible,.suite-overlay .tree-node.is-locked[aria-disabled=true]:focus-visible{border-color:#f6efd5;box-shadow:0 0 0 1px #eee6cb5c;outline:none;}
.suite-overlay .tree-node:not(:has(img)),.suite-overlay .chapter-card:not(:has(img)){background:linear-gradient(135deg,#18232a,#0c1216)}
.suite-overlay .tree-viewport{display:flex}
.suite-overlay .tree-board{margin-block:auto}
/* 连线画布跟随整张图，不能被 playtests.css 的 .suite-frame svg 图标尺寸覆盖。 */
.suite-frame .tree-connections {
  width: 100%;
  height: 100%;
}

/* 播放页返回键复用菜单返回键的光晕，尺寸仍由播放页和移动端规则决定。 */
.suite-top .back-btn {
  color: #c8d2d1;
}
.suite-top .back-btn svg {
  filter: none;
  transition: filter .25s var(--soft);
}
.suite-top .back-btn:is(:hover, :active, :focus-visible) {
  color: #f0faff;
  background: transparent;
  box-shadow: none;
}
.suite-top .back-btn:focus-visible {
  outline: none;
}
.suite-top .back-btn:is(:hover, :focus-visible) svg {
  filter: drop-shadow(0 0 calc(var(--p) * 4) #e5faff66);
}
.suite-top .back-btn:active svg {
  filter: drop-shadow(0 0 calc(var(--p) * 6) #e5faffa6);
  transition: filter .1s ease-out;
}

/* 时间在左；播放与前后片段的图标使用连续、等宽的点击区域。 */
html .suite-frame .suite-stage-controls .suite-transport {
  justify-content: flex-start;
  gap: 0;
}
.suite-stage-controls .suite-transport > [data-media-time] {
  flex: none;
  margin-inline-end: 12px;
  white-space: nowrap;
}
.suite-stage-controls .suite-transport > [data-suite='pause'] {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
}
/* 片段切换跟随播放键，用一组纯图标保留独立的触控区域。 */
.suite-fragment-controls {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0;
}
.suite-fragment-controls > .subtle-btn {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 18px;
  line-height: 1;
}
.suite-fragment-controls svg {
  width: 1em;
  height: 1em;
  font-size: inherit;
}
.mobile-ui .suite-fragment-controls > .subtle-btn {
  font-size: max(11px, calc(var(--mobile-px) * 18));
}
.mobile-ui .suite-transport {
  flex: 1 0 auto;
}
.suite-controls-right .suite-speed-menu {
  left: auto;
  right: 0;
}

/* PC 的控件保持固定尺寸；移动端继续使用原有适配。 */
.suite-top .back-heading {
  flex: 1;
  min-width: 0;
}
.suite-top .back-btn,
.suite-top-actions {
  flex: none;
}
.suite-top h1 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-ui .game-frame {
  --p: 1px;
  --safe: clamp(16px, 4vw, 64px);
  --content-aspect: 1.777777778;
  font-size: 16px;
}
.pc-ui .suite-top .back-heading {
  gap: 8px;
}
.pc-ui .suite-top h1 {
  font-size: 18px;
}
.pc-ui .game-frame[data-content-orientation='portrait'] {
  --content-aspect: .5625;
}
.pc-ui .suite-spatial-plane {
  inset: 0;
  margin: auto;
  width: min(100vw, calc(100dvh * var(--content-aspect)));
  height: min(100dvh, calc(100vw / var(--content-aspect)));
}
.pc-ui .suite-top :is(.back-btn, .icon-btn),
.pc-ui .suite-top-actions > button,
.pc-ui .suite-transport > button,
.pc-ui .suite-speed-wrap > button,
.pc-ui .suite-controls-right > button {
  min-height: 44px;
}
.pc-ui .suite-top :is(.back-btn, .icon-btn),
.pc-ui .suite-transport > button,
.pc-ui .suite-controls-right > .suite-sound {
  min-width: 44px;
}
.pc-ui .suite-top-actions > button,
.pc-ui .suite-controls-right > button {
  flex-shrink: 0;
}
.pc-ui .suite-subtitle {
  width: max-content;
  max-width: min(760px, calc(100% - 32px));
  font-size: 20px;
}

/* 菜单使用实际 PC 控件尺寸，不能直接把大屏设计稿的数值当作 CSS 像素。 */
.pc-ui .suite-overlay > .back-heading {
  top: 24px;
  right: var(--safe);
  gap: 8px;
}
.pc-ui .suite-overlay > .back-heading h1 {
  font-size: 20px;
}
.pc-ui .suite-overlay .back-heading .icon-button {
  width: 44px;
  height: 44px;
  flex: none;
}
.pc-ui .suite-overlay .back-heading .back-button svg {
  width: 24px;
  height: 24px;
}
.pc-ui .suite-overlay > .page-footer {
  bottom: 24px;
  font-size: 12px;
}
.pc-ui .suite-overlay .tree-legend {
  gap: 20px;
  font-size: 12px;
}
.pc-ui .suite-overlay .tree-board {
  /* 图的坐标仍用原设计参考系；固定换算为 240×135px 节点，与视口大小无关。 */
  --p: calc(240px / 340);
}
.pc-ui .suite-overlay .tree-node .node-number {
  font-size: 20px;
}
.pc-ui .suite-overlay .tree-node .node-info strong {
  font-size: 14px;
}
.pc-ui .suite-overlay .tree-node .node-progress-value {
  font-size: 12px;
}

/* 竖屏内容在宽视口中保持原比例，交互坐标跟随画面，控件留在视口边缘。 */
.pc-ui .game-frame[data-content-orientation='portrait'] .suite-media > video,
.pc-ui .game-frame[data-content-orientation='portrait'] .suite-media > img {
  object-fit: contain;
}

/* 窄 PC 只调整间距、换行和滚动，不依赖任何手机尺寸变量或手机样式。 */
.pc-ui.compact-ui .suite-top {
  top: 16px;
  gap: 12px;
}
.pc-ui.compact-ui .suite-top .back-heading {
  flex: 1;
  min-width: 0;
  gap: 8px;
}
.pc-ui.compact-ui .suite-top h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-ui.compact-ui .suite-top-actions {
  gap: 4px;
}
.pc-ui.compact-ui .suite-top-actions > button {
  width: 44px;
  min-width: 44px;
  padding: 0;
  justify-content: center;
}
.pc-ui.compact-ui .suite-top-actions > button > span {
  display: none;
}
.pc-ui.compact-ui .suite-stage-controls {
  bottom: 16px;
  gap: 12px;
}
.pc-ui.compact-ui .suite-stage-controls > .playback-controls {
  flex-wrap: wrap;
  row-gap: 8px;
}
.pc-ui.compact-ui .suite-transport {
  flex: none;
}
.pc-ui .suite-transport small {
  white-space: nowrap;
}
.pc-ui.compact-ui .suite-stage-controls .suite-controls-right {
  flex: none;
  margin-left: auto;
  padding-right: 0;
  gap: 16px;
}
.pc-ui.compact-ui .suite-subtitle {
  bottom: 160px;
}
.pc-ui.compact-ui .suite-play-heading {
  top: 80px;
}
.pc-ui.compact-ui .suite-player:not(.has-spatial) .suite-spatial-plane {
  inset: 0;
  width: 100%;
  height: 100%;
}
.pc-ui.compact-ui .suite-playbody {
  inset: 112px var(--safe) 160px;
}
.pc-ui.compact-ui .suite-player:is(.has-choices, .has-spatial) .suite-playbody {
  inset: 0;
}
/* 选项是外围 UI：与视频比例分开定位，宽、窄 PC 使用同一套实际尺寸。 */
.pc-ui .suite-player.has-choices .suite-spatial-plane {
  inset: 0;
  width: 100%;
  height: 100%;
}
.pc-ui .suite-player.has-choices .suite-playbody {
  inset: 0;
}
.pc-ui .suite-choices {
  --choice-top: 112px;
  --choice-bottom: 144px;
  left: 50%;
  right: auto;
  bottom: var(--choice-bottom);
  width: min(640px, calc(100% - var(--safe) * 2));
  max-height: max(44px, calc(100% - var(--choice-top) - var(--choice-bottom)));
  padding: 2px;
  translate: -50% 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 16px;
}
.pc-ui.compact-ui .suite-choices {
  --choice-top: 80px;
}
.pc-ui .suite-question,
.pc-ui .suite-question.is-long {
  flex: none;
  max-width: 100%;
  font-size: 20px;
  line-height: 1.5;
}
.pc-ui .suite-choice-grid {
  flex: none;
  width: 100%;
  max-width: 640px;
  gap: 12px;
}
.pc-ui .suite-choice {
  flex: 0 1 280px;
  width: 280px;
  min-width: 0;
  max-width: min(280px, 100%);
  min-height: 44px;
  padding: 9px 20px;
  border-radius: 24px;
  font-size: 16px;
  line-height: 1.5;
}
.pc-ui.compact-ui .suite-overlay > .back-heading {
  top: 16px;
  right: var(--safe);
}
.pc-ui.compact-ui .suite-overlay > .page-footer {
  bottom: 16px;
  gap: 16px;
}
.pc-ui.compact-ui .suite-overlay .tree-layout {
  top: 88px;
  bottom: 64px;
}
.pc-ui.compact-ui .mobile-board-viewport {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  overscroll-behavior: contain;
}
.pc-ui.compact-ui .mobile-board-viewport.is-zoomed {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
.pc-ui.compact-ui .mobile-board-viewport.is-zoomed > :first-child {
  flex: none;
  align-self: flex-start;
  margin: 0;
}
.pc-ui.compact-ui .mobile-board-zoom {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
  color: #c7d3c4;
  background: #14262e9c;
  border: 1px solid #dce8df38;
  border-radius: 22px;
}
.pc-ui.compact-ui .mobile-board-zoom svg {
  width: 18px;
  height: 18px;
}
/* 暂停：冻结的故事画面、时间徽记与菜单组成一个居中的内容区。 */
.suite-overlay.suite-overlay-pause{--pause-left:var(--safe);--pause-right:var(--safe);--pause-top:96px;--pause-bottom:64px;--pause-width:520px;--pause-gap:28px;}
.suite-pause-background>.suite-chapter-background{inset:-1%;filter:blur(24px) brightness(.42) saturate(.65);transform:scale(1.08);}
.suite-pause-background>.suite-chapter-background::after{display:none;}
.suite-pause-background .suite-chapter-background>img,.suite-pause-background .suite-chapter-background>canvas{filter:none;}
.suite-pause-background::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#060c10d9,#060c1099 48%,#060c1070),linear-gradient(0deg,#050a0d8c,transparent 45%);}
.suite-overlay-pause .pause-layout{position:absolute;inset:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:safe center;min-height:0;padding:var(--pause-top) var(--pause-right) var(--pause-bottom) var(--pause-left);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;}
html .suite-overlay.suite-overlay-pause .pause-menu{position:relative;inset:auto;translate:none;flex:none;width:min(var(--pause-width),100%);max-height:none;display:flex;flex-direction:column;align-items:stretch;align-content:normal;gap:var(--pause-gap);min-width:0;overflow:visible;padding:8px 0;}
.suite-overlay-pause .pause-menu .pause-heading{position:relative;isolation:isolate;display:block;flex:none;min-width:0;}
.suite-overlay-pause .pause-title-light{top:-12px;bottom:-6px;left:-20px;right:auto;width:min(calc(100% + 40px),360px);opacity:.55;}
.suite-overlay-pause .pause-title-light::before{inset:-20% -3%;background:radial-gradient(ellipse at 50% 50%,#e4f1fc42,#aec7d51c 34%,transparent 72%);filter:blur(12px);}
.suite-overlay-pause .pause-title-light::after{top:50%;bottom:auto;translate:0 -50%;height:60%;background:radial-gradient(ellipse,#e8f5ff30,transparent 70%);filter:blur(10px);}
.suite-overlay-pause .pause-title-light .result-title-ray{height:12px;background:radial-gradient(ellipse,#e8f4fc55,transparent 72%);filter:blur(7px);opacity:.3;}
.suite-overlay-pause .pause-title-light .result-title-ray:nth-child(2){height:22px;filter:blur(8px);opacity:.4;}
.suite-overlay-pause .pause-title-light .result-title-ray:nth-child(3){height:14px;filter:blur(7px);opacity:.25;}
.suite-overlay.suite-overlay-pause .pause-menu .pause-heading>h1{position:relative;z-index:1;display:block;margin:0;padding:0 8px 6px 0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#eef1f3;font-family:Impact,"Arial Black","Helvetica Neue",sans-serif;font-size:48px;font-weight:900;font-style:italic;line-height:1.12;letter-spacing:-.025em;text-transform:uppercase;text-shadow:0 2px 0 #26303980,0 7px 30px #0003;}
.suite-overlay-pause .pause-menu>.pause-list{flex:none;min-width:0;width:100%;display:grid;gap:4px;}
.suite-overlay-pause .pause-list>div:has(>[data-suite="overlay-close"]){margin-bottom:8px;}
.suite-overlay-pause .pause-list>div:has(>[data-suite="flow"]){margin-top:8px;}
.suite-overlay-pause .pause-list button{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;height:44px;min-height:44px;padding:0;border:0;background:none;font-size:16px;text-shadow:0 0 6px #eaf1e400,0 0 14px #c8e1e800;transition:color .2s var(--soft),text-shadow .34s var(--soft),padding-inline-start .3s var(--ease);}
.suite-overlay-pause .pause-list button[data-suite="overlay-close"]{color:var(--text);font-weight:500;}
.suite-overlay-pause .pause-list button[data-suite="exit"]{color:#9aa79d;}
.suite-overlay-pause .pause-label{position:relative;isolation:isolate;min-width:0;max-width:calc(100% - 44px);text-align:start;}
.suite-overlay-pause .pause-list button::before{content:"";position:absolute;left:0;top:50%;width:3px;height:3px;background:#e7ebdf;opacity:0;transform:translate3d(-3px,-50%,0) rotate(45deg) scale(.55);box-shadow:0 0 3px #dce8dc00;pointer-events:none;transition:opacity .14s var(--soft),transform .22s var(--ease),box-shadow .26s var(--soft);}
.suite-overlay-pause .pause-label::after{content:"";position:absolute;z-index:-1;inset:-10px -28px -10px -8px;background:radial-gradient(ellipse at 42% 50%,#dce7ee24,transparent 72%);opacity:0;transform:translateX(-2px) scaleX(.7);filter:blur(6px);pointer-events:none;transition:opacity .2s var(--soft),transform .32s var(--ease);}
.suite-overlay-pause .pause-arrow{display:inline-flex;flex:none;opacity:0;transform:translateX(-8px);transition:opacity .2s var(--soft),transform .3s var(--ease),filter .2s var(--soft);}
.suite-overlay-pause .pause-list button .pause-arrow svg{flex:none;font-size:16px;opacity:1;}
.suite-overlay-pause .pause-list button:is(:hover,:focus-visible){padding-inline-start:12px;outline:none;color:#f7f6ee;text-shadow:0 0 6px #eaf1e438,0 0 14px #c8e1e81c;}
.suite-overlay-pause .pause-list button:is(:hover,:focus-visible)::before{opacity:1;transform:translate3d(0,-50%,0) rotate(45deg) scale(1);box-shadow:0 0 6px #dce8dc4d;transition-delay:.015s;}
.suite-overlay-pause .pause-list button:is(:hover,:focus-visible) .pause-label::after{opacity:.8;transform:none;}
.suite-overlay-pause .pause-list button:is(:hover,:focus-visible) .pause-arrow{opacity:1;transform:none;filter:drop-shadow(0 0 4px #e5faff66);}
.suite-overlay-pause .pause-visual{position:absolute;z-index:-1;left:-26px;top:calc(50% - 28px);translate:0 -50%;width:240px;aspect-ratio:1;opacity:.14;pointer-events:none;isolation:isolate;mask-image:linear-gradient(180deg,#000 30%,#000b 50%,#0009 80%,transparent 100%);-webkit-mask-image:linear-gradient(180deg,#000 30%,#000b 50%,#0009 80%,transparent 100%);}
.suite-overlay-pause .pause-emblem{position:absolute;inset:0;display:block;}
.suite-overlay-pause .pause-emblem::before{content:"";position:absolute;inset:8% 13% 30%;background:radial-gradient(ellipse,#e4f2fc14,transparent 68%);filter:blur(12px);opacity:.3;}
.suite-overlay-pause .pause-emblem-art{position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:contain;}
.suite-overlay.suite-overlay-pause[data-card-lights] .pause-title-dust{inset:-12px auto -22px -12px;width:min(calc(100% + 24px),340px);opacity:.9;}
.suite-overlay.suite-overlay-pause[data-card-lights] .pause-title-dust i{width:calc(var(--dust-size)*1px);height:calc(var(--dust-size)*1px);--dust-strength:.95;filter:blur(.2px);background:#edf6fc;box-shadow:0 0 4px #e5f4ff80;animation-play-state:running;}
.suite-overlay.suite-overlay-pause[data-card-lights] .pause-title-dust i:nth-child(3n){--dust-strength:.6;filter:blur(.6px);}
.suite-overlay-pause .pause-atmosphere{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;user-select:none;}
.suite-overlay.suite-overlay-pause[data-card-lights] .pause-motes{display:block;inset:0;opacity:1;}
.suite-overlay-pause .pause-motes i{width:calc(var(--dust-size)*1px);height:calc(var(--dust-size)*1px);background:#e1edf5;box-shadow:0 0 5px #d1e6f252;}
.suite-overlay.suite-overlay-pause[data-card-lights] .pause-motes i{animation-play-state:running;}
.suite-overlay-pause .pause-glint{position:absolute;display:block;width:var(--glint-size);height:var(--glint-size);color:#e5f1fa;background:currentColor;clip-path:polygon(50% 0,58% 42%,100% 50%,58% 58%,50% 100%,42% 58%,0 50%,42% 42%);opacity:0;animation:pause-silver-glint var(--glint-duration) ease-in-out var(--glint-delay) infinite both;}
.suite-overlay-pause[data-card-entry=entering] :is(.pause-motes i,.pause-title-dust i,.pause-glint){animation-play-state:paused!important;}
.suite-overlay-pause[data-lights-paused] :is(.pause-motes i,.pause-title-dust i,.pause-glint){animation-play-state:paused!important;}
@keyframes pause-silver-glint{0%,34%,100%{opacity:0;transform:translate3d(0,0,0) scale(.4)}12%{opacity:.65;transform:translate3d(1px,-2px,0) scale(1)}22%{opacity:.16;transform:translate3d(2px,-4px,0) scale(.7)}}
html.mobile-ui .suite-overlay-pause{--pause-left:var(--mobile-left);--pause-right:var(--mobile-right);--pause-top:calc(var(--mobile-top) + 64px);--pause-bottom:calc(var(--mobile-bottom) + 48px);--pause-gap:24px;}
html.mobile-ui[data-ui-orientation] .suite-overlay.suite-overlay-pause .pause-menu .pause-heading>h1{font-size:max(30px,calc(var(--mobile-px)*40));}
html.mobile-ui .suite-overlay-pause .pause-title-light{top:-10px;bottom:-6px;left:-14px;width:min(calc(100% + 28px),260px);}
html.mobile-ui[data-ui-orientation] .suite-overlay-pause .pause-list button{font-size:max(14px,calc(var(--mobile-px)*18));height:44px;min-height:44px;}
html.mobile-ui .suite-overlay-pause .pause-visual{left:-22px;width:200px;opacity:.12;}
html.mobile-ui .pause-title-dust{max-width:240px;}
html.mobile-ui .pause-title-dust i:nth-child(even),html.mobile-ui .pause-motes i:nth-child(even),html.mobile-ui .pause-glint:nth-of-type(n+4){display:none;}
@media (max-height:560px){
 .suite-overlay.suite-overlay-pause{--pause-top:calc(var(--mobile-top,0px) + 64px);--pause-bottom:calc(var(--mobile-bottom,0px) + 48px);--pause-gap:24px;}
}
@media (min-width:820px) and (max-height:560px){
 html .suite-overlay.suite-overlay-pause .pause-menu{width:min(880px,100%);display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);align-items:center;gap:0 var(--pause-gap);}
 .suite-overlay-pause .pause-menu>.pause-heading{grid-column:1;grid-row:1;}
 .suite-overlay-pause .pause-menu>.pause-list{grid-column:2;grid-row:1;}
 .suite-overlay-pause .pause-visual{top:calc(50% + 48px);width:240px;}
}
@media (prefers-reduced-motion:reduce){
 .suite-overlay-pause .pause-list button,.suite-overlay-pause .pause-arrow,.suite-overlay-pause .pause-label::after,.suite-overlay-pause .pause-list button::before{transition:none;}
 .suite-overlay-pause .pause-atmosphere{display:none;}
 .suite-overlay-pause .pause-emblem,.suite-overlay-pause .pause-emblem::before{animation:none;transform:none;}

}
/* PC 的紧凑排列不应套用手机卡片尺寸。卡片固定尺寸，通过轨道横向滚动适配。 */
html.pc-ui .suite-overlay .chapter-cell {
  flex: 0 0 240px;
  width: 240px;
}
html.pc-ui .suite-overlay .chapter-card {
  width: 240px;
  height: 135px;
  border-radius: 9px;
}
html.pc-ui .suite-overlay .chapter-card .card-label {
  font-size: 14px;
  inset: auto 14px 12px;
}
html.pc-ui .suite-overlay .chapter-strip {
  gap: 16px;
  padding-block: 12px;
}
html.pc-ui .suite-overlay .chapter-browser {
  top: 96px;
  bottom: 64px;
  gap: 20px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
html.pc-ui .suite-overlay .chapter-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: end;
  gap: 24px;
  flex: none;
  margin-block-start: auto;
}
html.pc-ui .suite-overlay .chapter-info {
  min-width: 0;
  max-width: none;
}
html.pc-ui .suite-overlay .chapter-info h2 {
  margin: 0 0 8px;
  font-size: 32px;
  white-space: nowrap;
}
html.pc-ui .suite-overlay .chapter-info .chapter-desc {
  font-size: 14px;
  line-height: 1.7;
}
html.pc-ui .suite-overlay .chapter-rail {
  flex: none;
}
html.pc-ui .suite-overlay .chapter-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: none;
  gap: 12px;
  width: auto;
  min-width: 0;
  max-width: 100%;
}
html.pc-ui .suite-overlay .chapter-actions > div {
  flex: 0 0 auto;
  max-width: 100%;
}
html.pc-ui .suite-overlay .chapter-actions .btn {
  width: auto;
  min-width: 144px;
  max-width: 100%;
  height: 44px;
  padding-inline: 20px;
  font-size: 14px;
  white-space: nowrap;
}
html.pc-ui .suite-overlay .chapter-actions .btn svg {
  font-size: 18px;
}
html.pc-ui.compact-ui .suite-overlay .chapter-browser {
  top: 88px;
  bottom: 48px;
}
html.pc-ui.compact-ui .suite-overlay .chapter-strip {
  padding-block: 12px;
}
html.pc-ui.compact-ui[data-ui-orientation='portrait'] .suite-overlay .chapter-summary {
  grid-template-columns: minmax(0, 1fr);
}
html.pc-ui.compact-ui[data-ui-orientation='portrait'] .suite-overlay .chapter-actions {
  justify-content: flex-start;
}

@media (max-width: 760px) {
  html.pc-ui .suite-overlay .chapter-summary {
    grid-template-columns: minmax(0, 1fr);
  }
  html.pc-ui .suite-overlay .chapter-actions {
    justify-content: flex-start;
  }
}

/* 结算页面以内容流容纳标题与操作；短窗口滚动，字号不随窗口缩放。 */
.pc-ui .suite-outcome {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(144px, 26dvh, 224px) var(--safe) 64px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pc-ui .suite-outcome .result-layout {
  position: relative;
  inset: auto;
  flex: none;
  width: min(460px, 100%);
  gap: 24px;
}
.pc-ui .suite-outcome .result-layout h1 {
  font-size: 48px;
}
.pc-ui .suite-outcome .result-layout.failure-layout h1 {
  font-size: 44px;
  white-space: normal;
}
.pc-ui .suite-outcome .result-emblem {
  top: -104px;
  width: 220px;
}
.pc-ui .suite-outcome .result-copy p,
.pc-ui .suite-outcome .suite-outcome-copy {
  font-size: 16px;
  line-height: 1.7;
}
.pc-ui .suite-outcome .result-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}
.pc-ui .suite-outcome .result-actions > div {
  flex: 0 1 176px;
  min-width: min(144px, 100%);
}
.pc-ui .suite-outcome .result-actions > .btn {
  flex: 0 1 176px;
}
.pc-ui .suite-outcome .result-actions .btn {
  width: auto;
  min-width: min(144px, 100%);
  min-height: 44px;
  height: auto;
  padding: 10px 20px;
  font-size: 14px;
}
.pc-ui .suite-outcome .gameover-layout {
  position: relative;
  inset: auto;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}
.pc-ui .suite-outcome .gameover-heading {
  position: relative;
  inset: auto;
  translate: none;
  max-width: 100%;
  gap: 16px;
}
.pc-ui .suite-outcome .gameover-heading h1 {
  font-size: 44px;
}
.pc-ui .suite-outcome .gameover-mark {
  top: 0;
  width: 240px;
  height: 240px;
  translate: -50% -38%;
}
.pc-ui .suite-outcome .suite-outcome-copy {
  position: static;
  translate: none;
  width: min(560px, 100%);
}
.pc-ui .suite-outcome .gameover-actions {
  position: static;
  translate: none;
}

/* 道具、角色和确认弹窗沿用相同的正文与按钮尺寸。 */
.pc-ui .suite-note-panel {
  inset: 96px var(--safe) 80px;
  max-width: 800px;
  margin-inline: auto;
  padding: 24px;
}
.pc-ui .suite-note-panel h3 {
  margin-bottom: 16px;
  padding-right: 32px;
  font-size: 20px;
}
.pc-ui .suite-note-panel p {
  font-size: 14px;
  line-height: 1.8;
}
.pc-ui .suite-note-panel .note-close {
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  font-size: 22px;
}
.pc-ui .suite-note-panel .suite-inventory {
  flex-wrap: wrap;
  gap: 16px;
}
.pc-ui .suite-note-panel .suite-item {
  width: 104px;
  height: 128px;
  gap: 12px;
  padding: 8px;
  font-size: 14px;
}
.pc-ui .suite-note-panel .suite-item > svg {
  font-size: 28px;
}
.pc-ui .suite-note-panel .suite-item > span {
  font-size: 14px;
}
.pc-ui .suite-note-panel .suite-item small {
  font-size: 12px;
}
.pc-ui .suite-note-panel .btn,
.pc-ui .modal .btn {
  min-height: 44px;
  height: auto;
  padding: 10px 20px;
  font-size: 14px;
}
.pc-ui .modal {
  max-height: calc(100dvh - 32px);
  padding: 64px var(--safe) 24px;
  overflow-y: auto;
}
.pc-ui .modal > .modal-caption {
  font-size: 16px;
}
.pc-ui .modal > p {
  max-width: 600px;
  margin-bottom: 24px;
  font-size: 16px;
}
.pc-ui .modal .modal-actions {
  gap: 12px;
}
.pc-ui .modal .modal-actions .btn {
  flex-basis: 160px;
}

/* 角色和道具共用居中卡片轨道、斜切轮廓及渐隐表面。 */
html .suite-frame .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-layout {
  inset: 96px 0 64px;
  display: block;
  width: auto;
  max-width: none;
  padding: 24px calc(var(--safe) + 16px);
  translate: none;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  scroll-padding-inline: calc(var(--safe) + 16px);
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .suite-affinity-track {
  display: flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  min-height: 100%;
  margin-inline: auto;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-cell {
  flex: 0 0 240px;
}
html .suite-frame .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-card {
  --affinity-heart-size: 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: auto;
  min-height: 336px;
  padding: 24px 20px;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-monogram {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 80px;
  font-size: 72px;
  font-weight: 300;
  color: #c9d3c847;
  transform: skewX(5.5deg);
  user-select: none;
}
html .suite-frame .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-card-info {
  position: relative;
  inset: auto;
  flex: none;
  gap: 16px;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-name {
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-primary,
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-stat,
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-stats {
  display: grid;
  gap: 10px;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-stats {
  gap: 16px;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-stats:empty {
  display: none;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-stat-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-stat-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-stat-heading dd {
  flex: none;
  margin: 0;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-value {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-value small {
  color: var(--quiet);
  font-size: 12px;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-progress {
  height: 2px;
  overflow: hidden;
  background: #d2dcd521;
}
.suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
}
html .suite-frame .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-hearts {
  gap: 6px;
}
html .suite-frame .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-heart {
  width: var(--affinity-heart-size);
  height: var(--affinity-heart-size);
}
.suite-frame .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-heart > svg {
  width: 100%;
  height: 100%;
}
.suite-frame .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-heart-fill svg {
  width: var(--affinity-heart-size);
  height: var(--affinity-heart-size);
  fill: currentColor;
  stroke: none;
}
.pc-ui.compact-ui .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-layout {
  top: 88px;
  bottom: 48px;
}
html.mobile-ui[data-ui-orientation] .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-layout {
  top: calc(var(--mobile-top) + 64px);
  bottom: calc(var(--mobile-bottom) + 40px);
  padding: 16px calc(var(--mobile-right) + 12px) 16px calc(var(--mobile-left) + 12px);
}
.mobile-ui .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .suite-affinity-track {
  gap: var(--mobile-space-3);
}
.mobile-ui .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-cell {
  flex-basis: calc(var(--mobile-px) * 165);
}
html.mobile-ui[data-ui-orientation] .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-card {
  --affinity-heart-size: calc(var(--mobile-px) * 18);
  min-height: calc(var(--mobile-px) * 400);
  padding: 20px 16px;
  gap: 20px;
}
.mobile-ui .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-monogram {
  min-height: calc(var(--mobile-px) * 80);
  font-size: calc(var(--mobile-px) * 72);
}
html.mobile-ui[data-ui-orientation] .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-name {
  font-size: max(14px, calc(var(--mobile-px) * 22));
}
.mobile-ui .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-stat-heading {
  font-size: max(12px, calc(var(--mobile-px) * 16));
}
@media (max-height: 500px) {
  html.mobile-ui[data-ui-orientation='landscape'] .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-card {
    min-height: calc(var(--mobile-px) * 224);
  }
  html.mobile-ui[data-ui-orientation='landscape'] .suite-overlay:is(.suite-overlay-affinity, .suite-overlay-inventory) .affinity-monogram {
    display: none;
  }
}

/* 角色卡保留原稿的竖向比例；可用高度变化时只收纳画面区域，字号不缩放。 */
.suite-overlay-affinity {
  --character-card-min: 336px;
  --character-card-max: 650px;
  --character-card-available: calc(100dvh - 208px);
  --character-art-reserve: 80px;
  --character-gap-reserve: 24px;
}
.pc-ui.compact-ui .suite-overlay-affinity {
  --character-card-available: calc(100dvh - 184px);
}
html[data-ui-orientation] .suite-frame .suite-overlay.suite-overlay-affinity .affinity-card {
  height: clamp(var(--character-card-min), var(--character-card-available), var(--character-card-max));
  min-height: 0;
}
html[data-ui-orientation] .suite-frame .suite-overlay.suite-overlay-affinity .affinity-card-info {
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(100% - var(--character-art-reserve) - var(--character-gap-reserve));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.suite-overlay-affinity .affinity-card-info:focus-visible {
  outline: 1px solid #ddd5be;
  outline-offset: 3px;
}
.mobile-ui .suite-overlay-affinity {
  --character-card-min: calc(var(--mobile-px) * 400);
  --character-card-max: calc(var(--mobile-px) * 450);
  --character-card-available: calc(var(--app-height, 100dvh) - var(--mobile-top) - var(--mobile-bottom) - 136px);
  --character-art-reserve: calc(var(--mobile-px) * 80);
  --character-gap-reserve: 20px;
}
@media (max-height: 560px) {
  .pc-ui .suite-overlay-affinity {
    --character-card-min: 216px;
    --character-art-reserve: 0px;
    --character-gap-reserve: 0px;
  }
  .pc-ui .suite-overlay-affinity .affinity-monogram { display: none; }
}
@media (max-height: 500px) {
  html.mobile-ui[data-ui-orientation=landscape] .suite-overlay-affinity {
    --character-card-min: calc(var(--mobile-px) * 224);
    --character-art-reserve: 0px;
    --character-gap-reserve: 0px;
  }
}

/* 道具配图铺在共用卡片表面内，沿用角色卡的渐隐与选中效果。 */
.suite-overlay-inventory .affinity-card-info { margin-top: auto; }
.suite-overlay-inventory .inventory-card-art > img {
  position: absolute;
  top: 0;
  left: -20px;
  display: block;
  /* 补足反斜切后的两侧边缘，让照片保持原比例而不露底。 */
  width: calc(100% + 40px);
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: skewX(5.5deg);
  transform-origin: center;
  pointer-events: none;
  user-select: none;
}
.inventory-card-art.is-empty { display: none; }
.suite-overlay-inventory .inventory-card-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 14px;
  line-height: 1.65;
  height: 4.95em;
  flex: none;
  color: var(--muted);
}
.suite-overlay-inventory .affinity-value {
  flex: none;
  white-space: nowrap;
}
.suite-overlay-inventory .page-footer .btn {
  min-height: 44px;
  height: auto;
  padding: 10px 20px;
  font-size: 14px;
}
.inventory-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  gap: 16px;
  text-align: center;
  color: var(--muted);
}
.inventory-empty > svg { font-size: 48px; }
.inventory-empty h2 { margin: 0; font-size: 20px; font-weight: 400; color: var(--text); }
.inventory-empty p { margin: 0; font-size: 14px; }
.inventory-detail-layout {
  position: absolute;
  inset: 96px var(--safe) 64px;
  display: grid;
  grid-template-columns: 200px minmax(0, 560px);
  justify-content: center;
  align-items: start;
  align-content: safe center;
  gap: 40px;
  padding: 24px 16px;
  overflow: auto;
  overscroll-behavior: contain;
}
.inventory-detail-art {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 0%, #000 66%, #000000c2 85%, #0000 100%);
  mask-image: linear-gradient(#000 0%, #000 66%, #000000c2 85%, #0000 100%);
}
.inventory-detail-art > img { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; }
.inventory-detail-layout.is-without-art .inventory-detail-art { display: none; }
html:is(.pc-ui,.mobile-ui) .suite-overlay-inventory-item .inventory-detail-layout.is-without-art { grid-template-columns: minmax(0, 560px); }
.inventory-detail-copy { min-width: 0; color: var(--muted); }
.inventory-detail-copy h2 { margin: 0 0 16px; font-size: 24px; line-height: 1.5; font-weight: 400; color: var(--text); overflow-wrap: anywhere; }
.inventory-detail-copy p { margin: 16px 0 0; font-size: 14px; line-height: 1.9; white-space: pre-line; overflow-wrap: anywhere; }
.inventory-detail-copy .inventory-detail-count { margin: 0 0 24px; }
.inventory-detail-count > span { margin-inline-start: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.mobile-ui .suite-overlay-inventory .inventory-card-description { font-size: 12px; }
.mobile-ui .suite-overlay-inventory .page-footer .btn { min-width: 96px; font-size: 12px; }
html.mobile-ui[data-ui-orientation] .inventory-detail-layout { inset: calc(var(--mobile-top) + 64px) var(--mobile-right) calc(var(--mobile-bottom) + 40px) var(--mobile-left); grid-template-columns: 112px minmax(0, 1fr); padding: 16px 12px; gap: 24px; }
.mobile-ui .inventory-detail-copy h2 { font-size: 20px; }
.mobile-ui .inventory-detail-copy p { font-size: 13px; }
@media (max-width: 639px) {
  .pc-ui .inventory-detail-layout { grid-template-columns: minmax(0, 560px); gap: 24px; }
  .pc-ui .inventory-detail-art { width: 200px; justify-self: center; }
}
html.mobile-ui[data-ui-orientation=portrait] .inventory-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
html.mobile-ui[data-ui-orientation=portrait] .inventory-detail-art { width: 160px; justify-self: center; }
@media (max-height: 500px) {
  html.mobile-ui[data-ui-orientation=landscape] .suite-overlay-inventory .inventory-card { padding: 16px; gap: 12px; }
  html.mobile-ui[data-ui-orientation=landscape] .suite-overlay-inventory .inventory-card-description { display: none; }
}

/* 原版卡片光感和三层尘光：只让当前浏览卡片运行，留白容纳外溢，不缩放卡片。 */
.suite-overlay[data-card-lights]{--card-glow:calc(var(--p)*48);--card-fx-pad:calc(var(--p)*48);}
html.pc-ui .suite-overlay[data-card-lights]{--card-glow:clamp(12px,calc((100cqw - 240px)/2 - 8px),48px);}
html.pc-ui .suite-overlay[data-card-lights] .chapter-strip{padding-block:var(--card-fx-pad);padding-inline:max(var(--safe),var(--card-glow));scroll-padding-inline:max(var(--safe),var(--card-glow));}
html.mobile-ui[data-ui-orientation] .suite-overlay[data-card-lights] .chapter-rail .chapter-strip{padding-block:var(--card-fx-pad);padding-left:max(var(--mobile-left),var(--card-fx-pad));padding-right:max(var(--mobile-right),var(--card-fx-pad));scroll-padding-inline:var(--card-fx-pad);}
.suite-overlay[data-card-lights] :is(.chapter-card,.tree-node).is-selected:not([data-card-light]){box-shadow:none;}
.suite-overlay[data-card-lights] :is(.chapter-card,.tree-node).is-selected:not([data-card-light])::before{opacity:0;}
.suite-overlay[data-card-lights] .tree-node{--card-glow:calc(var(--p)*48);}
.suite-overlay[data-card-lights] :is(.chapter-card,.tree-node)[data-card-light]{border-color:#f6efd5;box-shadow:0 0 0 1px #eee6cb5c,0 0 calc(var(--card-glow)*.458333) #e7f0d23d,0 0 var(--card-glow) #bedce526;}
.suite-overlay[data-card-lights] :is(.chapter-card,.tree-node)[data-card-light]::before{opacity:1;}
.suite-overlay[data-card-lights] :is(.chapter-card,.tree-node)[data-card-light] img{opacity:.98;filter:saturate(.94);}
.suite-overlay[data-card-lights] .node-dust{opacity:0;}
.suite-overlay[data-card-lights] .node-dust i{animation-play-state:paused;will-change:auto;}
.suite-overlay[data-card-lights] [data-card-light]+.node-dust{opacity:1;}
.suite-overlay[data-card-lights] [data-card-light]+.node-dust i{animation-play-state:running;will-change:transform,opacity;}
.suite-overlay[data-card-lights] .affinity-card[data-card-light] .affinity-surface{border-color:#f3efdcba;box-shadow:inset 0 0 0 1px #eee6cb26,inset 0 0 calc(var(--p)*24) #cde1d71a;}
.suite-overlay[data-card-lights] .affinity-card[data-card-light] .affinity-surface::before{opacity:1;}
.suite-overlay[data-card-lights] .affinity-card[data-card-light] .affinity-name{color:#f0f0e6;}
.suite-overlay[data-card-lights] .affinity-card[data-card-light] .affinity-heart-fill{opacity:1;color:#f0f0e3;}
.suite-overlay[data-card-lights] .affinity-card[data-card-light] .affinity-art img{filter:saturate(.92) brightness(.98);}
.suite-overlay[data-card-lights] .affinity-card-info:focus-visible{outline:none;}
.suite-overlay[data-card-lights] .affinity-fragments i{animation-play-state:paused;}
.suite-overlay[data-card-lights] .affinity-glint{animation:none;opacity:0;}
.suite-overlay[data-card-lights] [data-card-light] .affinity-fragments{opacity:1;}
.suite-overlay[data-card-lights] [data-card-light] .affinity-fragments i{animation-play-state:running;}
.suite-overlay[data-card-lights] [data-card-light] .affinity-glint{animation:affinity-corner-glint 6.6s ease-in-out infinite;}
.suite-frame .suite-overlay .affinity-wireframe{position:absolute;inset:0;width:100%;height:100%;}
/* 角色与道具页共用低亮度氛围层，让卡片成为视觉中心。 */
.suite-overlay:is(.suite-overlay-affinity,.suite-overlay-inventory)>.affinity-atmosphere{opacity:.32;}
.suite-overlay[data-card-entry=entering] [data-card-light]+.node-dust i{animation-play-state:paused;will-change:auto;}
.suite-overlay[data-lights-paused] :is(.node-dust i,.affinity-fragments i,.affinity-glint,.affinity-ambient,.affinity-rays,.affinity-orb){animation-play-state:paused!important;will-change:auto;}
/* 等量扩展滚动容器和内边距，卡片高度及内容区位置保持不变。 */
html .suite-frame .suite-overlay[data-card-lights]:is(.suite-overlay-affinity,.suite-overlay-inventory) .affinity-layout{--card-fx-pad:max(24px,calc(var(--p)*48));--card-fx-extra:calc(var(--card-fx-pad) - 24px);top:calc(96px - var(--card-fx-extra));bottom:calc(64px - var(--card-fx-extra));padding:var(--card-fx-pad) max(calc(var(--safe) + 16px),var(--card-fx-pad));}
html.pc-ui.compact-ui .suite-frame .suite-overlay[data-card-lights]:is(.suite-overlay-affinity,.suite-overlay-inventory) .affinity-layout{top:calc(88px - var(--card-fx-extra));bottom:calc(48px - var(--card-fx-extra));}
html.mobile-ui[data-ui-orientation] .suite-frame .suite-overlay[data-card-lights]:is(.suite-overlay-affinity,.suite-overlay-inventory) .affinity-layout{--card-fx-pad:max(16px,calc(var(--p)*48));--card-fx-extra:calc(var(--card-fx-pad) - 16px);top:calc(var(--mobile-top) + 64px - var(--card-fx-extra));bottom:calc(var(--mobile-bottom) + 40px - var(--card-fx-extra));padding:var(--card-fx-pad) max(calc(var(--mobile-right) + 12px),var(--card-fx-pad)) var(--card-fx-pad) max(calc(var(--mobile-left) + 12px),var(--card-fx-pad));}
.game-frame:has(>.suite-overlay) .suite-player .suite-dust-field i{animation-play-state:paused;}
@media(prefers-reduced-motion:reduce){
 .suite-overlay[data-card-lights] :is(.chapter-card,.tree-node,.node-dust,.affinity-surface,.affinity-name,.affinity-heart-fill),.suite-overlay[data-card-lights] .affinity-surface::before{transition:none;}
 .suite-overlay[data-card-lights] .node-dust{display:none;}
 .suite-overlay[data-card-lights] :is(.affinity-ambient,.affinity-rays,.affinity-orb,.affinity-fragments i){animation:none;}
 .suite-overlay[data-card-lights] [data-card-light] .affinity-glint{animation:none;opacity:.72;}
}
/* feel.css */
/*
 * 游戏化的动效与反馈层。
 * 版式和配色仍是设计稿的：结局三页、启动页、限时选项都取自设计稿主界面里对应的页面（样式在 style.css），
 * 这里只补把它们接进播放页所需的定位，以及判定闪光、片段衔接、集数标题卡等过渡。
 * 所有动效在系统开启"减少动态效果"时关闭（见文件末尾）。
 */

/* —— 启动页与视频缓冲共用一个小转圈，加载文案仅供读屏。 —— */
.suite-splash {
  z-index: 40;
  background: #060b0e99;
  transition: opacity 0.5s var(--soft);
}
.suite-splash.is-leaving {
  opacity: 0;
  pointer-events: none;
}
.suite-splash > .suite-loading-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  background: none;
  animation: none;
}
.suite-frame:has(.suite-splash:not(.is-leaving)) .suite-background > img {
  filter: blur(14px) brightness(0.62);
}
@keyframes feel-rise {
  from {
    opacity: 0;
    transform: translate3d(0, calc(var(--p) * 10), 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— 结局画面：盖在最后一帧上。明暗渐变取自设计稿三页各自的 scene-shade —— */
.suite-outcome {
  z-index: 12;
  animation: feel-fade 0.5s var(--soft) both;
}
.suite-outcome-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.suite-outcome-result .suite-outcome-shade {
  background:
    linear-gradient(90deg, #070a0b10 0%, #090d1047 38%, #090c10d9 68%, #080b0ee8 100%),
    linear-gradient(0deg, #080c10ae, transparent 48%, #080b0d20);
}
.suite-outcome-failure .suite-outcome-shade {
  background:
    linear-gradient(90deg, #07090c24 0%, #0b10114d 36%, #0c0d13e0 68%, #100c0ded 100%),
    linear-gradient(0deg, #090a0de0, transparent 60%, #080a0c47);
}
.suite-outcome-gameover .suite-outcome-shade {
  background:
    radial-gradient(ellipse at 50% 47%, #102a2f24 0%, #06171975 45%, #03090de0 100%),
    linear-gradient(0deg, #020608e8, transparent 45%, #02080980);
}
.suite-player[data-outcome='gameover'] .suite-media {
  filter: blur(calc(var(--p) * 18)) brightness(0.65) saturate(0.6);
  transform: scale(1.06);
  transition: filter 0.65s var(--soft);
}
/* 结局出现后收起播放控件；顶栏保留（返回、选集、剧情树、声音）且不再自动隐藏 */
.suite-player[data-outcome] :is(.suite-stage-controls, .suite-status, .suite-subtitle, .suite-timer, .suite-play-heading, .suite-dust-field, .suite-spatial-plane) {
  display: none;
}
.suite-player[data-outcome] .suite-top[data-controls-visibility] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
/*
 * 真实文案比设计稿里的长，各语言长短也不一样，按钮要跟着文案自适应：
 * 一行放得下时，同组按钮按最长的那条等宽；超过可用宽度才折行，折行时按钮跟着增高，文字不会顶出胶囊。
 */
.suite-outcome .result-actions {
  width: max-content;
  max-width: 100%;
  align-items: stretch;
}
.suite-outcome .result-actions > div {
  display: flex;
}
.suite-outcome .result-actions .btn {
  flex: 1 1 auto;
  width: auto;
  height: auto;
  min-height: calc(var(--p) * 52);
  padding-block: calc(var(--p) * 10);
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}
.mobile-ui .suite-outcome .result-actions .btn {
  min-height: calc(var(--mobile-px) * 44);
  padding-block: calc(var(--mobile-px) * 8);
}
.suite-outcome .gameover-actions {
  max-width: min(86%, calc(var(--p) * 900));
}
/* 全剧终：比设计稿多一行结局描述 */
.suite-outcome-copy {
  position: absolute;
  left: 50%;
  top: 60%;
  z-index: 3;
  translate: -50% 0;
  width: min(72%, calc(var(--p) * 900));
  margin: 0;
  font-size: calc(var(--p) * 18);
  line-height: 1.9;
  letter-spacing: 0.08em;
  color: #b6c2b9;
}
.mobile-ui .suite-outcome-copy {
  font-size: max(12px, calc(var(--mobile-px) * 14));
  line-height: 1.7;
}
@keyframes feel-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* —— 选项：普通选择不加分隔装饰，限时进度放在按钮下方 —— */
.suite-choice-rule {
  display: none;
}
.suite-choice-rule::before {
  content: none;
}
.suite-choice-time {
  display: none;
}
.suite-choices.is-timed .suite-choice-rule {
  display: block;
  order: 1;
  flex: none;
  width: min(100%, 320px);
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: #e1e8da24;
}
.suite-choices.is-timed .suite-choice-time {
  position: absolute;
  inset: 0;
  display: block;
  transform: scaleX(var(--countdown, 1));
  transform-origin: left;
  background: var(--accent);
  transition: background 0.4s var(--soft);
}
/* 最后三秒：计时线转暖并呼吸，和顶部计时器的告急色一致 */
.suite-choices.is-urgent .suite-choice-time {
  background: #dbaea3;
  animation: feel-urgent 0.9s ease-in-out infinite;
}
/* 限时选择的进度条代替顶部数字计时器。 */
.suite-player.has-choices .suite-timer {
  display: none !important;
}
/* 选项直接叠在清晰画面上，用轻薄底色保证文字可读，不模糊视频。 */
.suite-question {
  text-shadow: 0 1px 3px #000c;
}
.suite-choice {
  background: #0c151a70;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  -webkit-tap-highlight-color: transparent;
}
.suite-choice:hover,
.suite-choice:focus-visible {
  background: #172329a8;
  box-shadow: none;
}
.suite-choice:not(:disabled):not([aria-disabled='true']):active {
  transform: translateY(0) scale(0.975);
  transition-duration: 0.08s;
}
.suite-choice:disabled {
  opacity: 1;
  cursor: default;
  transition:
    opacity 0.3s var(--soft),
    transform 0.4s var(--ease),
    background 0.3s var(--soft),
    border-color 0.26s var(--soft),
    box-shadow 0.4s var(--soft);
}
.suite-choice:disabled:not(.is-chosen) {
  opacity: 0.28;
  transform: translateY(calc(var(--p) * 3));
  box-shadow: none;
}
.suite-choice.is-chosen {
  color: #f1f0df;
  border-color: #f6efd5;
  background: #e3e9d826;
  box-shadow: 0 0 0 1px #eee6cb5c;
  transform: none;
  animation: feel-chosen 0.5s var(--ease) both;
}
@keyframes feel-urgent {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}
@keyframes feel-chosen {
  0% {
    scale: 0.97;
  }
  45% {
    scale: 1.035;
  }
  100% {
    scale: 1;
  }
}

/* —— 玩法判定：成功一圈暖光，失败红色压边加短促晃动 —— */
.feel-flash {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  animation: feel-flash 0.8s ease-out both;
}
.feel-flash.is-success {
  background: radial-gradient(ellipse at 50% 55%, #e9dcb630, transparent 64%);
  box-shadow: inset 0 0 calc(var(--p) * 140) #d8c7a547;
}
.feel-flash.is-failure {
  box-shadow: inset 0 0 calc(var(--p) * 180) #b4463a8c;
  animation-duration: 1s;
}
.suite-player.feel-shake .suite-media {
  animation: feel-shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes feel-flash {
  0% {
    opacity: 0;
  }
  16% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes feel-shake {
  10%,
  90% {
    translate: calc(var(--p) * -3) 0;
  }
  20%,
  80% {
    translate: calc(var(--p) * 5) 0;
  }
  30%,
  50%,
  70% {
    translate: calc(var(--p) * -9) 0;
  }
  40%,
  60% {
    translate: calc(var(--p) * 9) 0;
  }
}

/* —— 片段衔接：新视频出首帧前垫着上一段的最后一帧 —— */
.suite-media > canvas.feel-hold {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— 按压手感：顶栏和控制条的按钮按下时轻微收缩 —— */
.suite-top :is(.subtle-btn, .icon-btn, .back-btn),
.suite-stage-controls :is(.subtle-btn, button[data-suite='pause']) {
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.2s,
    transform 0.3s var(--ease);
}
.suite-top :is(.subtle-btn, .icon-btn, .back-btn):active,
.suite-stage-controls :is(.subtle-btn, button[data-suite='pause']):active {
  transform: scale(0.92);
  transition-duration: 0.08s;
}


/* —— QTE 圆环（点击 / 长按）：设计稿主界面 QTE 页的 .qte-widget，按钮本体仍是运行时的 .suite-orb —— */
.suite-qte .qte-ring .suite-orb.qte-key {
  position: absolute;
  inset: calc(var(--p) * 23);
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  border: 1px solid #d6dfd075;
  background: #11202aa6;
  box-shadow: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  font-size: calc(var(--p) * 42);
  font-weight: 450;
  color: #e8edde;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.2s,
    border-color 0.3s,
    box-shadow 0.4s var(--soft),
    transform 0.25s var(--ease);
}
.suite-qte .suite-orb::before {
  display: none;
}
.suite-qte .qte-key.is-held {
  background: #304237bd;
  transform: scale(0.96);
}
.suite-qte-mark {
  display: grid;
  place-items: center;
  line-height: 1;
}
/* 设计稿的 .qte-ring svg 规则是给外圈用的，按钮里的图标和长按进度圈要恢复各自的尺寸 */
.suite-qte .qte-key .suite-qte-mark > svg {
  position: static;
  width: 1em;
  height: 1em;
  transform: none;
  stroke-width: 1.4;
  font-size: calc(var(--p) * 40);
}
.suite-qte .qte-key .suite-hold-progress {
  position: absolute;
  inset: calc(var(--p) * -9);
  width: calc(100% + var(--p) * 18);
  height: calc(100% + var(--p) * 18);
  transform: none;
  rotate: -90deg;
  stroke-width: 1.5;
  pointer-events: none;
}
.suite-qte .qte-key .suite-hold-progress circle {
  stroke: #ddcfaf;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}
/* 外圈 = 剩余时间（周长 352）；没有时限的玩法保持满圈。最后三秒转暖色 */
.suite-qte .suite-qte-time {
  stroke-dashoffset: calc(352 * (1 - var(--time-left, 1)));
  transition:
    stroke-dashoffset 0.12s linear,
    stroke 0.4s var(--soft);
}
.suite-player:has(.suite-timer.is-urgent) .suite-qte-time {
  stroke: #dbaea3;
}
.suite-player:has(.suite-qte) .suite-timer {
  display: none !important;
}
.suite-player[data-feedback='success'] .suite-qte .qte-key {
  border-color: #f6efd5;
  background: #e3e9d826;
  box-shadow:
    0 0 0 1px #eee6cb5c,
    0 0 calc(var(--p) * 22) #e7f0d23d,
    0 0 calc(var(--p) * 48) #bedce526;
  animation: feel-chosen 0.5s var(--ease) both;
}
.suite-player[data-feedback='failure'] .suite-qte .qte-key {
  border-color: #d5a294;
  color: #d5a294;
}
.mobile-ui .suite-qte .qte-ring .suite-orb.qte-key {
  inset: calc(var(--mobile-px) * 16);
  font-size: max(11px, calc(var(--mobile-px) * 30));
}
html.mobile-ui[data-ui-orientation='portrait'] .suite-qte .qte-ring .suite-orb.qte-key {
  inset: calc(var(--mobile-px) * 21);
  font-size: max(11px, calc(var(--mobile-px) * 38));
}
.mobile-ui .suite-qte .qte-key .suite-qte-mark > svg {
  font-size: max(11px, calc(var(--mobile-px) * 30));
}
.mobile-ui .suite-qte .qte-key .suite-hold-progress {
  inset: calc(var(--mobile-px) * -7);
  width: calc(100% + var(--mobile-px) * 14);
  height: calc(100% + var(--mobile-px) * 14);
}

/* —— 静音开播的提示：浏览器不许有声自动播放时出现，点任意位置恢复声音后消失 —— */
.feel-sound-hint {
  position: absolute;
  left: 50%;
  top: calc(var(--p) * 112);
  z-index: 6;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: calc(var(--p) * 10);
  padding: calc(var(--p) * 11) calc(var(--p) * 22);
  border: 1px solid #e1e7db59;
  border-radius: 999px;
  background: #0c151ab8;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: calc(var(--p) * 17);
  letter-spacing: 0.08em;
  color: #e9ede3;
  white-space: nowrap;
  pointer-events: none;
  animation:
    feel-rise 0.5s var(--ease) both,
    feel-hint-breathe 2.4s 0.6s ease-in-out infinite;
}
.feel-sound-hint svg {
  font-size: calc(var(--p) * 19);
  color: var(--accent);
}
.mobile-ui .feel-sound-hint {
  top: calc(var(--mobile-top) + 60px);
  padding: 8px 16px;
  gap: 8px;
  font-size: max(12px, calc(var(--mobile-px) * 14));
}
.mobile-ui .feel-sound-hint svg {
  font-size: max(14px, calc(var(--mobile-px) * 16));
}
@keyframes feel-hint-breathe {
  0%,
  100% {
    border-color: #e1e7db59;
  }
  50% {
    border-color: #d8c7a5c9;
  }
}

/* —— 加载转圈：PC 固定 28px，手机 24px，不随视频画布缩放。 —— */
.feel-loading-ring {
  display: block;
  flex: none;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  border: 2px solid #eef1f333;
  border-top-color: #eef1f3;
  border-right-color: #eef1f380;
  border-radius: 50%;
  background: none;
  filter: drop-shadow(0 1px 2px #0009);
  animation: feel-loading-turn .8s linear infinite;
}
.feel-buffering {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  translate: -50% -50%;
  display: none;
  padding: 0;
  pointer-events: none;
}
.suite-player.is-buffering .feel-buffering {
  display: block;
  animation: feel-fade .3s var(--soft) both;
}
.suite-frame:has(.suite-splash) .feel-buffering {
  display: none;
}
.mobile-ui .feel-loading-ring {
  width: 24px;
  height: 24px;
}
@keyframes feel-loading-turn {
  to { transform: rotate(360deg); }
}
.suite-player[data-outcome] .feel-buffering {
  display: none;
}

/* —— 视频加载失败：重试 / 跳过 —— */
.feel-media-error {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 11;
  translate: -50% -50%;
  display: grid;
  justify-items: center;
  gap: 20px;
  width: 440px;
  max-width: calc(100% - var(--safe) * 2);
  max-height: calc(100% - 144px);
  padding: 24px 28px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d1dec726;
  border-radius: calc(var(--p) * 16);
  background: #101a1fe0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  animation: feel-fade 0.3s var(--soft) both;
}
.feel-media-error p {
  margin: 0;
  font-size: 16px;
  overflow-wrap: anywhere;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: #dfe5da;
}
.feel-media-error > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}
.feel-media-error .btn {
  flex: 0 1 148px;
  min-width: min(132px, 100%);
  height: auto;
  min-height: 44px;
  padding: 10px 20px;
  font-size: 16px;
  white-space: normal;
  overflow-wrap: anywhere;
  border-radius: 999px;
}
.mobile-ui .feel-media-error {
  max-width: calc(100% - var(--mobile-left) - var(--mobile-right));
  max-height: calc(100% - var(--mobile-top) - var(--mobile-bottom) - 128px);
  padding: 20px 22px;
  gap: 16px;
  border-radius: 14px;
}
.mobile-ui .feel-media-error p {
  font-size: 14px;
}
.mobile-ui .feel-media-error .btn {
  flex-basis: 112px;
  min-width: min(104px, 100%);
  padding-inline: 16px;
  min-height: 44px;
  font-size: 14px;
}

/* 错误提示继续使用共用玻璃胶囊，只压低描边呼吸的高光。 */
.feel-media-error .btn.btn-glass {
  --glass-light-min: .06;
  --glass-light-max: .22;
  animation: none;
  box-shadow: inset 0 1px 5px #ffffff21, inset 0 -1px 5px #ffffff19;
}
.feel-media-error .btn.btn-glass:is(:hover, :focus-visible) {
  --glass-light-min: .14;
  --glass-light-max: .34;
  box-shadow: 0 0 8px #e7e7c11f, inset 0 0 6px #ffffff19;
}

/* —— 加载失败页：说明、重试按钮、排查地址上下排列 —— */
.suite-load-failed {
  flex-direction: column;
  gap: calc(var(--p) * 20);
  padding: 0 var(--safe);
  text-align: center;
}
.suite-load-failed p {
  margin: 0;
}
.suite-load-failed .btn {
  flex: none;
  min-width: calc(var(--p) * 150);
  border-radius: 999px;
}
.mobile-ui .suite-load-failed .btn {
  min-width: 120px;
  min-height: 44px;
}

/* —— 手机上去掉视频的边缘渐隐 ——
   设计稿给视频上下各 1% 做了渐隐遮罩，肉眼几乎看不出，但带遮罩的视频每一帧都要多过一遍合成，
   手机上解 1080p 时这是纯开销。桌面保留原样。（影响没有在真机上量过。） */
.mobile-ui .suite-media video {
  -webkit-mask-image: none;
  mask-image: none;
}

@media (prefers-reduced-motion: reduce) {
  .feel-sound-hint,
  .feel-buffering,
  .feel-buffering *,
  .feel-media-error,
  .suite-splash,
  .suite-splash *,
  .suite-outcome,
  .feel-flash {
    animation: none !important;
    transition: none !important;
  }
  .feel-flash {
    display: none;
  }
}
/* interactive-layout.css */
/* 外围控件使用各设备的尺寸规范；只有棋盘、画布随可用空间等比缩放。 */
.pc-ui .suite-player:not(.has-spatial) .suite-spatial-plane{inset:0;width:100%;height:100%;}
.pc-ui .suite-player:not(.has-spatial):not(.has-choices) .suite-playbody{inset:112px var(--safe) 144px;overflow:auto;overscroll-behavior:contain;place-items:safe center;}
.pc-ui.compact-ui .suite-player:not(.has-spatial):not(.has-choices) .suite-playbody{bottom:160px;}
.pc-ui .suite-player:not(.has-spatial):not(.has-choices) .suite-playbody:has(>.suite-choices){inset:0;overflow:visible;}
.pc-ui .suite-player.has-spatial .suite-media>:is(video,img){object-fit:contain;}
.pc-ui .suite-play-heading{top:80px;}
.pc-ui .suite-operation{gap:16px;}
.pc-ui .suite-operation-label{font-size:14px;line-height:1.5;text-align:center;}
.pc-ui .suite-gesture-zone{width:min(700px,100%);height:min(340px,100%);min-height:180px;gap:16px;}
.pc-ui .suite-balance{width:min(750px,100%);gap:24px;}
.pc-ui .suite-mini-actions{gap:16px;flex-wrap:wrap;font-size:14px;}
.pc-ui .suite-mini-actions button{min-width:44px;min-height:44px;}
.pc-ui .suite-playbody .btn{min-height:44px;min-width:120px;height:auto;padding:10px 20px;font-size:14px;}
.pc-ui .suite-paper{margin-bottom:56px;}
.pc-ui .suite-paper .suite-mini-actions{position:absolute;top:calc(100% + 6px);left:50%;translate:-50% 0;width:max-content;max-width:calc(100vw - 32px);flex-wrap:nowrap;white-space:nowrap;}
.pc-ui .suite-voice{width:min(480px,100%);gap:16px;padding-block:4px;}
.pc-ui .suite-voice-quote{font-size:20px;line-height:1.5;margin:0;text-align:center;}
.pc-ui .suite-voice input{width:min(430px,100%);height:44px;font-size:16px;}
.pc-ui .suite-craft{width:min(640px,100%);gap:20px;padding-block:4px;}
.pc-ui .suite-craft-slots{gap:12px;max-width:100%;}
.pc-ui .suite-craft-slot{width:80px;height:80px;flex-shrink:1;min-width:44px;}
.pc-ui .suite-craft-slot>svg{font-size:28px;}
.pc-ui .suite-craft-plus{font-size:18px;}
.pc-ui .suite-craft .suite-inventory{max-width:100%;flex-wrap:wrap;gap:12px;}
.pc-ui .suite-craft .suite-item{width:104px;height:112px;gap:12px;}
.pc-ui .suite-craft .suite-item>svg{font-size:28px;}
.pc-ui .suite-craft .suite-item>span{font-size:14px;}
.pc-ui .suite-dials{gap:16px;max-width:100%;}
.pc-ui .suite-dial{width:76px;min-width:44px;gap:6px;}
.pc-ui .suite-dial button{min-height:44px;font-size:20px;}
.pc-ui .suite-dial output{width:100%;height:80px;font-size:36px;}
.pc-ui .suite-calendar{width:min(640px,100%);max-height:100%;padding:20px;overflow:auto;overscroll-behavior:contain;}
.pc-ui .suite-calendar-head{font-size:20px;margin-bottom:16px;}
.pc-ui .suite-calendar-grid{grid-template-columns:repeat(7,minmax(44px,1fr));gap:4px;}
.pc-ui .suite-calendar-grid>span{height:24px;font-size:12px;}
.pc-ui .suite-calendar-day{height:44px;min-height:44px;font-size:16px;}
.pc-ui .suite-hotspot{min-width:44px;min-height:44px;}
.pc-ui .suite-hotspot .hotspot-label{font-size:12px;pointer-events:none;}
.pc-ui .suite-direction{min-width:0;min-height:44px;padding:10px 14px;gap:8px;font-size:16px;max-width:calc(50% - 8px);}
.pc-ui .suite-direction>svg{font-size:18px;flex:none;}
.pc-ui .suite-side-tools{position:fixed;top:112px;right:var(--safe);bottom:160px;max-width:calc(100vw - var(--safe)*2);display:flex;flex-direction:column;align-items:stretch;gap:8px;overflow:auto;overscroll-behavior:contain;}
.pc-ui .suite-side-tools .btn{min-width:120px;min-height:44px;height:44px;font-size:14px;flex:none;}
.pc-ui .suite-layer-switch{padding:0;flex:none;}
.pc-ui .suite-layer-switch button{min-width:44px;height:44px;flex:1;font-size:14px;}
.suite-scene-list{display:none;flex:none;font-size:14px;}
.suite-scene-list summary{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:104px;padding:8px 12px;border:1px solid #dce8df40;border-radius:24px;background:#14252edb;cursor:pointer;list-style:none;}
.suite-scene-list summary::-webkit-details-marker{display:none;}
.suite-scene-list>div{position:fixed;z-index:9;top:112px;bottom:144px;left:var(--safe);right:var(--safe);margin-left:auto;max-width:320px;padding:12px;overflow:auto;overscroll-behavior:contain;background:#102029f5;border:1px solid #dce8df40;border-radius:8px;}
.suite-scene-list>div button{display:block;min-width:44px;min-height:44px;width:100%;padding:10px;text-align:left;font:inherit;color:#dce8df;border-bottom:1px solid #dce8df26;}
.suite-scene-list summary:focus-visible{outline:1px solid #ddd5be;outline-offset:2px;}
.mobile-ui .suite-scene-list{font-size:12px;}
.mobile-ui .suite-scene-list>div{top:calc(var(--mobile-top) + 56px);bottom:calc(var(--mobile-bottom) + 104px);left:var(--mobile-left);right:var(--mobile-right);}
html.mobile-ui .game-frame[data-content-orientation=portrait] .suite-scene-list{display:block;}
.pc-ui .suite-player.has-spatial .suite-playbody .suite-use-items{position:fixed;left:var(--safe);right:var(--safe);top:auto;bottom:160px;translate:none;max-height:calc(100dvh - 272px);overflow:auto;}
.pc-ui .suite-use-items .suite-inventory{flex-wrap:wrap;gap:12px;}
.pc-ui .suite-playbody.is-spatial .suite-use-items .suite-item{width:104px;height:112px;gap:12px;}
.pc-ui .suite-playbody.is-spatial .suite-use-items .suite-item>span{font-size:14px;}
.pc-ui .suite-webgame{inset:0;overflow:auto;}
.pc-ui .suite-web-intro{padding:20px;gap:16px;min-height:100%;}
.pc-ui .suite-web-intro h3{font-size:20px;line-height:1.5;}
.pc-ui .suite-web-intro p{font-size:14px;}

/* 引擎预览：说明、画布、操作、提示各占自己的行，操作不再悬在画布外。 */
html:is(.pc-ui,.mobile-ui) .suite-native{min-width:0;min-height:240px;max-width:100%;}
html:is(.pc-ui,.mobile-ui) .suite-native-stage{display:flex;flex-direction:column;gap:8px;width:100%;height:100%;min-width:0;min-height:240px;max-width:1120px;max-height:760px;}
html:is(.pc-ui,.mobile-ui) .suite-native-stage :is(.suite-native-title,.suite-native-notice,.suite-native-hud){position:static;flex:none;line-height:1.5;text-align:center;width:100%;}
.pc-ui .suite-native-title{font-size:16px;}
.pc-ui .suite-native-notice{font-size:13px;}
html:is(.pc-ui,.mobile-ui) .suite-native-hud:empty{display:none;}
html:is(.pc-ui,.mobile-ui) .suite-native-stage .suite-native-preview{position:relative;inset:auto;flex:1;min-width:0;min-height:0;width:100%;display:flex;flex-direction:column;gap:8px;}
html:is(.pc-ui,.mobile-ui) .suite-native-surface{position:relative;flex:1;min-width:0;min-height:40px;width:100%;display:grid;place-items:center;}
html:is(.pc-ui,.mobile-ui) .suite-native-surface:has(.suite-tiles){overflow:hidden;place-items:safe center;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls{position:relative;flex:none;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;width:100%;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls:empty{display:none;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls :is(.suite-number-pad,.suite-shot-power,.suite-tile-slot,.mobile-board-zoom){position:relative;inset:auto;translate:none;height:auto;display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;width:auto;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls .suite-number-pad{min-width:0;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls>.suite-number-pad{max-width:100%;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls .suite-number-pad{gap:4px;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls .suite-number-pad button{width:auto;min-width:44px;min-height:44px;height:44px;padding-inline:12px;}
.pc-ui .suite-native-controls .suite-number-pad button{font-size:16px;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls .suite-shot-power{min-width:0;font-size:14px;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls .suite-shot-power input{width:120px;height:44px;min-height:44px;writing-mode:horizontal-tb;direction:ltr;appearance:auto;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls .suite-shot-power .btn{min-width:80px;min-height:44px;height:44px;font-size:14px;}
html:is(.pc-ui,.mobile-ui) .suite-native-surface .mobile-board-viewport{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;display:grid;place-items:center;}
html:is(.pc-ui,.mobile-ui) .suite-native-surface .mobile-board-viewport.is-zoomed{display:flex;justify-content:flex-start;align-items:flex-start;}
html:is(.pc-ui,.mobile-ui) .suite-native-surface .mobile-board-viewport.is-zoomed>:first-child{flex:none;margin:0;align-self:flex-start;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls .mobile-board-zoom{min-height:44px;min-width:44px;padding:8px 12px;font-size:12px;color:#c7d3c4;background:#14262e9c;border:1px solid #dce8df38;border-radius:22px;}
.pc-ui .suite-native-controls .mobile-board-zoom{font-size:14px;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls .mobile-board-zoom svg{width:18px;height:18px;}
html:is(.pc-ui,.mobile-ui) .suite-native-controls .suite-tile-slot{min-height:44px;max-width:100%;}
html:is(.pc-ui,.mobile-ui) .suite-native-stage .suite-engine-mount{position:relative;inset:auto;flex:1;min-height:40px;width:100%;}
html:is(.pc-ui,.mobile-ui) .suite-native-surface .suite-tiles{width:min(670px,100%);height:auto;max-height:100%;padding:8px;display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,70px));align-content:start;gap:8px;overflow:auto;overscroll-behavior:contain;}
html:is(.pc-ui,.mobile-ui) .suite-tiles .suite-tile{width:auto;min-width:44px;height:56px;min-height:44px;font-size:28px;}
.suite-sudoku{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(6,minmax(0,1fr));}
.suite-sudoku button{padding:0;min-width:0;min-height:0;}
.pc-ui .suite-sudoku button{font-size:clamp(12px,calc(var(--p)*31),31px);}
.suite-frame .gameover-diamonds{width:100%;height:100%;}
html:is(.pc-ui,.mobile-ui) .suite-note-panel .suite-note-text select{min-height:44px;min-width:80px;max-width:100%;padding:4px 8px;}
.pc-ui .suite-note-panel .suite-note-text select{font-size:14px;}

/* 手机上保留原有字号和方向布局，补齐输入及紧邻按钮的实际触控空间。 */
.mobile-ui .suite-frame{min-height:0;}
.mobile-ui .suite-voice input{min-height:44px;}
.mobile-ui .suite-note-panel .note-close{width:44px;height:44px;}
.mobile-ui .suite-speed-wrap>.subtle-btn,.mobile-ui .suite-web-close{min-width:44px;min-height:44px;}
.mobile-ui .suite-calendar-grid{grid-template-columns:repeat(7,minmax(40px,1fr));}
.mobile-ui .suite-calendar-day{min-width:40px;min-height:40px;}
.mobile-ui .suite-layer-switch button{min-width:40px;min-height:40px;}
.mobile-ui .suite-direction.mobile-hit-control{position:absolute;min-width:0;max-width:calc(50% - 8px);white-space:normal;}
.mobile-ui .suite-playbody:not(.is-spatial){overflow:auto;overscroll-behavior:contain;place-items:safe center;}
.mobile-ui .suite-paper{margin-bottom:56px;translate:none;}
.mobile-ui .suite-paper .suite-mini-actions{font-size:11px;gap:8px;}
.mobile-ui .suite-paper .suite-mini-actions>span{white-space:normal;max-width:120px;}
html.mobile-ui[data-keyboard-open=true] .suite-frame[data-mode=tencent_voice] .suite-voice{align-items:center;}
html.mobile-ui[data-keyboard-open=true] .suite-frame[data-mode=tencent_voice] .suite-voice>.btn{width:min(240px,100%);min-height:44px;}
html.mobile-ui[data-ui-orientation] .suite-side-tools{position:fixed;left:var(--mobile-left);right:var(--mobile-right);top:auto;bottom:calc(var(--mobile-bottom) + var(--stage-bottom));translate:none;width:auto;display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;max-height:112px;overflow:auto;overscroll-behavior:contain;}
html.mobile-ui[data-ui-orientation] .suite-side-tools .btn{flex:none;}
html.mobile-ui[data-ui-orientation] .suite-side-tools .suite-operation-label{width:100%;}
@media(max-width:639px){
 .suite-scene-list{display:block;}
 .pc-ui .suite-side-tools{top:64px;bottom:auto;left:var(--safe);right:var(--safe);height:48px;max-height:none;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center;}
 .pc-ui .suite-side-tools .btn{min-width:104px;}
 .pc-ui .suite-side-tools .suite-operation-label{flex:none;}
 .pc-ui .suite-player:has(.suite-side-tools) .suite-play-heading{top:116px;}
}
html.mobile-ui[data-ui-orientation=landscape] .suite-player:has(.suite-side-tools) .suite-spatial-plane{right:calc(var(--mobile-right) + 152px);width:min(calc(100vw - var(--mobile-left) - var(--mobile-right) - 152px),calc(var(--stage-height) * var(--content-aspect)));height:min(var(--stage-height),calc((100vw - var(--mobile-left) - var(--mobile-right) - 152px) / var(--content-aspect)));}
html.mobile-ui[data-ui-orientation=landscape] .suite-player:has(.suite-side-tools) .suite-media{right:calc(var(--mobile-right) + 152px);}
html.mobile-ui[data-ui-orientation=landscape] .suite-side-tools{left:auto;right:var(--mobile-right);top:calc(var(--mobile-top) + var(--stage-top));bottom:calc(var(--mobile-bottom) + var(--stage-bottom));width:136px;max-height:none;flex-direction:column;flex-wrap:nowrap;justify-content:flex-start;align-items:stretch;}
/* 低矮手机横屏把操作放到画布右边，避免数字键只露出半排。 */
html.mobile-ui[data-ui-orientation=landscape] .suite-native,
html.mobile-ui[data-ui-orientation=landscape] .suite-native-stage{min-height:0;}
html.mobile-ui[data-ui-orientation=landscape] .suite-native-stage .suite-native-preview{flex-direction:row;align-items:stretch;gap:12px;}
html.mobile-ui[data-ui-orientation=landscape] .suite-native-surface{width:auto;}
html.mobile-ui[data-ui-orientation=landscape] .suite-native-controls{width:156px;flex:0 0 156px;flex-direction:column;justify-content:center;gap:4px;}
html.mobile-ui[data-ui-orientation=landscape] .suite-native-controls .suite-number-pad{display:grid;grid-template-columns:repeat(2,minmax(44px,1fr));gap:4px;width:100%;}
html.mobile-ui[data-ui-orientation=landscape] .suite-frame[data-mode=sudoku] .suite-native-controls .suite-number-pad{grid-template-columns:repeat(3,minmax(44px,1fr));}
html.mobile-ui[data-ui-orientation=landscape] .suite-native-controls .suite-shot-power{flex-direction:column;gap:4px;}
html.mobile-ui[data-ui-orientation=landscape] .suite-frame[data-mode=BasketballQTE] .suite-native-shoot{grid-column:1/3;grid-row:2;}
html.mobile-ui[data-ui-orientation=landscape] .suite-frame[data-mode=BasketballQTE] .suite-number-pad button:last-child{grid-column:2;grid-row:1;}
@media(max-height:560px){
 .pc-ui .suite-player:not(.has-spatial):not(.has-choices) .suite-playbody{inset-block:112px 144px;}
 .pc-ui .suite-voice{grid-template-columns:100px minmax(0,1fr);gap:12px 20px;}
 .pc-ui .suite-voice>.suite-operation{grid-column:1;grid-row:1/4;}
 .pc-ui .suite-voice>.suite-operation .suite-orb{width:88px;height:88px;}
 .pc-ui .suite-voice>:not(.suite-operation){grid-column:2;}
 .pc-ui .suite-balance{gap:12px;}
 .pc-ui .suite-balance .suite-orb{width:88px;height:88px;}
}
