:root{font-family:ui-rounded,"Trebuchet MS",system-ui,sans-serif;color:#fffbe4;background:#263e30;font-synthesis:none;--ink:#203124;--panel:#302e3ceF;--gold:#ffe175}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,select,input{font:inherit}button,select{color:inherit}button{cursor:pointer;border:2px solid #c7d3bc69;border-radius:12px;background:#6765748c;padding:10px 14px;font-weight:800;touch-action:manipulation}button:hover{background:#878493ad}button:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #ffdf63;outline-offset:3px}button:disabled{opacity:.4;cursor:default}button[aria-pressed=true]{background:#ffe16b;color:#243323;border-color:#fff5bd}select,input{border:1px solid #c7c6b77a;border-radius:8px;background:#292a34;padding:8px;max-width:100%;color:#fffbe4}select{min-height:44px}input{min-width:0}h1,h2,h3,p{margin:0}h1{font-size:23px}h2{font-size:17px}h3{font-size:14px}p{line-height:1.5}button,canvas{-webkit-tap-highlight-color:transparent}button small{display:block;font-size:9px;font-weight:600}[hidden]{display:none!important}.shell,.play-surface{position:relative;width:100%;height:100vh;height:100dvh;overflow:hidden}.game{position:absolute;inset:0}.game canvas{display:block;width:100%;height:100%;image-rendering:pixelated}.game-header{position:absolute;inset:14px 18px auto;display:flex;justify-content:space-between;align-items:flex-start;pointer-events:none;gap:8px}.brand{border:3px solid #5d3d29;border-radius:5px;background:linear-gradient(#ad7041,#77482d);box-shadow:0 3px 0 #382d26,inset 0 0 0 2px #daac6e;padding:10px 14px;text-align:center;transform:rotate(-1deg);color:#fff2ab;text-shadow:2px 2px #4e3229}.brand span{display:block;font-size:21px;font-weight:950;letter-spacing:1px}.brand small{font-size:9px;font-weight:800;letter-spacing:2px}.hud{display:flex;gap:10px;align-items:center}.hud>span:not(.live-dot){font-size:9px;font-weight:800;text-shadow:1px 1px 3px #112e1a;display:none}.live-dot{display:none}.hud strong{font-size:18px;padding:9px 17px;background:#29352be8;border:2px solid #ecf2d3b0;border-radius:24px;box-shadow:0 3px 0 #2d332666}.hud button{pointer-events:auto;font-family:system-ui;font-size:36px;line-height:1;width:60px;height:60px;background:#383342;border:3px solid #fff6dc;box-shadow:0 4px 0 #3d3c3b;padding:4px}.objective{position:absolute;top:90px;left:50%;transform:translateX(-50%);text-align:center;max-width:min(560px,80%);pointer-events:none}.objective>span{background:#213d2bd4;border:1px solid #eff7d047;box-shadow:0 2px 7px #16352226;border-radius:20px;font-size:11px;line-height:1.3;padding:6px 12px;display:inline-block}.live-strip{display:flex;gap:16px;justify-content:center;background:#263d30ed;border-radius:8px;font:11px monospace;padding:7px;margin-top:5px}.seat{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));width:calc((100% - 56px)/var(--count,2));z-index:3}.seat0{left:16px}.seat1{left:calc(16px + (100% - 24px)/var(--count,2))}.seat2{left:calc(16px + 2*(100% - 24px)/var(--count,2))}.seat3{left:calc(16px + 3*(100% - 24px)/var(--count,2))}.pad{position:relative;border:2px solid color-mix(in srgb,var(--crew),transparent 12%);border-radius:25px;background:#342f29aa;box-shadow:0 3px 0 #152d2d55,inset 0 0 0 1px #faf9d12b;padding:10px 9px 8px;backdrop-filter:blur(7px);max-width:330px;margin:auto}.pad-heading{display:flex;position:absolute;top:-17px;left:12px;align-items:center;gap:5px}.pad-heading h2{font-size:13px;background:var(--crew);color:#182719;border:2px solid #fffbe4;padding:3px 8px;border-radius:10px;box-shadow:0 2px 0 #192d22}.pad-heading h2 span{font-size:10px}.pad-force{font-size:10px;text-shadow:1px 1px #123e27;background:#24362bd9;border-radius:5px;padding:2px 5px}.move-row{display:flex;gap:5px;align-items:center;justify-content:center;margin-top:4px}.move-row button{font:900 26px/1 system-ui;width:44px;height:44px;min-width:0;padding:2px;background:linear-gradient(#d8dfd08f,#94aa8a76);border:2px solid #f4f9e5b8;border-radius:50%;box-shadow:inset 0 -3px 0 #2036273d,0 2px 0 #15302160;color:white;text-shadow:0 2px #667663;touch-action:none;user-select:none;-webkit-user-select:none}.move-row button[data-action=left],.move-row button[data-action=right]{border-radius:15px}.move-row button[data-action=grip]{font-size:25px}.move-row button.held,.move-row button[aria-pressed=true]{background:var(--crew);color:#203124;text-shadow:none}.pad-state{font-size:9px;text-align:center;line-height:1.25;color:#fcf9e6ba;height:12px;margin-top:5px}.force-controls{border-top:1px solid #ffffff38;margin-top:7px;padding-top:7px;display:grid;grid-template-columns:1fr auto;gap:5px;align-items:center}.mode-row{display:flex;gap:3px}.mode-row button{padding:5px 6px;font-size:10px;min-height:32px;border-radius:8px;border-width:1px}.effort{display:flex;align-items:center;gap:3px;font-size:10px}.effort button{min-width:27px;min-height:32px;padding:4px;font-size:15px;border-radius:8px;border-width:1px}.effort span{min-width:24px;text-align:center}.settings{position:fixed;top:0;right:0;bottom:0;width:min(365px,100vw);z-index:20;overflow:auto;border-radius:20px 0 0 20px;border:2px solid #d5d2e3a0;padding:23px 22px 40px;box-shadow:-14px 0 40px #10291f55}.panel{background:var(--panel);color:#fffbe8}.section-head{display:flex;gap:10px;align-items:center;justify-content:space-between}.section-head>button:last-child{font-size:25px;line-height:1;padding:4px 9px;border-radius:10px}.section-head div{flex:1}.settings>.fine{margin-top:8px}.fine{font-size:11px;color:#e0dfd7ba;line-height:1.5}.settings-group{border-top:1px solid #cac8d361;margin-top:20px;padding-top:17px;display:flex;flex-direction:column;gap:11px}.settings-group h2{font-size:15px}.settings-group>label{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12px}.settings-group>button{text-align:left;font-size:12px;min-height:42px}.settings-group p{font-size:11px}.settings-actions{display:flex;gap:8px}.settings-actions button{flex:1}.picker-tabs{display:flex;gap:6px;margin:3px 0 11px}.picker-tabs button{flex:1;padding:8px 3px;font-size:12px;border-color:var(--crew)}.color-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.swatch{height:45px;border:3px solid #ffffff55;border-radius:10px;background:var(--swatch)!important;position:relative;color:#173621;box-shadow:inset 0 -5px #00000020}.swatch[aria-pressed=true]{border:3px solid #fffde6;outline:2px solid #fff5bd;outline-offset:1px}.swatch span{font-size:18px;text-shadow:0 1px white}.swatch small{font-size:8px;font-weight:800;position:absolute;bottom:2px;left:0;right:0}.scrim{position:fixed;inset:0;background:#112c2666;z-index:15}.modal{position:fixed;top:7vh;bottom:7vh;left:50%;transform:translateX(-50%);width:min(900px,92vw);z-index:25;overflow:auto;border:2px solid #cecfb1;border-radius:18px;padding:24px;box-shadow:0 20px 90px #102b25b0}.modal h2{font-size:20px}.modal p,.modal li{font-size:12px;line-height:1.6}.modal p{margin:12px 0}.modal li{margin:12px 0}.modal button{font-size:11px}.analysis-summary{margin:18px 0}.analysis-actions{display:flex;gap:7px;flex-wrap:wrap}.analysis-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:25px}.prediction{display:flex;gap:12px;margin:12px 0}.prediction label{font-size:11px;display:grid;gap:8px}.prediction input{width:100%}#graph{width:100%;height:150px;background:#f7f8e8;border-radius:8px}.chart-title{font-size:11px;margin-bottom:10px}.chart-title span{float:right}.replay{display:flex;align-items:center;gap:8px}.replay input{min-width:40px;flex:1}.replay span{font-size:10px}.table-scroll{overflow:auto;margin-top:22px}table{width:100%;font:11px monospace;border-collapse:collapse;text-align:left}td,th{padding:8px;border-bottom:1px solid #ffffff30}th{color:#dbd2ae}.collision{color:#ffb787}details{font-size:12px;margin-top:16px}summary{cursor:pointer;color:#ffe68f}.success{position:absolute;top:30%;left:50%;transform:translateX(-50%);z-index:10;background:#2d4437f2;border:3px solid #fff1a1;border-radius:20px;box-shadow:0 12px 80px #15351d66;padding:26px;text-align:center;width:min(420px,90vw)}.success span{font-size:12px;color:#ffe989}.success strong{display:block;font-size:24px;margin:12px 0 20px}#toast{position:fixed;left:50%;bottom:170px;transform:translate(-50%,12px);background:#253c2ff5;color:#fffbe1;padding:10px 16px;border:1px solid #e4ecb6;border-radius:12px;font-size:12px;opacity:0;pointer-events:none;z-index:40;transition:.2s;max-width:90%;text-align:center}#toast.show{opacity:1;transform:translate(-50%,0)}.high-contrast .pad{background:#172c20f2;border-width:3px}.high-contrast .pad-heading h2{border-width:3px}.large-controls .move-row button{width:52px;height:52px}.large-controls .pad{max-width:370px}.large-controls .seat{width:calc((100% - 40px)/var(--count,2))}.large-controls .move-row{gap:4px}
/* Table seats face their own edge; each world remains a single shared simulation. */
[data-layout=table] .seat{width:290px;bottom:auto;z-index:3}[data-layout=table] .seat0{bottom:12px;left:calc(50% - 145px)}[data-layout=table] .seat1{top:12px;left:calc(50% - 145px);transform:rotate(180deg)}[data-layout=table] .seat2{left:-78px;top:calc(50% - 50px);transform:rotate(90deg)}[data-layout=table] .seat3{left:auto;right:-78px;top:calc(50% - 50px);transform:rotate(-90deg)}[data-layout=table] .brand{font-size:12px;max-width:220px}[data-layout=table] .brand span{font-size:16px}[data-layout=table] .objective{top:140px}
@media(max-width:800px){.game-header{inset:10px}.brand{padding:7px 10px}.brand span{font-size:15px}.brand small{font-size:7px;letter-spacing:1px}.hud{gap:6px}.hud strong{font-size:13px;padding:8px 10px}.hud button{width:48px;height:48px;font-size:28px}.objective{top:74px}.objective>span{font-size:10px}.seat{width:calc((100% - 32px)/var(--count,2));bottom:10px}.seat0{left:8px}.seat1{left:calc(8px + (100% - 16px)/var(--count,2))}.seat2{left:calc(8px + 2*(100% - 16px)/var(--count,2))}.seat3{left:calc(8px + 3*(100% - 16px)/var(--count,2))}.pad{padding:10px 5px 7px}.move-row{gap:3px}.move-row button{width:40px;height:40px;font-size:23px}.pad-heading h2{font-size:11px}.pad-heading h2 .crew-name{display:none}.force-controls{grid-template-columns:1fr;justify-items:center;gap:4px}.mode-row button{min-height:30px}.effort{gap:7px}.pad-state{font-size:8px}.analysis-grid{grid-template-columns:1fr}}
@media(max-width:650px){[data-count="3"] .seat,[data-count="4"] .seat{width:calc(50% - 14px)}[data-count="3"] .seat0,[data-count="4"] .seat0{left:8px;bottom:108px}[data-count="3"] .seat1,[data-count="4"] .seat1{left:calc(50% + 4px);bottom:108px}[data-count="3"] .seat2,[data-count="4"] .seat2{left:8px}[data-count="4"] .seat3{left:calc(50% + 4px)}[data-count="3"] .force-controls,[data-count="4"] .force-controls{display:none}[data-count="3"] .pad.gripped,[data-count="4"] .pad.gripped{padding-bottom:7px}[data-count="3"] .pad.gripped .force-controls,[data-count="4"] .pad.gripped .force-controls{display:flex;position:absolute;bottom:calc(100% + 17px);left:0;right:0;background:#20372af5;border-radius:12px;padding:6px;z-index:8;flex-wrap:wrap;justify-content:center}[data-count="3"] .seat0 .force-controls,[data-count="4"] .seat0 .force-controls,[data-count="3"] .seat1 .force-controls,[data-count="4"] .seat1 .force-controls{bottom:calc(100% + 17px)}.move-row button{width:35px;height:39px;font-size:21px}.move-row{gap:2px}.pad{border-radius:20px}.pad-heading{left:8px}.pad-heading h2 .crew-name{display:none}.pad-force{font-size:9px}.objective{top:70px;max-width:90%;width:90%}.objective>span{font-size:9px;max-width:90%}.hud strong{font-size:11px;padding:6px 8px}.brand span{font-size:13px;letter-spacing:.5px}.brand small{font-size:6px}.modal{padding:17px;top:3vh;bottom:3vh}.modal h2{font-size:17px}.large-controls .move-row button{width:43px;height:48px}.large-controls .pad{padding-left:2px;padding-right:2px}}
@media(max-width:380px){.brand small{display:none}.hud strong{font-size:10px;padding:7px}.move-row button{width:28px;height:36px}.seat{width:calc((100% - 22px)/var(--count,2))}.pad-heading{left:4px}.pad-heading h2{padding:3px 5px}.pad-force{font-size:8px}.pad-state{font-size:7px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto}}
/* Gripped crew trade inactive movement arrows for force controls in the same pad. */
.pad.gripped{padding-top:13px;min-height:85px}.pad.gripped .move-row{position:absolute;right:8px;top:-20px;margin:0}.pad.gripped .move-row button:not([data-action=grip]){display:none}.pad.gripped .move-row button[data-action=grip]{width:31px;height:31px;font-size:18px}.pad.gripped .pad-state{margin-top:3px}.pad.gripped .force-controls{display:flex!important;position:static!important;flex-wrap:wrap;justify-content:center;gap:6px;background:none!important;border-radius:0;padding:5px 0 0!important;margin-top:3px}.pad.gripped .mode-row{flex:1;justify-content:center}.pad.gripped .mode-row button{flex:1}.pad.gripped .effort{gap:3px}
@media(min-width:651px) and (max-width:1000px){[data-layout=same][data-count="3"] .seat,[data-layout=same][data-count="4"] .seat{width:calc(50% - 14px)}[data-layout=same][data-count="3"] .seat0,[data-layout=same][data-count="4"] .seat0{left:8px;bottom:116px}[data-layout=same][data-count="3"] .seat1,[data-layout=same][data-count="4"] .seat1{left:calc(50% + 4px);bottom:116px}[data-layout=same][data-count="3"] .seat2,[data-layout=same][data-count="4"] .seat2{left:8px;bottom:10px}[data-layout=same][data-count="4"] .seat3{left:calc(50% + 4px);bottom:10px}.move-row button{width:44px;height:44px}}
@media(max-width:450px){[data-count="2"] .seat{width:calc(100% - 16px);left:8px!important}[data-count="2"] .seat0{bottom:116px}[data-count="2"] .seat1{bottom:10px}[data-count="2"] .move-row button,[data-count="1"] .move-row button{width:44px;height:44px}[data-count="3"] .pad.gripped,[data-count="4"] .pad.gripped{min-height:93px}[data-count="3"] .seat0,[data-count="3"] .seat1,[data-count="4"] .seat0,[data-count="4"] .seat1{bottom:123px}.large-controls .move-row{flex-wrap:wrap}.large-controls .pad.gripped .move-row{flex-wrap:nowrap}}
@media(min-width:1001px) and (max-width:1250px){[data-count="4"][data-layout=same] .pad{padding-left:4px;padding-right:4px}[data-count="4"][data-layout=same] .move-row{gap:2px}}
@media(max-width:650px){[data-count="3"] .move-row,[data-count="4"] .move-row{display:grid;grid-template-columns:repeat(3,44px);gap:3px;justify-content:center}[data-count="3"] .move-row button,[data-count="4"] .move-row button{width:44px;height:44px;min-width:44px}[data-count="3"] .seat0,[data-count="3"] .seat1,[data-count="4"] .seat0,[data-count="4"] .seat1{bottom:158px}.pad.gripped .move-row{display:flex!important}.large-controls [data-count="3"] .move-row,.large-controls [data-count="4"] .move-row{grid-template-columns:repeat(3,48px)}.large-controls [data-count="3"] .move-row button,.large-controls [data-count="4"] .move-row button{width:48px;height:48px;min-width:48px}.large-controls [data-count="3"] .seat0,.large-controls [data-count="3"] .seat1,.large-controls [data-count="4"] .seat0,.large-controls [data-count="4"] .seat1{bottom:170px}}
.large-controls .pad.gripped .move-row button[data-action=grip]{width:44px;height:44px;min-width:44px;font-size:22px}.large-controls .mode-row button{min-height:44px}.large-controls .effort button{min-width:40px;min-height:44px}.large-controls .pad.gripped{min-height:100px}

/* Compact, non-interactive force key; the complete force list is also readable by AT. */
.force-key{position:absolute;top:123px;left:50%;transform:translateX(-50%);max-width:90%;width:max-content;text-align:center;background:#153332eb;border:1px solid #f5ebc48c;border-radius:7px;padding:5px 9px;pointer-events:none;font:10px/1.5 ui-monospace,monospace;color:#fff8dc}.force-key span{font-size:9px;color:#d8e7de}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[data-layout=table] .force-key{top:176px}@media(max-width:800px){.force-key{top:110px;font-size:9px;padding:3px 6px}.force-key span{font-size:8px}}@media(max-height:700px) and (max-width:650px){.force-key{top:102px;font-size:8px;line-height:1.3}.force-key span{font-size:7px}}

@media(max-height:700px) and (max-width:650px){.force-on .objective{display:none}.force-key{top:70px}}
.pad.gripped .move-row button[data-action=grip]{width:44px;height:44px;min-width:44px;font-size:22px}

/* Journey controls occupy a stable top strip, separate from crew touch pads. */
.journey-bar{position:absolute;top:128px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;width:max-content;max-width:94%;padding:5px 9px;background:#1e3c2cd9;border:1px solid #f8edbe55;border-radius:12px;font:10px monospace}.journey-bar>span{color:#fff0bd}.journey-bar>strong{color:#c9f085}.journey-actions{display:flex;gap:4px}.journey-actions button{min-height:36px;padding:5px 8px;border-radius:7px;font-size:10px}.force-key{top:180px;background:transparent;border:0;text-shadow:0 1px 3px #132f27;font-size:9px}.brief{max-width:760px}.brief .eyebrow{color:#d9eab8;margin-top:18px;font-size:10px;letter-spacing:2px}.route-line{display:block;font-size:24px;margin:20px 0;color:#ffdf7e}.brief-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:22px 0}.brief-steps>div{background:#24453770;border:1px solid #f1f4d344;border-radius:12px;padding:13px}.brief-steps b{color:#d8ecaa}.brief-steps p{margin-bottom:0}.gate-brief{padding:14px;border:1px solid #f3de9b;border-radius:12px;background:#5c523044}.primary{background:#ead279;color:#183827!important;width:100%;min-height:44px}.inspect{max-width:600px}.inspect canvas{display:block;width:360px;max-width:100%;height:auto;margin:0 auto}.inspect #inspectText{font:12px/1.6 monospace;background:#142d29;border-radius:10px;padding:14px}.recovery{max-width:500px;height:max-content;bottom:auto;top:28vh}.recovery button{min-height:44px;margin:8px 5px 0 0}.success p{font-size:12px;margin:10px 0 18px}.success button{font-size:12px;margin:4px}.success strong{font-size:21px;margin-bottom:10px}[data-layout=table] .journey-bar{top:172px}[data-layout=table] .force-key{top:224px}
@media(max-width:800px){.journey-bar{top:107px;gap:4px;font-size:9px}.journey-actions button{min-height:34px;padding:5px 7px}.force-key{top:185px}.brief-steps{grid-template-columns:1fr;gap:8px}.brief-steps p{margin-top:5px}.brief-steps>div{padding:10px}.route-line{font-size:21px}}
@media(max-width:450px){.journey-bar{top:108px;width:94%;gap:5px}.journey-bar>span{font-size:9px}.journey-actions{width:100%;justify-content:center}.journey-actions button{min-height:36px}.force-key{top:190px;font-size:8px;max-width:96%}.objective>span{font-size:9px}.force-on .objective{display:block}}
@media(max-height:500px){.brand{padding:5px 10px}.brand span{font-size:13px}.objective{top:60px}.journey-bar{top:86px}.journey-bar>span{display:none}.force-key{display:none}}

/* Matched trials are optional and never crowd the live game controls. */
.mass-lab{top:3vh;bottom:3vh;max-width:880px;padding:20px;background:#302e3cf7}.mass-lab .eyebrow{font-size:10px;letter-spacing:1.5px;color:#d9eab8}.mass-lab p{line-height:1.55;margin:8px 0}.mass-lab .eyebrow{margin:0 0 5px}.mass-setup{padding:12px;border:1px solid #e6d58a66;border-radius:9px;color:#ffe38e}.mass-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.mass-actions button{min-height:44px;padding:10px 14px}.mass-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.mass-results section{padding:16px;background:#1c362bcc;border:1px solid #e5eac655;border-radius:12px}.mass-results h3{margin:0 0 12px;color:#ffe38e}.mass-results dl{margin:0}.mass-results dl>div{display:flex;justify-content:space-between;gap:12px;padding:5px 0;border-bottom:1px solid #ffffff20}.mass-results dt{font-size:12px}.mass-results dd{margin:0;font:13px monospace;white-space:nowrap;color:#e3f2ba}.mass-conclusion{padding:13px;background:#384e3270;border-left:3px solid #d6eaa0}@media(max-width:550px){.mass-results{grid-template-columns:1fr}.mass-actions button{flex:1 1 140px}.mass-lab{padding:16px}.mass-results section{padding:12px}}

.mass-lab #closeMassLab{min-width:44px;min-height:44px}

.room-link{display:block;min-height:44px;padding:12px;border:1px solid #d1dfb299;border-radius:10px;background:#1d413bd9;color:#fff0ad;font-size:13px;font-weight:800;text-decoration:none}.room-link:focus-visible{outline:3px solid #ffdf63;outline-offset:3px}.room-link:hover{background:#335c4a}

/* Explicit resume stays outside live controls and never silently loads a trial. */
.device-save>button,.saved-trial-preview>button,.resume-device{min-height:44px;padding:10px 12px;margin:5px 0;width:100%;white-space:normal}.saved-trial-status,.saved-trial-preview>p{white-space:pre-line;font-size:12px;line-height:1.6;overflow-wrap:anywhere}.saved-trial-preview{margin-top:12px;padding:13px;background:#1b382f;border:1px solid #ecd47f;border-radius:10px}.saved-trial-preview h3{margin-top:0;color:#ffe38e}.resume-device{background:#244b3b;color:#fff0ac;border:1px solid #c5d8aa}
