@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&display=swap');
:root{font:16px/1.6 Tahoma,system-ui,sans-serif;color:#253821;background:#171b15;--cream:#f2d9ad;--ink:#253821;--green:#3b5734;--line:#ae7d4d}*{box-sizing:border-box}body{margin:0;background:repeating-linear-gradient(90deg,#ffffff02 0 2px,transparent 2px 6px)}button,input,select{font:inherit}button,a,select{-webkit-tap-highlight-color:transparent}button,select{min-height:44px;border:1px solid var(--line);border-radius:8px;background:#ffebc8;color:#513c28;padding:8px 13px}button{cursor:pointer;box-shadow:0 2px 0 #ac7c4c}button:hover:not(:disabled):not([data-bit]){background:#fff3dc}button:active:not(:disabled):not([data-bit]){transform:translateY(1px);box-shadow:none}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #b3442e;outline-offset:3px}.primary{background:var(--green);color:#fff0c6;border-color:#263e28;box-shadow:0 3px 0 #253821}.primary:hover:not(:disabled){background:#4a6c42}.shell{max-width:1320px;margin:auto;padding:22px}.topbar,.panel{background:var(--cream);border:2px solid #d2ac72;border-radius:15px;box-shadow:0 0 0 2px #5d4328,0 10px 25px #0003}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;margin-bottom:22px}.brand{display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none}.brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;background:var(--green);color:#ffe5a4;border:2px solid #253821;box-shadow:0 3px 0 #936138;font-size:24px}.brand strong{display:block;font-size:22px;line-height:1.1}.brand small{font-size:12px;color:#795739;letter-spacing:.08em}.badge{font-size:14px;border:1px solid #be925d;border-radius:20px;padding:5px 12px;background:#ffebc8}main{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:20px;align-items:start}.panel{padding:20px;background-image:repeating-linear-gradient(0deg,#5c391a04 0 1px,transparent 1px 4px)}.heading{display:flex;justify-content:space-between;gap:16px;align-items:start;margin-bottom:18px}.eyebrow{color:#79532f;font-size:12px;letter-spacing:.14em;margin:0 0 5px}h1{font-size:24px;line-height:1.4;margin:0;overflow-wrap:anywhere}h2{font-size:20px;line-height:1.4;margin:0 0 14px}.tag{background:#ad432f;color:#fff0c7;font-size:12px;padding:3px 9px;border-radius:5px}.toolbar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:17px}.frame{padding:15px 15px 8px;background:linear-gradient(130deg,#405d36,#20351f);border:3px solid #19251b;border-radius:20px 20px 30px 20px;box-shadow:inset 0 0 0 2px #638057,0 5px 0 #76512f}.screen{position:relative;aspect-ratio:3/2;overflow:hidden;background:#0a0f0b;border:3px solid #152219;border-radius:7px}canvas{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.screen:fullscreen{width:100vw;height:100vh;aspect-ratio:auto;border:0;border-radius:0;background:#000}#empty{position:absolute;inset:0;display:grid;place-content:center;text-align:center;padding:16px;color:#e8deb2;background:radial-gradient(ellipse at 50% 35%,#314a2d,#111f16)}#empty h2{font-size:clamp(20px,3vw,30px);margin:12px 0 0}#empty p{font-size:14px;color:#c1caaa;margin:10px 0 20px}.empty-label{font-size:12px;letter-spacing:.17em;color:#bcaa73}.frame-foot{display:flex;justify-content:space-between;gap:8px;margin-top:8px;font-size:12px;color:#ddc890}.statusbar{display:flex;justify-content:space-between;gap:12px;margin-top:17px;font-size:14px;min-height:50px}#playState{font-size:12px;font-weight:bold;color:#85603b;white-space:nowrap}.gamepad{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:12px;border-top:1px solid #c59b65}.gamepad button{background:var(--green);color:#ffebbd;border:2px solid #253821;touch-action:none;user-select:none;min-width:44px}.dpad{display:grid;grid-template:repeat(3,44px)/repeat(3,44px);gap:3px}.up{grid-area:1/2}.left{grid-area:2/1}.right{grid-area:2/3}.down{grid-area:3/2}.center-buttons{display:grid;gap:13px}.center-buttons>div{display:flex;justify-content:center;gap:8px}.center-buttons button{font-size:12px;padding:5px 9px}.ab{display:flex;gap:10px;transform:rotate(-15deg);margin-right:4px}.ab button{width:57px;height:57px;border-radius:50%;font-weight:bold;font-size:20px;background:#ad432f;border-color:#733621;transform:rotate(15deg);box-shadow:0 4px 0 #733621}.key-hint{font-size:12px;color:#745333;margin:16px 0 0}aside{display:grid;gap:20px}.wide{width:100%;margin-top:10px}.two-buttons{display:flex;gap:8px;margin-top:10px}.two-buttons>*{flex:1;min-width:0}.two-buttons button{font-size:14px}.note,.notice{font-size:14px;color:#654c34;margin:12px 0 0}.notice{padding:12px;border-left:3px solid #ab6c38;background:#fbe5bd}dl{margin:0}dt{font-size:12px;color:#765735;margin-top:10px}dd{font-size:14px;margin:2px 0;overflow-wrap:anywhere}label{display:block;font-size:14px;margin:13px 0 6px}select{width:100%}footer{color:#ceb895;font-size:12px;padding:22px 2px}footer a{color:#f2d9ad}details{margin-top:12px}summary{cursor:pointer}#error{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);background:#702e23;color:#fff0dc;padding:14px 20px;z-index:20;border-radius:9px;max-width:90vw;box-shadow:0 5px 25px #0006}#dropHint{position:fixed;inset:12px;background:#203b28ed;color:#fff0c7;display:grid;place-items:center;border:3px dashed #edc484;border-radius:20px;font-size:24px;z-index:30;text-align:center}dialog{width:min(460px,90vw);background:var(--cream);color:var(--ink);border:2px solid #936138;border-radius:15px;padding:24px}dialog::backdrop{background:#09130bd9}[hidden]{display:none!important}@media(max-width:1000px){main{grid-template-columns:minmax(0,1fr) 280px}.shell{padding:14px}.panel{padding:14px}}@media(max-width:760px){main{grid-template-columns:1fr}.topbar{padding:12px;flex-wrap:wrap;margin-bottom:16px}.shell{padding:10px}.heading{margin-bottom:12px}h1{font-size:20px}.frame{padding:9px 9px 6px}.toolbar{gap:6px}.toolbar button{padding:7px 10px;font-size:14px}.badge{font-size:12px}.statusbar{flex-direction:column;gap:2px}.gamepad{gap:8px}.ab{gap:7px}.ab button{width:49px;height:49px}.dpad{grid-template:repeat(3,42px)/repeat(3,42px);gap:2px}.dpad button{min-width:42px;padding:5px}.center-buttons button{padding:5px;min-width:38px}.center-buttons>div{gap:5px}aside{grid-template-columns:1fr}.key-hint{line-height:1.7}}
@media(max-width:480px){.gamepad{display:grid;grid-template-columns:1fr 1fr;row-gap:12px}.dpad{grid-area:1/1}.ab{grid-area:1/2;justify-self:end;margin-right:6px}.center-buttons{grid-column:1 / -1;display:flex;justify-content:center;gap:20px}.center-buttons button{min-width:44px}.statusbar{overflow-wrap:anywhere}}
.game-dialog{width:min(540px,94vw);max-height:90dvh;overflow:auto;border:3px solid #bd9459;box-shadow:0 0 0 4px #263b29,0 24px 80px #0009;background:linear-gradient(135deg,#f8e5c1,#e6c692);padding:24px}.game-dialog .heading{border-bottom:1px solid #b48a53;padding-bottom:14px}.game-dialog input{width:100%;min-height:44px;padding:10px 12px;border:1px solid #ae7d4d;border-radius:7px;background:#fff0d3;color:#253821}.game-dialog input:focus-visible{outline:3px solid #52774b;outline-offset:2px}.game-dialog [role=alert]{color:#8a281e;font-size:14px}.game-dialog [role=alert]:empty{display:none}#lobbyDialog{width:min(1080px,94vw)}.lobby-tools{display:flex;align-items:end;gap:12px;margin:16px 0}.lobby-tools label{flex:1;margin:0}.lobby-tools input{margin-top:6px}.room-table-scroll{overflow:auto;max-height:48dvh;border:2px solid #95703e;border-radius:9px;background:#1e3023}.room-table{width:100%;min-width:690px;border-collapse:collapse;font-size:14px;text-align:left;color:#f4e7cb}.room-table caption{text-align:left;padding:12px 16px;background:#19291d;color:#d8bd83;font-size:12px;letter-spacing:.04em}.room-table th{position:sticky;top:0;background:#385139;color:#ffe4a4;padding:13px 14px;white-space:nowrap;border-bottom:2px solid #9d804b}.room-table td{padding:12px 14px;border-bottom:1px solid #ffffff16;max-width:230px;overflow-wrap:anywhere}.room-table tr:nth-child(even){background:#ffffff04}.room-table tr:hover{background:#ffffff0b}.room-table tr[data-compatible=true] td:first-child{color:#e9cd83;font-weight:bold}.room-table td:nth-child(4){white-space:nowrap}.room-table button{white-space:nowrap;font-size:13px;min-width:110px}.room-table button:disabled{opacity:.65;background:#344736;color:#c6cbbf;border-color:#6a7155;box-shadow:none}.room-table .table-empty{text-align:center;color:#c9cfbd;padding:48px 20px}#roomList{display:table-row-group}#memberList{display:grid;gap:10px;margin:18px 0}.member-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px;border:1px solid #b28a53;border-radius:9px;background:#ffedcb;font-size:14px}.member-row span{white-space:nowrap;color:#795839}.member-row[data-ready=true]{background:#314f32;color:#fff0c7;border-color:#223e26}.member-row[data-ready=true] span{color:#c8edaa}#readySummary{font-weight:bold;border-top:1px solid #b48a53;padding-top:14px}.two-buttons>div{flex:1}@media(max-width:500px){.game-dialog{padding:16px}.member-row{flex-wrap:wrap}.lobby-tools{gap:8px}.room-table{min-width:640px}}
.save-info{margin:0 0 14px;font-size:13px;color:#6b5035}.save-info[open]{padding:10px 14px;background:#ffebc8;border:1px solid #c49a62;border-radius:8px}.screen-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 12px}.screen-tools button{font-size:14px}.screen-tools label{display:flex;align-items:center;gap:8px;margin:0;white-space:nowrap}.screen-tools select{width:auto;min-width:110px}.toolbar button{font-size:14px;padding:8px 10px}#shaderDialog{width:min(900px,94vw)}.shader-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}.shader-choice{display:block;text-align:left;padding:8px;overflow:hidden}.shader-choice strong,.shader-choice small{display:block;margin:6px 4px}.shader-choice small{font-size:12px}.shader-choice[aria-pressed=true]{outline:3px solid #375937;outline-offset:1px;background:#365335;color:#fff0c6}.shader-choice[aria-pressed=true]:hover{background:#405f3e}.shader-preview{display:block;position:relative;aspect-ratio:3/2;background:#102116;border-radius:5px;overflow:hidden}.shader-preview canvas{width:100%;height:100%}.screen::after,.shader-preview::after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit}[data-preset=lcd] canvas{filter:saturate(.72) contrast(.88) brightness(1.12)}[data-preset=grid]::after{background:repeating-linear-gradient(0deg,#0003 0 1px,transparent 1px 4px),repeating-linear-gradient(90deg,#0002 0 1px,transparent 1px 4px)}[data-preset=smooth] canvas{image-rendering:auto}[data-preset=crt] canvas{filter:contrast(1.08) saturate(1.1)}[data-preset=crt]::after{background:repeating-linear-gradient(0deg,#0004 0 1px,transparent 1px 4px);box-shadow:inset 0 0 50px 15px #000a}[data-preset=retro] canvas{filter:sepia(.3) saturate(.8) contrast(.95)}[data-preset=mono] canvas{filter:grayscale(1)}@media(max-width:600px){.shader-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.screen-tools{flex-wrap:wrap}}
.live-rooms .heading{align-items:center;margin-bottom:0}.live-rooms h2{margin:0}.live-rooms #sidebarRooms{display:grid;gap:12px;max-height:60vh;overflow:auto;margin-top:14px}.sidebar-room{padding:13px;background:#ffebc8;border:1px solid #bb915a;border-radius:9px;overflow-wrap:anywhere}.sidebar-room strong{display:block;font-size:15px}.sidebar-room p{font-size:13px;margin:7px 0;color:#6c5036}.sidebar-room small{display:block;font-size:12px}.sidebar-room button{width:100%;margin-top:10px;font-size:14px}
.player.local-cable-ui{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:12px}.player.local-cable-ui> *{grid-column:1/-1}.player.local-cable-ui>.frame{grid-column:1;grid-row:5;align-self:start}.player.local-cable-ui>#cableSecond{grid-column:2;grid-row:5;min-width:0}#cableSecond .note,#cableSeat{font-size:13px}#cableSeat{margin:0 0 6px}@media(max-width:800px){.player.local-cable-ui{display:block}#cableSecond{margin-top:12px}}
/* Handheld play surface: desktop layout and the initial ROM picker stay intact. */
.gamepad{display:none}
.mobile-menu-button{display:none}
#mobileSettings{width:100%;max-width:none;height:100dvh;max-height:100dvh;inset:0;margin:0;padding:0;border:0;border-radius:0;background:#080408de;color:#fff;overflow:auto}
#mobileSettings[open]{display:flex;flex-direction:column}
#mobileSettings::backdrop{background:#0007;backdrop-filter:blur(8px)}
.mobile-menu-title{flex:1;min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px 24px}
.mobile-menu-title{position:relative;padding-top:80px}
#mobileRestart{position:absolute;top:20px;left:20px;background:#35262f;color:#fff;border:1px solid #725865;border-radius:12px;padding:10px 16px;font-size:14px}
#mobileRestart:disabled{opacity:.4;cursor:not-allowed}
.mobile-menu-title #mobileCloseGame,.mobile-menu-title [data-game-audio]{position:absolute;background:#35262f;color:#fff;border:1px solid #725865;border-radius:12px;padding:10px 16px;font-size:14px}
.mobile-menu-title #mobileCloseGame{top:20px;right:20px}
.mobile-menu-title [data-game-audio]{bottom:20px;right:20px}
.mobile-menu-title #mobileCloseGame:disabled{opacity:.4;cursor:not-allowed}
.pause-mark{display:grid;place-items:center;width:54px;height:54px;background:#b64437;border-radius:16px;font-size:30px;font-weight:bold;margin-bottom:16px}
.mobile-menu-title h2{max-width:440px;font-size:20px;overflow-wrap:anywhere;margin:0}
.mobile-menu-title p{font-size:14px;color:#c3b4bc;max-width:360px}
.mobile-settings-sheet{background:#1b1018;padding:18px 16px calc(20px + env(safe-area-inset-bottom));border-top:1px solid #664451}
.mobile-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:18px;color:#b8a0aa;font-size:12px;letter-spacing:.06em}
.mobile-sheet-heading button{background:none;border:0;box-shadow:none;color:#ff899f;font-size:18px;font-weight:bold}
.mobile-settings-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-width:600px;margin:auto}
.mobile-settings-grid button,.mobile-speed-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:94px;margin:0;padding:10px 4px;background:#35262f;border:1px solid #725865;border-radius:20px;box-shadow:inset 0 1px 0 #ffffff1a;color:#fff;text-align:center;font-size:13px;line-height:1.35}
.ab{position:relative}
.ab .turbo-row{position:absolute;top:calc(100% + 12px);left:0;right:0;display:flex;gap:inherit;justify-content:center}
.gamepad .ab .turbo-row button{flex-shrink:0;border-radius:50%;touch-action:none}
.turbo-letter{position:relative;display:inline-block;line-height:1;pointer-events:none}
body.handheld-shell .gamepad .ab .turbo-row button:active{transform:rotate(30deg);box-shadow:inset 2px 2px 0 #c8709780,0 5px 4px #4a344977}
body.handheld-shell .gamepad .ab .turbo-row button.is-pressed{filter:brightness(.8);box-shadow:inset 2px 2px 0 #c8709780,0 5px 4px #4a344977}
.turbo-bolt{position:absolute;left:calc(100% + 2px);top:-.18em;width:.35em;height:.5em;background:currentColor;clip-path:polygon(45% 0,100% 0,62% 39%,100% 39%,12% 100%,36% 55%,0 55%);pointer-events:none}
.mobile-settings-grid button:hover:not(:disabled){background:#293b68}
#mobileSettings{background:#060c1bea;color:#edf2ff}
#mobileSettings .mobile-settings-sheet{background:#101a32;border-color:#34456a}
#mobileSettings .mobile-sheet-heading,#mobileSettings .mobile-save-note,#mobileSettings .mobile-menu-title p{color:#afbdd8}
#mobileSettings .mobile-sheet-heading button{color:#a5baff}
#mobileSettings .pause-mark{background:#354b88;box-shadow:0 4px 20px #15254b66}
#mobileSettings .mobile-settings-grid button,#mobileSettings #mobileRestart,#mobileSettings #mobileCloseGame,#mobileSettings [data-game-audio]{background:#1c2a4a;border-color:#4b5f88;color:#edf2ff}
#mobileSettings button:hover:not(:disabled){background:#293b68}
#mobileSettings button:focus-visible{outline:2px solid #a5baff;outline-offset:3px}
#mobileSettings .mobile-settings-grid button:disabled{background:#263149;border-color:#394762;color:#8996b1}
.mobile-settings-grid button>span:first-child,.mobile-speed-tile>span{font-size:34px;line-height:1}
.mobile-settings-grid #mobileFastLabel{font-size:13px}
.mobile-speed-tile select{min-height:30px;padding:2px 3px;font-size:12px;background:#211820;color:#fff;border-color:#725865;width:100%}
.mobile-save-note{text-align:center;color:#b8a0aa;font-size:12px;margin:16px 0 0}
#mobileMenuError{color:#ffb4c1;font-size:14px}#mobileMenuError:empty{display:none}
@media(max-width:760px), (max-width:1000px) and (pointer:coarse){
  body.handheld-shell{background:#000}
  body.handheld-shell .shell{padding:0;max-width:none;height:100dvh;overflow:hidden}
  body.handheld-shell .topbar,body.handheld-shell aside,body.handheld-shell footer,
  body.handheld-shell .player>.heading,body.handheld-shell .toolbar,body.handheld-shell .save-info,
  body.handheld-shell .screen-tools,body.handheld-shell .statusbar,body.handheld-shell .key-hint{display:none}
  body.handheld-shell main{display:block;height:100%}
  body.handheld-shell .player{height:100%;display:flex;flex-direction:column;padding:0;border:0;border-radius:0;background:#000;box-shadow:none}
  body.handheld-shell .player>.frame{flex:1;min-height:0;position:relative;padding:env(safe-area-inset-top) 0 0;border:0;border-radius:0;box-shadow:none;background:#000}
  body.handheld-shell .screen{height:100%;width:100%;aspect-ratio:auto;border:0;border-radius:0;background:#000}
  body.handheld-shell .frame-foot{position:absolute;top:calc(4px + env(safe-area-inset-top));right:10px;pointer-events:none;font-size:11px;color:#aaa;margin:0}
  body.handheld-shell .frame-foot>span:first-child{display:none}
  body.handheld-shell .gamepad{position:relative;flex:none;height:clamp(270px,40dvh,370px);width:100%;display:block;border:0;padding:0 0 env(safe-area-inset-bottom);background:linear-gradient(140deg,#f56858,#c63834 70%,#982c2c);box-shadow:inset 0 3px 0 #fc9a81;user-select:none;-webkit-user-select:none;touch-action:none}
  body.handheld-shell .dpad{position:absolute;left:clamp(14px,6vw,38px);top:30%;display:grid;grid-template:repeat(3,clamp(42px,12vw,56px))/repeat(3,clamp(42px,12vw,56px));gap:0;filter:drop-shadow(0 4px 3px #35100faa)}
  body.handheld-shell .dpad button{min-width:0;width:100%;height:100%;padding:0;border:3px solid #242025;border-radius:7px;background:#7f7478;color:#b9adb2;box-shadow:inset 2px 2px 0 #e6d7d7;font-size:18px}
  body.handheld-shell .dpad::after{content:'';grid-area:2/2;background:#7f7478;border-radius:50%;border:5px solid #30292e;align-self:center;justify-self:center;width:24px;height:24px;pointer-events:none}
  body.handheld-shell .center-buttons{display:contents}
  body.handheld-shell .center-buttons>div:first-child{position:absolute;top:0;left:0;right:0;display:flex;justify-content:space-between;gap:0}
  body.handheld-shell .center-buttons>div:first-child button{width:31%;height:44px;padding:0;border:3px solid #302127;background:#ffe1e4;color:#976d77;font-size:23px;font-weight:bold;box-shadow:0 4px 3px #47181888}
  body.handheld-shell .center-buttons>div:first-child button:first-child{border-radius:0 0 24px 0}
  body.handheld-shell .center-buttons>div:first-child button:last-child{border-radius:0 0 0 24px}
  body.handheld-shell .center-buttons>div:last-child{position:absolute;bottom:calc(12px + env(safe-area-inset-bottom));left:36%;display:flex;gap:12px}
  body.handheld-shell .center-buttons>div:last-child button{min-width:50px;min-height:44px;border:0;background:transparent;box-shadow:none;color:#ffe0d0;font-size:11px;padding:0}
  body.handheld-shell .center-buttons>div:last-child button::before{content:'';display:block;margin:0 auto 3px;width:20px;height:20px;border-radius:50%;border:3px solid #352b30;background:#ecf0dc;box-shadow:0 2px 3px #622d2d}
  body.handheld-shell .ab{position:absolute;right:clamp(16px,6vw,38px);top:28%;gap:12px;transform:rotate(-30deg);margin:0}
  body.handheld-shell .ab button{width:clamp(60px,17vw,80px);height:clamp(60px,17vw,80px);min-width:0;background:#ffe0e5;color:#b98192;border:4px solid #2c2027;box-shadow:inset 3px 3px 0 #fff8,0 5px 4px #67222299;font-size:29px;transform:rotate(30deg)}
  body.handheld-shell .gamepad button.is-pressed{filter:brightness(.8);box-shadow:inset 0 3px 6px #0005}
  body.handheld-shell .mobile-menu-button{display:flex;flex-direction:column;align-items:center;position:absolute;bottom:calc(12px + env(safe-area-inset-bottom));left:18px;background:transparent;border:0;box-shadow:none;color:#ffe0d0;min-width:48px;min-height:48px;padding:0}
  body.handheld-shell .mobile-menu-button>span{font-size:23px;color:#70f455;text-shadow:0 2px 1px #194a12}
  body.handheld-shell .mobile-menu-button small{font-size:11px}
  .game-dialog{max-height:calc(100dvh - 24px);overscroll-behavior:contain}
  .room-table{min-width:0;table-layout:fixed}
  .room-table th,.room-table td{padding:9px 5px;font-size:12px}
  .room-table th:nth-child(1){width:18%}.room-table th:nth-child(2){width:24%}.room-table th:nth-child(3){width:20%}.room-table th:nth-child(4){width:12%}.room-table th:nth-child(5){width:26%}
  .room-table th{white-space:normal}.room-table button{min-width:0;width:100%;padding:5px 2px;white-space:normal;font-size:12px}
}
/* Grouped desktop tools, retaining existing action IDs and handheld menu. */
.tool-group{display:flex;flex-direction:column;gap:7px;min-width:0}
.tool-group-label{font-size:12px;color:#6d603e;font-weight:bold;letter-spacing:.04em}
.tool-group-buttons{display:flex;flex-wrap:wrap;gap:7px}
.tool-icon{font-size:19px;line-height:1;vertical-align:-1px;margin-right:5px}
.toolbar{gap:15px 20px;padding:15px;border:1px solid #c9ae7c;border-radius:14px;background:#fff5df80;box-shadow:inset 0 1px 0 #fff9}
.toolbar .tool-group{flex:1 1 auto}
.toolbar .tool-group-save{flex-grow:1.4}
.toolbar button{min-height:46px;padding:9px 12px;font-size:14px;font-weight:600;border-radius:10px;box-shadow:0 2px 0 #c0a273,0 3px 6px #4d36120b;transition:background .15s,border-color .15s,box-shadow .15s}
.toolbar button:not(.primary){background:#fff8e9;border-color:#b8a47d;color:#35442e}
.toolbar button.primary{background:linear-gradient(#466640,#304e30);border-color:#2c452c;box-shadow:0 3px 0 #223b24;color:#fff0c8}
.toolbar button:hover:not(:disabled){background:#fffdf5;border-color:#6b835a;box-shadow:0 2px 0 #799267,0 4px 9px #32432a18}
.toolbar button.primary:hover:not(:disabled){background:#4b7042;color:#fff6dc}
.toolbar button:disabled{opacity:1;background:#e9dec5;color:#857c69;border-color:#cebea0;box-shadow:inset 0 1px 2px #58482008;cursor:not-allowed}
.toolbar .reset-button:hover:not(:disabled){background:#fbe6dd;color:#913d2b;border-color:#ba7966}
.screen-tools{padding:10px 12px;border-radius:12px;background:#dbc29255;border:1px solid #c7ab7a}
.screen-tools button{background:#fdf2d8;border-color:#ae9363;font-weight:600;box-shadow:0 2px 0 #b59b71}
.screen-tools select{background:#fff9eb;border-color:#b8a47d;border-radius:10px}
@media(min-width:761px){
  aside button{border-radius:11px;min-height:46px;font-weight:600;box-shadow:0 2px 0 #b89865;transition:background .15s,border-color .15s}
  aside .primary{background:linear-gradient(#466640,#304e30);border-color:#2c452c;box-shadow:0 3px 0 #223b24}
  aside button:disabled{opacity:1;background:#e5dcc4;border-color:#c8b795;color:#807965;box-shadow:none}
  aside button:hover:not(:disabled):not(.primary){background:#fff9e9;border-color:#70865f}
  #openEmpty{min-height:48px;border-radius:12px;font-weight:600;box-shadow:0 3px 0 #162f1e;padding:10px 28px}
}
@media(max-width:760px){.toolbar{padding:10px;gap:12px}.tool-group-buttons{gap:6px}.toolbar button{font-size:14px;padding:8px 10px}}
/* Quiet desktop chrome: one toolbar, no nested panels. */
@media(min-width:761px){
  .player.panel,aside>.panel{background-image:none;box-shadow:0 4px 16px #00000012;border:1px solid #b99c6c;border-radius:18px}
  .toolbar{padding:0;margin:20px 0 12px;background:none;border:0;box-shadow:none;gap:12px;align-items:center}
  .tool-group-label{display:none}
  .toolbar .tool-group{flex:0 1 auto}
  .toolbar .tool-group:last-child{margin-left:auto}
  .toolbar button,aside button,.screen-tools button,#openEmpty{box-shadow:none;border-radius:9px;min-height:42px;transition:background .15s,border-color .15s}
  .toolbar button.primary,aside button.primary{background:#365735;box-shadow:none}
  .toolbar button:hover:not(:disabled),aside button:hover:not(:disabled){box-shadow:none}
  .toolbar button:disabled{background:#e8dcc3;border-color:transparent;color:#8b816f;box-shadow:none}
  .screen-tools{padding:8px 0;background:none;border:0;margin:8px 0}
  .screen-tools button{font-weight:500;background:transparent;border-color:#bda780;box-shadow:none}
  .screen-tools select{min-height:40px;box-shadow:none}
  .save-info{font-size:13px;margin:8px 0;color:#776243}
  .save-info summary,.key-hint summary{cursor:pointer}
  #autoSaveStatus:empty{display:none}
  #autoSaveStatus{margin:8px 0;font-size:13px}
  .key-hint{margin:16px 0 0;padding:0;border:0;font-size:13px}
  .player>.heading .eyebrow{display:none}
  .statusbar{margin-top:10px;font-size:13px}
  body:not(.game-loaded) .statusbar{display:none}
  aside>.panel{padding:22px}
  aside h2{margin:0 0 16px}
  aside .note{font-size:14px;line-height:1.6}
  #empty h2{font-size:28px;margin-bottom:8px}
  #empty p{opacity:.75}
  #openEmpty{background:#41643b;border:1px solid #648258;box-shadow:none}
}
@media(prefers-reduced-motion:reduce){.toolbar button,aside button{transition:none}}
@media(max-width:760px) and (max-height:520px) and (orientation:landscape), (max-width:1000px) and (max-height:520px) and (orientation:landscape) and (pointer:coarse){
  body.handheld-shell .player>.frame{margin:0 145px;height:100%;flex:none;width:calc(100% - 290px)}
  body.handheld-shell .gamepad{position:absolute;inset:0;height:100dvh;background:transparent;box-shadow:none;pointer-events:none}
  body.handheld-shell .gamepad button{pointer-events:auto}
  body.handheld-shell .dpad{left:10px;top:32%;grid-template:repeat(3,40px)/repeat(3,40px)}
  body.handheld-shell .ab{right:12px;top:35%;gap:7px}
  body.handheld-shell .ab button{width:56px;height:56px}
  body.handheld-shell .center-buttons>div:first-child button{width:120px}
  body.handheld-shell .center-buttons>div:last-child{left:auto;right:14px;bottom:10px}
  body.handheld-shell .mobile-menu-button{left:40px;bottom:10px}
  #mobileSettings[open]{flex-direction:row}.mobile-menu-title{min-width:0;flex:1}.mobile-settings-sheet{width:60%;overflow:auto}.mobile-settings-grid{gap:8px}.mobile-settings-grid button,.mobile-speed-tile{min-height:80px}
}
/* DMG Studio — cool polymer, graphite bezel and berry controls. */
:root{--cream:#e7e7eb;--ink:#272938;--green:#863554;--line:#b8b9c5;color:var(--ink);background:#191b27;font-family:'Chakra Petch',sans-serif;font-weight:500}
body{background:radial-gradient(ellipse at 10% 0%,#3d354b 0,transparent 55%),radial-gradient(ellipse at 95% 80%,#293f3c 0,transparent 55%),#191b27}
.shell{max-width:1400px;padding:28px}
.topbar{background:#e7e7eb;border:1px solid #ffffff99;box-shadow:inset 0 1px 0 #fff,0 6px 18px #0002;padding:16px 20px;margin-bottom:22px;border-radius:18px}
.brand{color:#292b40}.brand-mark{background:#963b61;border:1px solid #c57596;color:#fff;box-shadow:0 4px 0 #532039;border-radius:12px 12px 20px 12px}
.brand small{color:#686779;letter-spacing:.15em}.badge{background:#f4f4f7;color:#555668;border:1px solid #c6c6d1;font-size:13px}
.player.panel,aside>.panel{background:#e7e7eb;background-image:none;border:1px solid #fff9;box-shadow:inset 0 1px 0 #fff,0 12px 35px #0003;border-radius:22px}
.player.panel{padding:24px;border-bottom-right-radius:52px}
aside>.panel{padding:24px;background:#dcdce3}
h1{font-size:23px;letter-spacing:-.035em;color:#292b40}h2{color:inherit;font-weight:700;letter-spacing:-.025em}
.tag{background:#343747;color:#e0e4ec;border-radius:6px;padding:4px 10px;font-family:monospace}
.note,.notice,dt,.key-hint{color:#656576}.eyebrow{color:#77768b}.statusbar{color:#676779}#playState{color:#7b3e5f}
.toolbar{padding:0;background:none;border:0;box-shadow:none;gap:12px;margin:20px 0 16px}
.tool-group-label{display:none}.toolbar .tool-group{flex:0 1 auto}.toolbar .tool-group:last-child{margin-left:auto}.tool-group-buttons{gap:8px}
.toolbar button,aside button,.screen-tools button,dialog button{min-height:44px;border-radius:11px;padding:10px 14px;font-size:14px;font-weight:600;background:#f5f5f8;color:#38394b;border:1px solid #bcbecb;box-shadow:0 3px 0 #b9bac6,inset 0 1px 0 #fff;transition:background .16s,transform .16s,box-shadow .16s}
.toolbar button:not(.primary){background:#f5f5f8;color:#38394b;border-color:#bcbecb}
.toolbar button.primary,aside button.primary,dialog button.primary{background:#873451;color:#fff4f8;border-color:#70273f;box-shadow:0 3px 0 #582139,inset 0 1px 0 #c5759480}
.toolbar button:hover:not(:disabled),aside button:hover:not(:disabled),.screen-tools button:hover:not(:disabled),dialog button:hover:not(:disabled){background:#fff;border-color:#8c86a8;box-shadow:0 3px 0 #a4a0b7}
.toolbar button.primary:hover:not(:disabled),aside button.primary:hover:not(:disabled),dialog button.primary:hover:not(:disabled){background:#9f4165;color:#fff;box-shadow:0 3px 0 #582139}
.toolbar button:active:not(:disabled),aside button:active:not(:disabled),dialog button:active:not(:disabled){transform:translateY(2px);box-shadow:none}
.toolbar button:disabled,aside button:disabled,dialog button:disabled{background:#d7d7df;color:#898998;border-color:#cccdd5;box-shadow:none;opacity:1}
button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #ad4874;outline-offset:4px}
.screen-tools{padding:8px 0 14px;background:none;border:0;box-shadow:none;color:#686779}
.screen-tools button{background:transparent;border-color:#b6b7c4;box-shadow:none;font-weight:500}
.screen-tools select,select{background:#f4f4f7;color:#38394b;border-color:#bfc0cc;border-radius:10px}
.frame{background:linear-gradient(140deg,#525462,#353844);border:1px solid #2c2e39;border-radius:16px 16px 36px 16px;padding:18px 18px 10px;box-shadow:inset 0 1px 0 #ffffff30,0 3px 0 #b8b9c4}
.screen{border:3px solid #242832;border-radius:6px;background:#171f1c}
.frame-foot{color:#c6c8d2;font-family:monospace;letter-spacing:.05em;font-size:11px;margin-top:10px}
#empty{background:radial-gradient(ellipse at 50% 20%,#415a3c,#203329);color:#d5e6b0}
#empty h2{font-weight:600;letter-spacing:-.035em}#empty p{color:#b9cba2}
#openEmpty{background:#d0e29f;color:#253a2b;border:1px solid #e3efc5;min-height:46px;border-radius:10px;box-shadow:0 3px 0 #111e16;font-weight:700}
#openEmpty:hover{background:#e4efc6}
.sidebar-room,.member-row{background:#ededf2;border-color:#bcbcca;color:#333549}.sidebar-room p,.member-row span{color:#696879}
.member-row[data-ready=true]{background:#334e42;color:#dfefce;border-color:#59765d}.member-row[data-ready=true] span{color:#d3e7bc}
dialog,.game-dialog{background:#e7e7ed;color:#292b3b;border:1px solid #bcbcc9;box-shadow:0 24px 90px #0008;border-radius:22px}
dialog::backdrop{background:#11131bc9;backdrop-filter:blur(5px)}.game-dialog .heading,#readySummary{border-color:#c4c4d0}
.game-dialog input{background:#f8f8fa;color:#292b3b;border-color:#bcbcca;border-radius:10px}.notice{background:#dadbe4;border-color:#8f5276}
.room-table-scroll{border-color:#777889;background:#272c36}.room-table caption{background:#242832;color:#c8cbd6}.room-table th{background:#393e4b;color:#e3e9d4;border-color:#707685}
.shader-choice[aria-pressed=true]{background:#873451;color:#fff;outline-color:#873451}.shader-choice[aria-pressed=true]:hover{background:#9e4466}
footer{color:#9495a8;line-height:1.8}footer a{color:#cbc5df}
@media(max-width:760px){.shell{padding:12px}.player.panel{padding:14px;border-bottom-right-radius:30px}.toolbar .tool-group:last-child{margin-left:0}.toolbar button{padding:9px 11px}.frame{padding:10px 10px 7px}.badge{font-size:12px}}
@media(max-width:760px), (max-width:1000px) and (pointer:coarse){
 body.handheld-shell .player.panel{padding:0;border:0;border-radius:0;background:#000;box-shadow:none}
 body.handheld-shell .gamepad{background:linear-gradient(135deg,#e2e2e9,#bdbecb);box-shadow:inset 0 3px 0 #f8f8fb}
 body.handheld-shell .ab button{background:#983f67;color:#f9d9e9;border-color:#572a46;box-shadow:inset 2px 2px 0 #c8709780,0 5px 4px #4a344977}
 body.handheld-shell .center-buttons>div:first-child button{background:#d6d6e0;color:#5c5a73;border-color:#747386}
 body.handheld-shell .mobile-menu-button,body.handheld-shell .center-buttons>div:last-child button{color:#48465e}
}
.gamepad,.gamepad button{touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
.gamepad button{transition:none!important;animation:none!important}
@media(prefers-reduced-motion:reduce){button{transition:none!important}}
.mobile-speed-strip{display:none}
.pc-extra-tools{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
@media(min-width:761px) and (pointer:fine){body.handheld-shell .player>.frame{background:linear-gradient(135deg,var(--shell-a,#e2e2e9),var(--shell-b,#bdbecb))}}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse),(orientation:landscape) and (max-height:600px) and (pointer:coarse){.pc-extra-tools{display:none}}
#translationPromptDialog{max-height:85dvh;overflow:auto}
#translationPromptText{width:100%;min-height:180px;padding:12px;font:14px/1.6 Tahoma,sans-serif;border:1px solid #a9a8b9;border-radius:10px;background:#f7f7fa;color:#292837;resize:vertical}
.translation-layer.selecting-dialogue{pointer-events:auto;touch-action:none;cursor:crosshair;background:#0002;outline:2px dashed #ffd966}
.dialogue-picker{position:absolute;border:2px solid #ffd966;background:#ffd96622;pointer-events:none}
.translate-badge{position:absolute;left:6px;top:6px;z-index:5;max-width:75%;background:#0009;color:#fff;padding:3px 6px;border-radius:5px;font:11px/1.4 Tahoma,sans-serif;pointer-events:none}
.translation-layer{position:absolute;pointer-events:none;z-index:4;overflow:hidden}
.translated-line{position:absolute;padding:2px 6px;border-radius:4px;background:rgba(0,0,0,.64);color:#fff;font:500 clamp(12px,2.2vw,19px)/1.35 Tahoma,sans-serif;text-shadow:0 1px 2px #000;box-sizing:border-box;overflow-wrap:anywhere;white-space:normal}
#translateDialog{max-height:85dvh;overflow:auto}
#translateStatus{min-height:1.5em}
[data-preset=soft] canvas{image-rendering:auto;filter:blur(.35px)}
[data-preset=smooth-vivid] canvas{image-rendering:auto;filter:saturate(1.18) contrast(1.04)}
[data-preset=smooth-warm] canvas{image-rendering:auto;filter:sepia(.16) saturate(1.08)}
[data-preset=smooth-mono] canvas{image-rendering:auto;filter:grayscale(1) contrast(.95)}
#shaderDialog{max-height:85dvh;overflow:auto}
#supportDialog{width:min(700px,94vw);max-height:92dvh;overflow:auto;padding:16px}
#supportDialog .heading{position:sticky;top:-16px;z-index:1;background:#e7e7ed;padding:12px 0;margin:0 0 12px;align-items:center}
#supportDialog .support-image{display:block;width:100%;height:auto;border-radius:8px}
#supportDialog .support-original{display:block;text-align:center;padding:12px;color:inherit;text-decoration:underline}
.handheld-power,.speaker-grille{display:none}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse){
 body.handheld-shell .handheld-power{position:absolute;display:flex;align-items:center;justify-content:center;right:14px;bottom:0;height:36px;width:26px;z-index:2;pointer-events:none}
 .power-lamp{display:block;width:18px;height:8px;border-radius:8px;background:#ef4851;box-shadow:0 0 5px #e3374266,inset 0 1px 1px #ffffff70}
 body.game-loaded .power-lamp{background:#4bf461;box-shadow:0 0 9px #42ee6680,inset 0 2px 2px #ffffff90}
 body.game-running .power-lamp{animation:nonboy-power 2s ease-in-out infinite}
 body.handheld-shell .speaker-grille{position:absolute;display:grid;grid-template-columns:repeat(4,8px);gap:8px;right:22px;bottom:calc(20px + env(safe-area-inset-bottom));transform:rotate(-12deg);pointer-events:none}
 .speaker-grille i{width:8px;height:8px;border-radius:50%;background:#193b5d80;box-shadow:inset 0 2px 2px #16294270,0 1px 0 #ffffff20}
 .speaker-grille i:first-child,.speaker-grille i:nth-child(4),.speaker-grille i:nth-child(13),.speaker-grille i:last-child{visibility:hidden}
 body.editing-pad .speaker-grille{visibility:hidden}
 body.editing-pad .handheld-power{pointer-events:none;opacity:.5}
}
/* Keep Pause above the midpoint of Select/Start, outside their button row. */
@media(max-width:760px),(max-width:1000px) and (pointer:coarse),(orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.handheld-shell .center-buttons>div:last-child .quick-pause{position:absolute;left:50%;bottom:calc(100% + 8px);translate:-50% 0;margin:0}
}
@keyframes nonboy-power{0%,100%{opacity:1}50%{opacity:.5}}
@media(prefers-reduced-motion:reduce){body.game-running .power-lamp{animation:none}}
#groupPadDialog::backdrop,#appearanceDialog::backdrop{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.save-pad-layout{display:none}
.launch-actions{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;max-width:420px;margin:0 auto;padding:12px 16px;box-sizing:border-box}
#empty .launch-actions>button{width:100%;max-width:100%;margin:0;white-space:normal;overflow-wrap:anywhere;min-height:52px;line-height:1.5;border-radius:16px}
#empty .launch-actions .recent-game{font-size:14px;padding:14px 18px;background:#1c2b49;color:#eef3ff;border:1px solid #5e7bb0;box-shadow:0 3px 0 #101c32}
#empty .launch-actions>small{text-align:center;margin:0 auto!important}
/* Apply the launch palette before deferred JavaScript creates launch-actions. */
body.handheld-shell #empty #openEmpty,body.handheld-shell #empty .launch-actions>button,body.handheld-shell dialog.library-dialog button{background:#1c2b49!important;color:#eef3ff!important;border:1px solid #526b98!important;box-shadow:0 3px 0 #101c32!important;border-radius:14px}
body.handheld-shell #empty .launch-actions>button:hover:not(:disabled),body.handheld-shell dialog.library-dialog button:hover:not(:disabled){background:#293e62!important}
body.handheld-shell #empty .launch-actions>button:focus-visible,body.handheld-shell dialog.library-dialog button:focus-visible{outline:2px solid #91b5ff!important;outline-offset:3px}
body.handheld-shell dialog.library-dialog{background:#111b2e!important;color:#eef3ff!important;border:1px solid #526b98!important;box-shadow:0 16px 48px #0008!important}
body.handheld-shell dialog.library-dialog .heading{border-color:#34496c!important;align-items:center}
body.handheld-shell dialog.library-dialog h2{color:#eef3ff!important;margin:0}
body.handheld-shell dialog.library-dialog small{color:#afc1df}
dialog.library-dialog [data-library-status]:empty{display:none}
body.handheld-shell dialog.library-dialog button.library-game-delete{background:transparent!important;border:0!important;box-shadow:none!important;color:#b9c9e5!important;border-radius:8px}
body.handheld-shell dialog.library-dialog button.library-game-delete:hover:not(:disabled){background:#ffffff12!important;color:#fff!important}
body.handheld-shell dialog.library-dialog button[data-sort][aria-pressed="true"]{background:#365687!important;outline:2px solid #91b5ff;outline-offset:1px}
.compact-controller [data-controller-mapping]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.compact-controller [data-controller-mapping]>p{grid-column:1/-1;margin:4px 0;font-size:12px}
.compact-controller [data-controller-mapping]>p:empty{display:none}
.compact-controller [data-controller-mapping]>label{margin:0;font-size:0}
.compact-controller [data-controller-mapping] button{font-size:12px!important;min-height:48px;padding:8px!important;white-space:normal;line-height:1.4}
.compact-controller [data-controller-mapping] select{display:none!important}
.compact-controller [data-controller-status],.compact-controller [data-controller-input]{font-size:12px;margin:6px 0;overflow-wrap:anywhere}
/* Portrait: fit the game at 3:2 and give surplus height to the controls. */
@media(max-width:760px) and (orientation:portrait), (max-width:1000px) and (pointer:coarse) and (orientation:portrait){
 body.handheld-shell .player>.frame{--portrait-screen-gap:20px;--frame-bottom-space:calc(36px + var(--portrait-screen-gap));flex:0 0 auto;height:min(calc(66.6667vw + 36px + var(--portrait-screen-gap) + var(--portrait-screen-gap) + env(safe-area-inset-top)),calc(100dvh - 270px - env(safe-area-inset-bottom)));padding:calc(var(--portrait-screen-gap) + env(safe-area-inset-top)) 0 var(--frame-bottom-space);min-height:0}
 body.handheld-shell .gamepad{flex:1 0 auto;height:auto;min-height:calc(270px + env(safe-area-inset-bottom))}
}
.topbar-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px}
body.handheld-shell .topbar-actions .badge{max-width:100%}
body.handheld-shell .home-link{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:10px 18px;background:var(--pc-accent,#29436b);border:1px solid #6d91cb;border-radius:12px;color:#fff;text-decoration:none;font-size:14px;font-weight:700;white-space:nowrap}
body.handheld-shell .home-link:hover{background:var(--pc-hover,#365582);border-color:#a7c7ff}
body.handheld-shell .home-link:focus-visible{outline:3px solid #a7c7ff;outline-offset:3px}
@media(min-width:761px) and (pointer:fine), (min-width:1001px) and (min-height:601px){
 body.handheld-shell[data-pc-theme="nonplae"]{--pc-panel:#f2d9ad!important;--pc-button:#fae8c7!important;--pc-border:#ad7748!important;--pc-accent:#2f4729!important;--pc-hover:#47643a!important;background:radial-gradient(circle at 50% -15%,#5b4d2f,transparent 38%),repeating-linear-gradient(90deg,#17150f 0 5px,#1c1811 5px 11px)!important;color:#233521!important}
 body.handheld-shell[data-pc-theme="nonplae"] :is(.topbar,.player.panel,aside>.panel,dialog){background:#f2d9ad!important;border:2px solid #ad7748!important;box-shadow:0 3px 0 #5d4328!important;color:#233521!important}
 body.handheld-shell[data-pc-theme="nonplae"] :is(h1,h2,.brand,.brand small,.eyebrow,.tool-group-label,.screen-tools label,.note,.statusbar){color:#36492d!important}
 body.handheld-shell[data-pc-theme="nonplae"] :is(.shell button,.shell select,dialog button,dialog select,dialog input){background:#fae8c7!important;border-color:#ad7748!important;color:#233521!important}
 body.handheld-shell[data-pc-theme="nonplae"] :is(.home-link,.brand-mark,.shell button.primary,#empty .launch-actions>button){background:#2f4729!important;color:#fff0ce!important;border-color:#704825!important;box-shadow:0 3px 0 #704825!important}
 body.handheld-shell[data-pc-theme="nonplae"] :is(button,.home-link):hover:not(:disabled){background:#47643a!important;color:#fff0ce!important}
 body.handheld-shell[data-pc-theme="nonplae"] .shell button:disabled{background:#dbc7a7!important;color:#776c58!important;border-color:#b39b76!important}
 body.handheld-shell[data-pc-theme="nonplae"] :is(.badge,.tag,.sidebar-room){background:#ead1a7!important;color:#36492d!important;border-color:#ad7748!important}
 body.handheld-shell[data-pc-theme="nonplae"] .player>.frame{background:#233521!important;border-color:#704825!important}
 body.handheld-shell[data-pc-theme="nonplae"] #empty{background:radial-gradient(ellipse at top,#435939,#162116)!important}
 body.handheld-shell[data-pc-theme="nonplae"] #empty h2{color:#fff0ce!important}
 body.handheld-shell[data-pc-theme="nonplae"] :is(#empty p,.frame-foot){color:#d6c49f!important}
 body.handheld-shell[data-pc-theme="nonplae"] .screen-tools{border-color:#ad7748!important}
}
/* Every desktop control consumes the selected palette, including disabled and modal controls. */
@media(min-width:761px) and (pointer:fine), (min-width:1001px) and (min-height:601px){
 body.handheld-shell[data-pc-theme]{--ui-text:#edf3ff;--ui-muted:#b1b8c3;--ui-primary-text:#fff;--ui-disabled:var(--pc-panel);--ui-edge:var(--pc-border);--ui-focus:#edf3ff;--ui-shadow:var(--pc-bg)}
 body.handheld-shell[data-pc-theme="classic"]{--ui-text:#343448;--ui-muted:#767686;--ui-primary-text:#fff;--ui-focus:#983f67}
 body.handheld-shell[data-pc-theme="nonplae"]{--ui-text:#233521;--ui-muted:#776c58;--ui-primary-text:#fff0ce;--ui-focus:#47643a;--ui-shadow:#704825}
 body.handheld-shell[data-pc-theme] :is(.shell,dialog) :is(button,select,input,.home-link){background:var(--pc-button)!important;color:var(--ui-text)!important;border-color:var(--ui-edge)!important;box-shadow:none!important}
 body.handheld-shell[data-pc-theme] #empty :is(#openEmpty,.launch-actions>button),body.handheld-shell[data-pc-theme] :is(.shell,dialog) :is(button.primary,.home-link,button[aria-pressed="true"]){background:var(--pc-accent)!important;color:var(--ui-primary-text)!important;border-color:var(--ui-edge)!important;box-shadow:0 3px 0 var(--ui-shadow)!important}
 body.handheld-shell[data-pc-theme] #empty :is(#openEmpty,.launch-actions>button):hover:not(:disabled),body.handheld-shell[data-pc-theme] :is(.shell,dialog) :is(button,.home-link):hover:not(:disabled){background:var(--pc-hover)!important;color:var(--ui-primary-text)!important;border-color:var(--ui-edge)!important}
 body.handheld-shell[data-pc-theme] :is(.shell,dialog) button:disabled{background:var(--ui-disabled)!important;color:var(--ui-muted)!important;border-color:var(--ui-edge)!important;box-shadow:none!important;opacity:.65}
 body.handheld-shell[data-pc-theme] :is(.shell,dialog) :is(button,select,input,.home-link):focus-visible{outline:2px solid var(--ui-focus)!important;outline-offset:3px}
 body.handheld-shell[data-pc-theme] dialog{background:var(--pc-panel)!important;color:var(--ui-text)!important;border-color:var(--ui-edge)!important}
 body.handheld-shell[data-pc-theme] dialog :is(h2,label,small,p){color:var(--ui-text)!important}
 body.handheld-shell[data-pc-theme] dialog.library-dialog button.library-game-delete{background:transparent!important;color:var(--ui-text)!important;box-shadow:none!important}
 body.handheld-shell[data-pc-theme] :is(.badge,.tag,.sidebar-room){background:var(--pc-button)!important;color:var(--ui-text)!important;border-color:var(--ui-edge)!important}
}
.brand-logo{display:block;width:56px;height:56px;flex:0 0 56px;object-fit:contain;border:0;background:transparent}
/* NONPLAE handheld: parchment shell, forest keys and warm bevels. */
@media(max-width:760px),(max-width:1000px) and (pointer:coarse),(orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.handheld-shell[data-mobile-theme="nonplae"] .player>.frame::after{background:#e8cca0;color:#2f4729;border-bottom:2px solid #ad7748}
 body.handheld-shell[data-mobile-theme="nonplae"] .gamepad .ab button{background:linear-gradient(145deg,#5e7c49,#2f4729)!important;color:#fff0ce;border-color:#704825;text-shadow:0 1px #182315;--ab-edge-shadow:inset 0 2px 3px #ffffff70,inset -3px -4px 4px #16211180,0 0 0 2px #ad7748,0 3px 0 2px #5d4328,2px 5px 5px #30201060}
 body.handheld-shell[data-mobile-theme="nonplae"] .gamepad .ab button.is-pressed{background:#263b21!important;color:#e7d6b4}
 body.handheld-shell[data-mobile-theme="nonplae"] .dpad button[data-bit]::before{background:linear-gradient(145deg,#bd925b,#704825 55%,#433020)}
 body.handheld-shell[data-mobile-theme="nonplae"] .dpad .dpad-face{background:linear-gradient(145deg,#fff2d5,#f2d9ad 45%,#b28b58);color:#47643a;text-shadow:0 1px #fff1d4}
 body.handheld-shell[data-mobile-theme="nonplae"] .dpad button.is-pressed .dpad-face{background:#b99a6b;color:#233521}
 body.handheld-shell[data-mobile-theme="nonplae"] .center-buttons>div:first-child button{background:#f2d9ad;color:#2f4729;border-color:#ad7748;box-shadow:0 4px 3px #70482580}
 body.handheld-shell[data-mobile-theme="nonplae"] :is(.mobile-menu-button,.center-buttons>div:last-child button){color:#3b492d}
 body.handheld-shell[data-mobile-theme="nonplae"] .mobile-speed-strip{background:#4c3e2c}
 body.handheld-shell[data-mobile-theme="nonplae"] .mobile-speed-strip button[aria-pressed="true"]{background:#f2d9ad;color:#233521}
 body.handheld-shell[data-mobile-theme="nonplae"] :is(dialog,.mobile-settings-sheet){background:#f2d9ad!important;color:#233521!important;border-color:#ad7748!important}
 body.handheld-shell[data-mobile-theme="nonplae"] :is(dialog button,dialog select,#empty #openEmpty,#empty .launch-actions>button){background:#2f4729!important;color:#fff0ce!important;border-color:#ad7748!important;box-shadow:0 3px 0 #704825!important}
 body.handheld-shell[data-mobile-theme="nonplae"] dialog button:disabled{background:#c7b18b!important;color:#695d49!important}
 body.handheld-shell[data-mobile-theme="nonplae"] dialog :is(h2,label,p,small,.mobile-sheet-heading){color:#36492d!important}
 body.handheld-shell[data-mobile-theme="nonplae"] .speaker-grille i{background:#70482580}
}
.pad-drag-bar{display:none}
/* Keep the editor off the shoulder buttons in landscape. */
@media(orientation:landscape){
 body.editing-pad .pad-drag-bar{left:145px!important;right:145px!important;max-height:45dvh;overflow:auto}
}
body.editing-pad .pad-drag-bar{position:fixed;top:env(safe-area-inset-top,0px);left:8px;right:8px;z-index:100;display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;padding:10px 12px;background:#172239f5;color:#eef2ff;border:1px solid #536580;border-radius:0 0 14px 14px;box-shadow:0 5px 18px #0006;font:13px/1.3 Tahoma,sans-serif}
body.editing-pad .pad-drag-bar strong{min-width:100px}
body.editing-pad .pad-drag-bar label{display:flex;align-items:center;gap:6px;flex:1 1 170px;margin:0;color:inherit;font-size:13px}
body.editing-pad .pad-drag-bar input{min-width:60px;width:100%;touch-action:none}
body.editing-pad .pad-drag-bar button{min-height:36px;padding:7px 10px;font-size:12px;background:#2c405e;border:1px solid #60738f;color:#fff;box-shadow:none}
body.editing-pad #appearanceDialog,body.editing-pad .save-pad-layout{display:none!important}
body.editing-pad .gamepad [data-pad-group]{touch-action:none;cursor:move;pointer-events:auto!important}
body.editing-pad .gamepad .turbo-row{display:flex!important}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse){
 body.editing-pad .save-pad-layout{display:block;position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:60;min-width:64px;min-height:44px;padding:10px 12px;border:1px solid #e7bfd3;border-radius:12px;background:#923d65;color:#fff;font:700 13px/1.2 system-ui,sans-serif;box-shadow:0 3px 0 #51253e}
}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse),(orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.handheld-shell .gamepad [data-pad-group]{scale:var(--group-scale,1)!important;translate:var(--group-x,0px) var(--group-y,0px)!important;opacity:var(--group-opacity,1)!important}
 body.handheld-shell .gamepad .quick-pause[data-pad-group]{translate:calc(-50% + var(--group-x,0px)) var(--group-y,0px)!important}
 body.editing-pad .gamepad [data-pad-group]{outline:1px dashed #eee8;outline-offset:2px;pointer-events:auto!important}
 body.editing-pad .gamepad .pad-selected{outline:3px solid #ffcf65!important}
 #groupPadDialog{position:fixed;top:8px;margin:0 auto;width:calc(100% - 24px);max-height:55dvh;overflow:auto}
 #groupPadDialog::backdrop{background:#0002}
}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse){
 body.handheld-shell .player>.frame{padding-bottom:var(--frame-bottom-space,36px)}
 body.handheld-shell .player>.frame::after{content:'NONBOY';position:absolute;bottom:0;left:0;right:0;height:36px;display:flex;align-items:center;justify-content:center;background:#dcdce2;color:#55556b;font-family:'Arial Black',Arial,sans-serif;font-size:21px;font-weight:900;font-style:italic;letter-spacing:-1px;line-height:1;text-shadow:0 1px 0 #ffffff80;pointer-events:none}
 body.handheld-shell .player>.frame>.screen{height:100%}
}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse){
 body.handheld-shell .gamepad [data-bit]{position:relative;left:var(--individual-x,0px);top:var(--individual-y,0px);scale:var(--individual-scale,1);opacity:var(--individual-opacity,1)!important}
 body.editing-pad .gamepad .pad-selected{outline:3px solid #ffcf65!important;outline-offset:4px;z-index:3}
 body.editing-pad #appearanceDialog{position:fixed;z-index:50;max-height:52dvh}
 body.editing-pad .mobile-speed-strip,body.editing-pad #mobileMenuButton{pointer-events:none}
}
.theme-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.theme-choices button{padding:8px;border:2px solid transparent;background:#292735;color:#fff}
.theme-choices button[aria-pressed="true"]{border-color:#d687b1}
.theme-swatch{display:block;height:70px;border-radius:10px;margin-bottom:8px;padding:20px}
.theme-swatch i{display:block;width:28px;height:28px;border-radius:50%;margin-left:auto;box-shadow:0 3px 0 #0004}
#padChoices input{display:block;width:100%;accent-color:#a34f7b;min-height:38px}
#padChoices output{float:right}
#appearanceDialog{max-height:65dvh;overflow:auto}
#appearanceDialog::backdrop{background:#0003}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse){
 body.handheld-shell .gamepad{background:linear-gradient(135deg,var(--shell-a,#e2e2e9),var(--shell-b,#bdbecb))!important}
 body.handheld-shell .ab button{background:var(--pad-accent,#983f67)!important}
 body.handheld-shell .dpad,body.handheld-shell .ab{scale:var(--pad-scale,1);translate:var(--pad-x,0px) var(--pad-y,0px);opacity:var(--pad-opacity,1)}
 body.handheld-shell .center-buttons [data-bit]{opacity:var(--pad-opacity,1)}
 #appearanceDialog{margin:12px auto auto;width:calc(100% - 24px);max-height:55dvh}
}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse){
 body.handheld-shell #empty{background:#000;color:#e7e7ef;padding:24px}
 body.handheld-shell #empty h2,body.handheld-shell #empty p{display:none}
 body.handheld-shell #empty #openEmpty{min-height:52px;padding:12px 30px;border:1px solid #b66991;border-radius:16px;background:#923d65;color:#fff;box-shadow:0 4px 0 #54283f;font-size:16px}
}
@media(max-width:760px),(pointer:coarse) and (max-width:1000px){
 body.handheld-shell .center-buttons>div:first-child button{width:24%}
 body.handheld-shell .mobile-speed-strip{position:absolute;top:4px;left:26%;width:48%;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;padding:3px;background:#24242c;border-radius:16px;box-shadow:inset 0 1px 0 #ffffff25,0 2px 5px #0003;pointer-events:auto}
 body.handheld-shell .mobile-speed-strip button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0;min-height:44px;padding:2px 0;border:0;border-radius:12px;background:transparent;color:#eeeef4;box-shadow:none;line-height:1.1}
 body.handheld-shell .mobile-speed-strip button span{font-size:18px}
 body.handheld-shell .mobile-speed-strip button small{font:10px/1.2 system-ui,sans-serif}
 body.handheld-shell .mobile-speed-strip button:not(:disabled):hover,body.handheld-shell .mobile-speed-strip button:not(:disabled):active{background:transparent;color:#eeeef4;box-shadow:none;transform:none;filter:none}
 body.handheld-shell .mobile-speed-strip button[aria-pressed="true"],body.handheld-shell .mobile-speed-strip button[aria-pressed="true"]:not(:disabled):hover,body.handheld-shell .mobile-speed-strip button[aria-pressed="true"]:not(:disabled):active{background:#dedee8;color:#252432;box-shadow:inset 0 1px 0 #fff;transform:none;filter:none}
 body.handheld-shell .mobile-speed-strip button:disabled{opacity:.4}
}
@media(orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.handheld-shell{background:var(--shell-b,#bdbecb)}
 body.handheld-shell .shell{padding:0;height:100dvh;max-width:none;overflow:hidden}
 body.handheld-shell .topbar,body.handheld-shell aside,body.handheld-shell footer,body.handheld-shell .player>.heading,body.handheld-shell .toolbar,body.handheld-shell .screen-tools,body.handheld-shell .statusbar{display:none}
 body.handheld-shell main{display:block;height:100%}
 body.handheld-shell .player.panel{position:relative;display:block;height:100%;padding:0;border:0;border-radius:0;background:linear-gradient(135deg,var(--shell-a,#e2e2e9),var(--shell-b,#bdbecb))}
 body.handheld-shell .player>.frame{position:relative;margin:0 auto;width:calc(100% - 300px);height:100%;padding:8px 0 36px;background:#000;border:0;border-radius:0;box-shadow:none}
 body.handheld-shell .screen{width:100%;height:100%;aspect-ratio:auto;border:0;background:#000}
 body.handheld-shell .gamepad{display:block;position:absolute;inset:0;width:100%;height:100%;background:transparent!important;box-shadow:none;border:0;pointer-events:none}
 body.handheld-shell .gamepad button{pointer-events:auto}
 body.handheld-shell .dpad{position:absolute;left:12px;top:30%;grid-template:repeat(3,40px)/repeat(3,40px)}
 body.handheld-shell .ab{position:absolute;right:12px;top:31%;gap:8px}
 body.handheld-shell .ab button{width:54px;height:54px}
 body.handheld-shell .center-buttons>div:first-child button{width:132px}
 body.handheld-shell .mobile-speed-strip{top:auto;bottom:2px;left:calc(50% - 90px);width:180px;height:32px;padding:2px;border-radius:10px}
 body.handheld-shell .mobile-speed-strip button{min-height:28px;height:28px;gap:0;padding:0;border-radius:8px}
 body.handheld-shell .mobile-speed-strip button span{font-size:13px}
 body.handheld-shell .mobile-speed-strip button small{font-size:9px}
 body.handheld-shell .center-buttons>div:last-child{left:auto;right:14px;bottom:12px}
 body.handheld-shell .speaker-grille{display:grid;right:32px;top:15%;bottom:auto;grid-template-columns:repeat(4,7px);gap:7px}
 body.handheld-shell .speaker-grille i{width:7px;height:7px}
 body.handheld-shell .mobile-menu-button{left:42px;bottom:12px}
 body.handheld-shell .mobile-menu-button::before{content:'NONBOY';position:absolute;bottom:58px;left:50%;transform:translateX(-50%);font:italic 900 18.4px/1 'Arial Black',Arial,sans-serif;letter-spacing:-.6px;color:#101b2c55;text-shadow:0 1px 0 #ffffff25;pointer-events:none}
 body.handheld-shell .frame::after{display:none}
}
/* One continuous cross; the whole pad tracks a captured finger. */
body.handheld-shell .dpad{isolation:isolate;touch-action:none;user-select:none;-webkit-user-select:none;gap:0}
body.handheld-shell .dpad::before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(135deg,#49494d,#202024 70%);clip-path:polygon(34% 0,66% 0,66% 34%,100% 34%,100% 66%,66% 66%,66% 100%,34% 100%,34% 66%,0 66%,0 34%,34% 34%);filter:drop-shadow(0 3px 2px #0008);pointer-events:none}
body.handheld-shell .dpad button{background:linear-gradient(135deg,#ffffff09,#0002);border:1px solid #ffffff12;border-radius:5px;box-shadow:inset 1px 1px 2px #ffffff18;color:#85858b;text-shadow:0 1px #000;font-size:18px;touch-action:none}
body.handheld-shell .dpad button.is-pressed{background:#111116;box-shadow:inset 0 2px 5px #000a;color:#d6d6df}
body.handheld-shell .dpad::after{content:'';grid-area:2/2;width:48%;height:48%;align-self:center;justify-self:center;border-radius:50%;border:3px solid #17171c;background:radial-gradient(circle,#39393f 35%,#222227 70%);box-shadow:0 1px 1px #ffffff25;pointer-events:none}
/* Desktop workspace: keep these rules isolated from the handheld surface. */
body.handheld-shell .dpad .dpad-diagonal{width:72%;height:72%;min-height:0;min-width:0;align-self:center;justify-self:center;border-radius:12px;border:1px solid #ffffff18;background:#24242b88;box-shadow:inset 0 1px 1px #ffffff12;color:#9999a6;font-size:20px;padding:0}
body.handheld-shell .dpad .dpad-diagonal.is-pressed{background:#111116;color:#eeeef6;border-color:#b5b5cc;box-shadow:inset 0 2px 4px #0008}
body.handheld-shell .dpad .up-left{grid-area:1/1}
body.handheld-shell .dpad .up-right{grid-area:1/3}
body.handheld-shell .dpad .down-left{grid-area:3/1}
body.handheld-shell .dpad .down-right{grid-area:3/3}
/* Approved silver, bevelled directional keys. Preserve the pad's responsive footprint. */
body.handheld-shell .dpad{filter:none}
body.handheld-shell .dpad::before,body.handheld-shell .dpad::after{display:none}
body.handheld-shell .dpad button[data-bit]{position:absolute;grid-area:auto;width:34%;height:43%;min-height:0;min-width:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;--key-shape:polygon(12% 0,88% 0,100% 10%,100% 65%,94% 74%,57% 98%,50% 100%,43% 98%,6% 74%,0 65%,0 10%);filter:drop-shadow(0 2px 1px #08090fd9) drop-shadow(2px 5px 4px #08090f99)}
body.handheld-shell .dpad button[data-bit]::before{content:'';position:absolute;inset:0;clip-path:var(--key-shape);background:linear-gradient(145deg,#656773,#2d2f38 45%,#14151d);pointer-events:none}
body.handheld-shell .dpad .dpad-face{display:flex;justify-content:center;align-items:flex-start;padding-top:26%;position:absolute;inset:3px 3px 6px;background:linear-gradient(150deg,#fff,#e9eaed 8%,#d5d6d9 42%,#a7a9b1 90%,#777a86);clip-path:var(--key-shape);box-shadow:inset 0 3px 2px #ffffffed,inset 3px 0 3px #ffffff7a,inset -3px -6px 5px #41465266;color:#8d909a;text-shadow:0 1px 1px #fff;font:24px/1 Arial,sans-serif;pointer-events:none}
body.handheld-shell .dpad .dpad-face::after{content:'';position:absolute;inset:5px 5px 10px;clip-path:var(--key-shape);background:linear-gradient(140deg,#ffffff52,transparent 35%,#ffffff08 70%,#0000000d);pointer-events:none}
body.handheld-shell .dpad button[data-bit].is-pressed .dpad-face{background:linear-gradient(145deg,#b7bac3,#9397a2);color:#525360;box-shadow:inset 0 3px 6px #36394466,inset 1px 0 2px #ffffff52}
body.handheld-shell .dpad .up{inset:0 auto auto 33%;transform:none}
body.handheld-shell .dpad .down{inset:auto auto 0 33%;transform:rotate(180deg)}
body.handheld-shell .dpad .left{inset:28.5% auto auto 4.5%;transform:rotate(-90deg)}
body.handheld-shell .dpad .right{inset:28.5% 4.5% auto auto;transform:rotate(90deg)}
body.handheld-shell .dpad .dpad-diagonal{position:absolute;grid-area:auto;width:20%;height:20%;border:0;border-radius:50%;background:#25263360;color:#858698;box-shadow:none;font-size:16px;transform:none}
body.handheld-shell .dpad .up-left{left:3%;top:3%}
body.handheld-shell .dpad .up-right{right:3%;top:3%}
body.handheld-shell .dpad .down-left{left:3%;bottom:3%}
body.handheld-shell .dpad .down-right{right:3%;bottom:3%}
body.handheld-shell .dpad .dpad-diagonal.is-pressed{background:#777889;color:#fff}
/* Scale control lettering with the mobile viewport, including Turbo's em-sized bolt. */
@media(max-width:760px), (max-width:1000px) and (pointer:coarse), (orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.handheld-shell .gamepad .ab button{font-size:clamp(18px,6vmin,29px);line-height:1;display:flex;align-items:center;justify-content:center;padding:0}
 body.handheld-shell .gamepad .center-buttons>div:first-child button{font-size:clamp(16px,5vmin,23px);line-height:1}
}
/* Matching silver A/B and Turbo faces; no rotation change on press. */
body.handheld-shell .gamepad .ab button,
body.handheld-shell .gamepad .ab .turbo-row button:active{background:linear-gradient(145deg,#f1f1ef 0%,#d9d9d7 45%,#bdbfbe 100%)!important;color:#919590;border:5px solid #193b55;border-radius:50%;font-weight:500;text-shadow:0 1px 1px #ffffff9c;--ab-edge-shadow:inset 0 0 0 1px #f9faf3bd,inset 2px 3px 3px #ffffffdb,inset -3px -4px 4px #606a6873,0 0 0 2px #12324d,0 2px 0 2px #09263e,2px 5px 5px #071b3280;box-shadow:var(--ab-edge-shadow);transform:rotate(30deg);transition:none}
body.handheld-shell .gamepad .ab button.is-pressed,
body.handheld-shell .gamepad .ab .turbo-row button.is-pressed{background:linear-gradient(145deg,#bfc3c1,#a5aaa8)!important;color:#686f6d;filter:none;box-shadow:var(--ab-edge-shadow);transform:rotate(30deg)}
@media(min-width:761px) and (pointer:fine), (min-width:1001px) and (min-height:601px){
 body.handheld-shell{background:var(--pc-bg,#080e1c);color:#e6edff}
 body.handheld-shell .shell{max-width:1500px;padding:24px 32px;margin:auto}
 body.handheld-shell .topbar{background:var(--pc-panel,#111b2e);border:1px solid var(--pc-border,#2a3853);border-radius:20px;box-shadow:0 8px 24px #0002;padding:20px 24px;margin:0 0 24px;gap:20px}
 body.handheld-shell .brand{color:#edf3ff}.brand small{color:#95a7ca}
 body.handheld-shell .brand-mark{background:#344d91;border:1px solid #637bb7;box-shadow:none;border-radius:12px}
 body.handheld-shell .badge{background:#14223b;color:#bccce9;border:1px solid #2c4064;padding:7px 14px;font-size:12px;max-width:50%;overflow-wrap:anywhere}
 body.handheld-shell main{grid-template-columns:minmax(0,1fr) 288px;gap:24px}
 body.handheld-shell .player.panel{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:'title' 'toolbar' 'screen' 'status' 'display' 'extras' 'save';gap:16px;padding:24px;background:var(--pc-panel,#111b2e);border:1px solid var(--pc-border,#2a3853);border-radius:20px;box-shadow:0 16px 48px #0003}
 body.handheld-shell .player>.heading{grid-area:title;margin:0;align-items:center;gap:14px}
 body.handheld-shell .player>.heading .eyebrow{display:block;color:#879dc8;letter-spacing:.16em;font-size:10px;margin:0 0 5px}
 body.handheld-shell #gameName{font-size:clamp(18px,1.8vw,26px);line-height:1.4;color:#f0f4ff;overflow-wrap:anywhere;margin:0}
 body.handheld-shell .tag{background:#203353;color:#b8cbf2;border:1px solid #3c5278;border-radius:7px;padding:4px 9px}
 body.handheld-shell .toolbar{grid-area:toolbar;display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 20px;padding:0;margin:0;background:none;border:0;box-shadow:none}
 body.handheld-shell .toolbar .tool-group{flex:1 1 225px;margin:0}
 body.handheld-shell .tool-group-label{display:block;color:#91a4c8;font-size:11px;letter-spacing:.04em}
 body.handheld-shell .tool-group-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 body.handheld-shell .toolbar>[data-game-audio]{margin-left:auto;flex:0 0 auto}
 body.handheld-shell .shell button,body.handheld-shell .shell select{background:var(--pc-button,#1b2b46);border:1px solid #364b70;color:#dbe7ff;border-radius:10px;box-shadow:none;min-height:42px;font-size:13px;padding:8px 12px;transition:background .15s,border-color .15s}
 body.handheld-shell .shell button.primary{background:var(--pc-accent,#4968c5);border-color:#6583dc;color:#fff}
 body.handheld-shell .shell button:hover:not(:disabled){background:var(--pc-hover,#2c426b);border-color:#7695d2;box-shadow:none}
 body.handheld-shell .shell button.primary:hover:not(:disabled){background:var(--pc-hover,#5779d8)}
 body.handheld-shell .shell button:disabled{opacity:1;background:#162136;border-color:#24334d;color:#687a99;box-shadow:none}
 body.handheld-shell .shell button:focus-visible,body.handheld-shell .shell select:focus-visible{outline:2px solid #9ebcff;outline-offset:3px}
 body.handheld-shell .player>.frame{grid-area:screen;margin:0;padding:10px;background:#060b15;border:1px solid #314264;border-radius:13px;box-shadow:none;overflow:hidden}
 body.handheld-shell .frame .screen{border:0;border-radius:6px;background:#030710;aspect-ratio:3/2}
 body.handheld-shell .frame-foot{color:#7d94bd;font-size:10px;letter-spacing:.06em;padding:8px 4px 0;gap:12px}
 body.handheld-shell #empty{background:radial-gradient(ellipse at top,var(--pc-glow,#243962),#0b1427 75%);color:#e5eeff}
 body.handheld-shell #empty h2{font-size:26px;color:#eff4ff;margin:0 0 8px}
 body.handheld-shell #empty p{color:#a6b8d9;margin:0 0 24px;font-size:14px}
 body.handheld-shell #openEmpty{background:var(--pc-accent,#4968c5);border-color:#6583dc;color:#fff;min-width:180px}
 body.handheld-shell .statusbar{grid-area:status;margin:0;gap:12px;font-size:11px;line-height:1.6;color:#92a8cc;align-items:flex-start}
 body.handheld-shell #playState{color:#83d7bd;white-space:nowrap}
 body.handheld-shell .screen-tools{grid-area:display;display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;padding:14px 0 0;margin:0;border:0;border-top:1px solid #293953;background:none;border-radius:0}
 body.handheld-shell .screen-tools label{color:#9cb0d1;font-size:12px}
 body.handheld-shell .screen-tools select{min-width:125px}
 body.handheld-shell .pc-extra-tools{grid-area:extras;display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:8px;margin:0}
 body.handheld-shell .pc-extra-tools button{min-height:84px;white-space:normal;line-height:1.4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px 8px}
 body.handheld-shell .pc-extra-tools .pc-tool-icon{display:block;font:700 28px/1 Arial,sans-serif;color:inherit;pointer-events:none}
 body.handheld-shell .pc-extra-tools [data-open-cheats]::before{content:'✦';font:700 28px/1 Arial,sans-serif}
 body.handheld-shell .toolbar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:76px}
 body.handheld-shell .toolbar button::before{font:700 25px/1 Arial,sans-serif}
 body.handheld-shell #open .tool-icon{display:none}
 body.handheld-shell #open::before{content:'＋'}
 body.handheld-shell #import::before{content:'↓'}
 body.handheld-shell #saveAs::before{content:'▣'}
 body.handheld-shell #pause::before{content:'Ⅱ'}
 body.handheld-shell #reset::before{content:'↻'}
 body.handheld-shell #fullscreen::before{content:'⛶'}
 body.handheld-shell .toolbar>[data-game-audio]::before{content:'♪'}
 body.handheld-shell[data-pc-theme="classic"]{--pc-bg:#d0d0db!important;--pc-panel:#e7e7ee!important;--pc-button:#f2f2f7!important;--pc-border:#b5b5c5!important;--pc-accent:#983f67!important;--pc-hover:#dddde9!important;--pc-glow:#bdbecb!important;color:#343448}
 body.handheld-shell[data-pc-theme="classic"] .shell :is(h1,h2,.brand,.brand small,.eyebrow,.tool-group-label,.screen-tools label,.statusbar,.note,footer,.frame-foot){color:#55556c}
 body.handheld-shell[data-pc-theme="classic"] .shell :is(button,select){color:#343448;border-color:#b5b5c5}
 body.handheld-shell[data-pc-theme="classic"] .shell :is(button.primary,#openEmpty){color:#fff}
 body.handheld-shell[data-pc-theme="classic"] .shell button:disabled{background:#d5d5df;color:#9292a4;border-color:#c5c5d0}
 body.handheld-shell[data-pc-theme="classic"] .shell :is(.badge,.tag,.sidebar-room){background:#dcdce7;color:#49495f;border-color:#b5b5c5}
 body.handheld-shell[data-pc-theme="classic"] .sidebar-room :is(p,small){color:#55556c}
 body.handheld-shell[data-pc-theme="classic"] .shell button.primary:hover:not(:disabled){background:#803453;color:#fff}
 body.handheld-shell[data-pc-theme="classic"] #gameName{color:#343448}
 body.handheld-shell[data-pc-theme="classic"] #autoSaveStatus,body.handheld-shell[data-pc-theme="classic"] #playState{color:#356453}
 body.handheld-shell #autoSaveStatus{grid-area:save;margin:0;font-size:12px;color:#94c9b9;overflow-wrap:anywhere}
 body.handheld-shell aside{display:grid;gap:16px;align-content:start}
 body.handheld-shell aside>.panel{background:var(--pc-panel,#111b2e);border:1px solid var(--pc-border,#2a3853);border-radius:16px;padding:20px;box-shadow:none}
 body.handheld-shell aside h2{font-size:17px;color:#e5eeff;margin:0 0 12px}
 body.handheld-shell aside .note{color:#94a9cc;font-size:12px;line-height:1.7}
 body.handheld-shell aside .two-buttons{gap:8px;margin-top:18px}
 body.handheld-shell .sidebar-room{background:#17263f;border:1px solid #304363;border-radius:12px;padding:14px;margin-top:12px;color:#e0eaff}
 body.handheld-shell .sidebar-room p,body.handheld-shell .sidebar-room small{color:#9bb0d3;overflow-wrap:anywhere;font-size:12px}
 body.handheld-shell .sidebar-room button{width:100%;margin-top:10px}
 body.handheld-shell footer{color:#7186a8;font-size:11px;line-height:1.8;padding:20px 2px}
}
@media(min-width:761px) and (max-width:1100px) and (pointer:fine){body.handheld-shell .shell{padding:18px}body.handheld-shell main{grid-template-columns:minmax(0,1fr) 240px;gap:16px}body.handheld-shell .player.panel{padding:18px}body.handheld-shell aside>.panel{padding:16px}}

/* Shared DS-style desktop surfaces. Handheld layout and controls stay unchanged. */
.screen-tools .pc-volume-control{display:none}
@media (min-width:761px) and (pointer:fine),(min-width:1001px) and (min-height:601px){
 body.handheld-shell[data-pc-theme]{background:repeating-linear-gradient(90deg,var(--pc-bg,#0b121c) 0 5px,color-mix(in srgb,var(--pc-bg,#0b121c),#564731 12%) 5px 11px)!important}
 body.handheld-shell[data-pc-theme="night"]{--pc-bg:#0b121c!important;--pc-panel:#142238!important;--pc-button:#20344e!important;--pc-border:#49617f!important;--pc-accent:#365c92!important;--pc-hover:#416ca5!important;--ui-shadow:#060c16}
 body.handheld-shell .shell{max-width:1600px;padding:20px;margin:auto}
 body.handheld-shell main{grid-template-columns:minmax(0,1fr) 280px;gap:24px}
 body.handheld-shell[data-pc-theme] :is(.topbar,.player.panel,aside>.panel){border:1px solid var(--pc-border)!important;border-radius:22px;padding:24px;box-shadow:0 4px 0 var(--ui-shadow)!important}
 body.handheld-shell .topbar{margin-bottom:24px;gap:18px}
 body.handheld-shell .brand strong{font-size:24px}
 body.handheld-shell .brand small{font-size:11px;letter-spacing:2px}
 body.handheld-shell .player.panel{grid-template-areas:'title' 'toolbar' 'screen' 'status' 'extras' 'display' 'save';gap:18px}
 body.handheld-shell .player>.heading .eyebrow{font-size:11px;letter-spacing:2px;margin-bottom:8px}
 body.handheld-shell #gameName{font-size:25px}
 body.handheld-shell .tag{border-radius:30px;padding:8px 12px;font-size:12px}
 body.handheld-shell .toolbar{gap:10px;align-items:stretch}
 body.handheld-shell .toolbar .tool-group{flex:1 1 240px}
 body.handheld-shell .tool-group-label{display:none}
 body.handheld-shell .tool-group-buttons{gap:10px}
 body.handheld-shell .toolbar>[data-game-audio]{display:none!important}
 body.handheld-shell[data-pc-theme] .shell :is(button,.home-link){border-radius:12px;min-height:46px;padding:12px 16px;font-size:14px;font-weight:600;box-shadow:0 3px 0 var(--ui-shadow)!important}
 body.handheld-shell[data-pc-theme] .shell :is(button,.home-link):hover:not(:disabled){box-shadow:0 3px 0 var(--ui-shadow)!important}
 body.handheld-shell[data-pc-theme] .shell button:active:not(:disabled){transform:translateY(2px);box-shadow:none!important}
 body.handheld-shell[data-pc-theme] .shell button:disabled{box-shadow:none!important;opacity:.45}
 body.handheld-shell .toolbar button{min-height:48px;padding:12px 8px;flex-direction:row;gap:6px;white-space:nowrap}
 body.handheld-shell .toolbar button::before{font-size:16px}
 body.handheld-shell .player>.frame{border:8px solid #060b10!important;padding:0;border-radius:16px;background:#060b10!important}
 body.handheld-shell .frame .screen{border-radius:8px;background:#000}
 body.handheld-shell .frame-foot{padding:9px 8px;font-size:11px}
 body.handheld-shell #empty{background:var(--pc-bg,#0b121c)!important}
 body.handheld-shell #empty .launch-actions{width:min(400px,90%);max-width:100%;gap:14px}
 body.handheld-shell #empty :is(#openEmpty,.launch-actions>button){min-height:52px;border-radius:14px}
 body.handheld-shell .pc-extra-tools{display:flex;flex-wrap:wrap;gap:10px;border-top:1px solid var(--pc-border);padding-top:18px}
 body.handheld-shell .pc-extra-tools button{flex:0 1 auto;min-height:46px;flex-direction:row;gap:7px;padding:12px 16px}
 body.handheld-shell .pc-extra-tools .pc-tool-icon,body.handheld-shell .pc-extra-tools [data-open-cheats]::before{font-size:17px}
 body.handheld-shell .screen-tools{justify-content:flex-start;border-top:0;padding-top:0;gap:12px 18px}
 body.handheld-shell .screen-tools label{font-size:14px}
 body.handheld-shell .screen-tools select{min-width:76px;width:auto;border-radius:12px;min-height:44px}
 body.handheld-shell .screen-tools .pc-volume-control{display:flex;align-items:center;gap:10px;margin:0}
 body.handheld-shell[data-pc-theme] .shell #pcVolume{appearance:auto;width:110px;min-width:80px;min-height:24px;height:24px;padding:0;margin:0;border:0!important;background:transparent!important;box-shadow:none!important;accent-color:var(--pc-accent);cursor:pointer}
 body.handheld-shell .pc-volume-control output{font-size:12px;min-width:34px;font-variant-numeric:tabular-nums}
 body.handheld-shell aside{gap:20px}
 body.handheld-shell[data-pc-theme] aside>.panel{padding:20px}
 body.handheld-shell aside h2{font-size:19px}
 body.handheld-shell aside .note{font-size:14px;line-height:1.8}
}

/* Match DS interface typography without changing control sizing or icon faces. */
body.handheld-shell main{grid-template-columns:minmax(0,1fr)}
/* PC workstation: keep the game prominent and group secondary actions. */
@media (min-width:761px) and (pointer:fine){
 body.handheld-shell .shell{max-width:1440px;padding:clamp(16px,2.5vw,36px)}
 body.handheld-shell .player.panel{gap:14px;align-items:start}
 body.handheld-shell .player>.heading{margin:0;padding-bottom:12px;border-bottom:1px solid var(--pc-border);align-items:center}
 body.handheld-shell .toolbar{margin:0;gap:12px}
 body.handheld-shell .toolbar .tool-group-label{display:block;margin:0 0 7px;font-size:12px;font-weight:700;color:inherit}
 body.handheld-shell .toolbar .tool-group{min-width:0}
 body.handheld-shell .toolbar .tool-group-buttons{gap:6px}
 body.handheld-shell .toolbar button{white-space:normal;line-height:1.25}
 body.handheld-shell .screen-tools{padding:12px;border:1px solid var(--pc-border);border-radius:12px;gap:10px}
 body.handheld-shell .pc-extra-tools{padding:12px;border:1px solid var(--pc-border);border-radius:12px;gap:8px}
 body.handheld-shell .pc-extra-tools button{flex:1 1 135px;justify-content:flex-start}
 body.handheld-shell .statusbar{margin:0;min-height:0;align-items:center}
 body.handheld-shell[data-pc-theme="nonplae"] .player>.frame{border-color:#2f4729!important;background:#2f4729!important}
 body.handheld-shell[data-pc-theme="nonplae"] .player :is(.screen-tools,.pc-extra-tools){background:#fae8c7}
 body.handheld-shell[data-pc-theme="nonplae"] .player>.heading .eyebrow{color:#765438}
}
@media (min-width:1080px) and (pointer:fine){
 body.handheld-shell .player.panel{
  grid-template-columns:minmax(0,1fr) minmax(290px,340px);
  grid-template-rows:auto auto auto auto auto auto auto;
  grid-template-areas:'title title' 'screen files' 'screen extras' 'screen play' 'screen display' 'status status' 'save save';
  column-gap:22px;
 }
 body.handheld-shell .toolbar{display:contents}
 body.handheld-shell .toolbar .tool-group[aria-label="ไฟล์เกม"]{grid-area:files}
 body.handheld-shell .toolbar .tool-group[aria-label="การเล่น"]{grid-area:play}
 body.handheld-shell .toolbar .tool-group{flex:0 0 auto;width:100%}
 body.handheld-shell .screen-tools .pc-volume-control{flex:1 0 100%}
 body.handheld-shell .screen-tools .pc-volume-control input{flex:1}
}
/* Nonplae PC: parchment workspace, forest masthead and framed controls. */
@media (min-width:761px) and (pointer:fine){
 body.handheld-shell[data-pc-theme] .topbar{border:2px solid var(--pc-border)!important;border-radius:14px}
 body.handheld-shell[data-pc-theme] .player.panel{border:2px solid var(--pc-border)!important;border-radius:15px}
 body.handheld-shell[data-pc-theme] .player>.heading{
  background:color-mix(in srgb,var(--pc-panel),var(--pc-button) 35%);
  border:1px dashed var(--pc-border);border-radius:10px;padding:12px 16px;
 }
 body.handheld-shell[data-pc-theme] .player :is(.tool-group,.screen-tools,.pc-extra-tools){
  background:color-mix(in srgb,var(--pc-panel),var(--pc-button) 45%);
  border:1px solid var(--pc-border);border-radius:11px;padding:10px;
 }
 body.handheld-shell[data-pc-theme="nonplae"]{
  background:radial-gradient(ellipse 680px 380px at 50% 0%,#c9954238 0%,#a36c1f12 58%,transparent 100%),repeating-linear-gradient(90deg,var(--pc-bg,#191710) 0 5px,color-mix(in srgb,var(--pc-bg,#191710),#564731 12%) 5px 11px)!important;
 }
 body.handheld-shell[data-pc-theme="nonplae"] .topbar{
  background:linear-gradient(115deg,#304b30,#1e3225)!important;
  border:2px solid #795230!important;border-radius:14px;
  box-shadow:0 3px 0 #694729,inset 0 0 0 1px #d9ac6466!important;
 }
 body.handheld-shell[data-pc-theme="nonplae"] .topbar :is(.brand,.brand strong,.home-link){color:#fff0ce!important}
 body.handheld-shell[data-pc-theme="nonplae"] .topbar .brand small{color:#e3c58c!important}
 body.handheld-shell[data-pc-theme="nonplae"] .topbar :is(.badge,.home-link){background:#3d5837!important;border-color:#a68952!important;color:#fff0ce!important}
 body.handheld-shell[data-pc-theme="nonplae"] .topbar .home-link:hover{background:#506b43!important}
 body.handheld-shell[data-pc-theme="nonplae"] .player.panel{
  background:linear-gradient(145deg,#fff1d3,#f4dfb7)!important;
  border:2px solid #ad7748!important;border-radius:15px;
  box-shadow:0 3px 0 #80543526,inset 0 0 0 1px #fff9e4!important;
 }
 body.handheld-shell[data-pc-theme="nonplae"] .player>.heading{
  background:#f8e8c7;border:1px dashed #ad7748;border-radius:10px;padding:12px 16px;
 }
 body.handheld-shell[data-pc-theme="nonplae"] .player :is(.tool-group,.screen-tools,.pc-extra-tools){
  background:#fff1d6;border:1px solid #c9a574;border-radius:11px;padding:10px;
 }
 body.handheld-shell[data-pc-theme="nonplae"] .player .toolbar .tool-group{box-sizing:border-box}
 body.handheld-shell[data-pc-theme="nonplae"] .player button:not(.primary):not([data-bit]):not(:disabled){background:#fff8e9;border-color:#be9668;color:#2f4729}
 body.handheld-shell[data-pc-theme="nonplae"] .player button:not(.primary):not([data-bit]):hover:not(:disabled){background:#f6e0b4}
 body.handheld-shell[data-pc-theme="nonplae"] .player button.primary{background:#3b5b35;border-color:#2e4729;color:#fff4db}
 body.handheld-shell[data-pc-theme="nonplae"] .player button.primary:hover{background:#496c40}
 body.handheld-shell[data-pc-theme="nonplae"] .player .tag{background:#3b5b35;color:#fff4db;border-color:#2e4729}
 body.handheld-shell[data-pc-theme="nonplae"] .player #empty{
  background:radial-gradient(ellipse at 50% 30%,#496544,#1e3225)!important;
 }
 body.handheld-shell[data-pc-theme="nonplae"] footer{color:#65482e}
}
.translation-modes{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}
.translation-modes button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:62px}
.translation-modes button span{font-size:12px;font-weight:400;opacity:.75}
.translation-modes button[aria-pressed="true"]{outline:2px solid currentColor;outline-offset:2px}
#translationLocalPanel[hidden],#translationOnlinePanel[hidden]{display:none}
.translation-model-hint,.translation-local-status{font-size:13px;line-height:1.65;margin:10px 0}
.translation-local-status{padding:10px 12px;border:1px dashed currentColor;border-radius:10px;opacity:.8;overflow-wrap:anywhere}
#localModelProgress{width:100%;height:12px;margin-top:16px;accent-color:var(--pc-accent,#365c92)}
#localModelProgress[hidden]{display:none}
body .tag,body .frame-foot,body #translationPromptText,
body.editing-pad .pad-drag-bar,body.editing-pad .save-pad-layout{font-family:'Chakra Petch',sans-serif}
/* Support artwork keeps its warm paper frame on desktop and mobile. */
body #supportDialog{width:min(520px,calc(100vw - 24px));max-height:94dvh;padding:16px!important;background:#fff5df!important;color:#314d39!important;border:2px solid #bb8b47!important;border-radius:20px!important;box-shadow:0 18px 60px #0005!important;box-sizing:border-box}
body #supportDialog .heading{position:static;background:transparent!important;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0!important;margin:0 0 14px!important;border:0!important}
body #supportDialog #supportTitle{font:500 10px/1.5 Tahoma,sans-serif!important;letter-spacing:2px;color:#ad793f!important;margin:0}
body #supportDialog #supportClose{display:grid;place-items:center;min-height:36px;width:36px;height:36px;padding:0!important;border-radius:50%!important;background:#f0e6ca!important;color:#36523f!important;border:1px solid #c6a565!important;box-shadow:none!important;font:24px/1 Tahoma,sans-serif!important}
body #supportDialog .support-image{display:block;width:100%;height:auto;border-radius:10px;object-fit:contain}
body #supportDialog .support-caption{color:#837c65!important;text-align:center;font-size:12px;line-height:1.8;margin:14px 0}
body #supportDialog .support-download{display:block;text-align:center;text-decoration:none;min-height:46px;padding:12px;border-radius:10px;background:#31583e!important;color:#fff3d4!important;font-weight:700;line-height:1.5}
body #supportDialog .support-download:hover{background:#416d4e!important}
body #supportDialog :is(button,a):focus-visible{outline:3px solid #bd8e48!important;outline-offset:3px}

/* Keep menu controls in their own layout; no invisible absolute hit targets. */
#mobileSettings .mobile-menu-title{overflow:hidden}
#mobileSettings #mobileCloseGame{position:static;margin-top:12px}
.mobile-ai-bar{display:none}
@media(max-width:760px) and (orientation:portrait),(max-width:1000px) and (pointer:coarse) and (orientation:portrait),(max-width:760px) and (max-height:600px) and (orientation:landscape),(pointer:coarse) and (max-height:600px) and (orientation:landscape){
 .mobile-ai-bar{position:absolute;bottom:0;left:4px;height:36px;display:flex;align-items:center;gap:3px;z-index:2}
 body.handheld-shell .mobile-ai-bar button{height:32px;min-height:32px;min-width:32px;padding:0 5px;border:0;border-radius:8px;background:#bfc1cc;color:#333d50;box-shadow:none;font:700 12px/1 Arial,sans-serif;touch-action:manipulation}
 body.handheld-shell .mobile-ai-bar .ai-reread{font-size:23px}
 body.handheld-shell .mobile-ai-bar .ai-switch{display:flex;align-items:center;gap:4px}
 .ai-switch i{display:block;width:25px;height:15px;border-radius:10px;background:#777c89;padding:2px}
 .ai-switch i::after{content:'';display:block;width:11px;height:11px;border-radius:50%;background:white;transition:transform .15s}
 .ai-switch[aria-checked=true] i{background:#347348}
 .ai-switch[aria-checked=true] i::after{transform:translateX(10px)}
 .mobile-ai-bar button:disabled{opacity:.4}
}

#mobileSettings .mobile-sheet-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#mobileSettings .mobile-sheet-heading>span{margin-right:auto}
#mobileSettings .mobile-sheet-heading #mobileSupport{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:6px 12px;border:1px solid #536887;border-radius:12px;background:#1c2a4a;color:#edf2ff;font-size:13px;line-height:1.3;box-shadow:none;white-space:nowrap}
#mobileSettings .mobile-sheet-heading #mobileSupport span{font-size:20px;line-height:1}

#mobileSettings .mobile-sheet-heading #mobileSupport{margin-right:auto}

/* Smooth vector action tiles: shared geometry and individual accent colors. */
#mobileSettings .mobile-settings-grid{gap:10px}
#mobileSettings .mobile-settings-grid button[data-menu-icon]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:108px;padding:12px 5px;border:1px solid #ffffff19;border-radius:18px;background:linear-gradient(145deg,#24334d,#19253b);color:#eef3fc;box-shadow:inset 0 1px 0 #ffffff09,0 3px 9px #0002;font-size:12px;font-weight:600;line-height:1.35;text-align:center;transition:transform .15s,border-color .15s,background .15s}
#mobileSettings .mobile-settings-grid button[data-menu-icon]::before{content:'';display:block;flex:none;width:42px;height:42px;background:var(--menu-art) center/contain no-repeat;image-rendering:auto;filter:drop-shadow(0 2px 5px #0002)}
#mobileSettings .mobile-settings-grid button[data-menu-icon]>span{font-size:inherit;line-height:inherit}
#mobileSettings .mobile-settings-grid button[data-menu-icon]:disabled{color:#8492a9;background:#1c283c;border-color:#ffffff10;opacity:1;box-shadow:none}
#mobileSettings .mobile-settings-grid button[data-menu-icon]:disabled::before{opacity:.45;filter:saturate(.45)}
#mobileSettings .mobile-settings-grid button[data-menu-icon]:active:not(:disabled){transform:scale(.96)}
#mobileSettings .mobile-settings-grid button[data-menu-icon]:focus-visible{outline:2px solid var(--menu-accent);outline-offset:3px}
#mobileSettings .mobile-settings-grid button[data-menu-icon][aria-checked=true]{border-color:#d8b871;background:linear-gradient(145deg,#3b3b40,#292e3d)}
@media(max-width:380px){#mobileSettings .mobile-settings-grid{gap:7px}#mobileSettings .mobile-settings-grid button[data-menu-icon]{font-size:11px;min-height:100px;gap:8px}#mobileSettings .mobile-settings-grid button[data-menu-icon]::before{width:38px;height:38px}}
#mobileSettings button[data-menu-icon="library"]{--menu-accent:#9cafff;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%239cafff%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%239cafff%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%229%22%20y%3D%2212%22%20width%3D%2212%22%20height%3D%2226%22%20rx%3D%223%22%2F%3E%3Crect%20x%3D%2225%22%20y%3D%229%22%20width%3D%2212%22%20height%3D%2229%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22M6%2042h36M13%2018h4m12-3h4%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
#mobileSettings button[data-menu-icon="save"]{--menu-accent:#ad9bff;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%23ad9bff%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%23ad9bff%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%207h22l7%207v24a3%203%200%200%201-3%203H10a3%203%200%200%201-3-3V12a5%205%200%200%201%205-5Z%22%2F%3E%3Cpath%20d%3D%22M15%207v12h17V7M15%2041V28h18v13M27%2011v4%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
#mobileSettings button[data-menu-icon="load"]{--menu-accent:#6ed7b5;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%236ed7b5%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%236ed7b5%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7%2023V14a4%204%200%200%201%204-4h9l5%205h12a4%204%200%200%201%204%204v18a4%204%200%200%201-4%204H11a4%204%200%200%201-4-4Z%22%2F%3E%3Cpath%20d%3D%22M24%2021v13m-5-5%205%205%205-5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
#mobileSettings button[data-menu-icon="shader"]{--menu-accent:#7fcfff;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%237fcfff%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%237fcfff%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%226%22%20y%3D%228%22%20width%3D%2236%22%20height%3D%2227%22%20rx%3D%225%22%2F%3E%3Cpath%20d%3D%22M17%2042h14m-7-7v7M12%2027l8-9%207%207%209-11%22%2F%3E%3Ccircle%20cx%3D%2233%22%20cy%3D%2215%22%20r%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
#mobileSettings button[data-menu-icon="theme"]{--menu-accent:#f5a6cb;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%23f5a6cb%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%23f5a6cb%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M24%206C13%206%206%2014%206%2024s8%2018%2018%2018c5%200%206-3%204-6s0-6%204-6h4c5%200%207-3%206-8C40%2012%2033%206%2024%206Z%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2216%22%20r%3D%222%22%2F%3E%3Ccircle%20cx%3D%2227%22%20cy%3D%2213%22%20r%3D%222%22%2F%3E%3Ccircle%20cx%3D%2235%22%20cy%3D%2220%22%20r%3D%222%22%2F%3E%3Ccircle%20cx%3D%2213%22%20cy%3D%2227%22%20r%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
#mobileSettings button[data-menu-icon="controls"]{--menu-accent:#7ed9cd;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%237ed9cd%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%237ed9cd%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%207v34M24%207v34M36%207v34%22%2F%3E%3Crect%20x%3D%227%22%20y%3D%2213%22%20width%3D%2210%22%20height%3D%228%22%20rx%3D%223%22%2F%3E%3Crect%20x%3D%2219%22%20y%3D%2228%22%20width%3D%2210%22%20height%3D%228%22%20rx%3D%223%22%2F%3E%3Crect%20x%3D%2231%22%20y%3D%2215%22%20width%3D%2210%22%20height%3D%228%22%20rx%3D%223%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
#mobileSettings button[data-menu-icon="turbo"]{--menu-accent:#ffd27d;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%23ffd27d%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%23ffd27d%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m27%205-17%2023h12l-1%2015%2017-24H26Z%22%2F%3E%3Cpath%20d%3D%22M7%2012h7M4%2019h6M34%2035h7%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
#mobileSettings button[data-menu-icon="camera"]{--menu-accent:#9eb9ff;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%239eb9ff%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%239eb9ff%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m17%2010%203-4h8l3%204h7a5%205%200%200%201%205%205v22a5%205%200%200%201-5%205H10a5%205%200%200%201-5-5V15a5%205%200%200%201%205-5Z%22%2F%3E%3Ccircle%20cx%3D%2224%22%20cy%3D%2226%22%20r%3D%229%22%2F%3E%3Cpath%20d%3D%22M35%2016h2%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
#mobileSettings button[data-menu-icon="cheat"]{--menu-accent:#d4a1ff;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%23d4a1ff%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%23d4a1ff%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m10%2038%2022-22%206%206-22%2022Zm17-17%206%206M13%205l2%206%206%202-6%202-2%206-2-6-6-2%206-2ZM37%204v6m-3-3h6%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
#mobileSettings button[data-menu-icon="controller"]{--menu-accent:#8edac3;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%238edac3%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%238edac3%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%2012h16c7%200%209%207%2011%2018s-5%2013-10%205l-3-4H18l-3%204C10%2043%203%2041%205%2030s4-18%2011-18Z%22%2F%3E%3Cpath%20d%3D%22M15%2018v10m-5-5h10%22%2F%3E%3Ccircle%20cx%3D%2233%22%20cy%3D%2220%22%20r%3D%222%22%2F%3E%3Ccircle%20cx%3D%2237%22%20cy%3D%2226%22%20r%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
#mobileSettings button[data-menu-icon="fullscreen"]{--menu-accent:#88d7f4;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%2388d7f4%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%2388d7f4%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%207H9a2%202%200%200%200-2%202v9m23-11h9a2%202%200%200%201%202%202v9M7%2030v9a2%202%200%200%200%202%202h9m12%200h9a2%202%200%200%200%202-2v-9%22%2F%3E%3Crect%20x%3D%2215%22%20y%3D%2215%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%224%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
#mobileSettings button[data-menu-icon="menu"]{--menu-accent:#efc58d;--menu-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22%23efc58d%22%20fill-opacity%3D%22.12%22%20stroke%3D%22%23efc58d%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%227%22%20y%3D%227%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%224%22%2F%3E%3Crect%20x%3D%2227%22%20y%3D%227%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%224%22%2F%3E%3Crect%20x%3D%227%22%20y%3D%2227%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%224%22%2F%3E%3Cpath%20d%3D%22M41%2034H27m6-6-6%206%206%206%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}

#mobileSettings .pause-mark{width:80px;height:80px;background:transparent;box-shadow:none;border-radius:0;overflow:visible;margin-bottom:16px} #mobileSettings .pause-mark img{display:block;width:80px;height:80px;max-width:100%;object-fit:contain;clip-path:none;transform:none}

#mobileSettings #mobileSupport .support-heart{display:block;flex:none;width:19px;height:19px;filter:drop-shadow(0 1px 3px #ef86ad30)}

/* Equal-sized actions above the centered game emblem. */
#mobileSettings .mobile-menu-title{padding:84px 20px 76px}
#mobileSettings .mobile-game-actions{position:absolute;top:20px;left:20px;right:20px;display:flex;justify-content:space-between;gap:12px}
#mobileSettings .mobile-game-actions :is(#mobileRestart,#mobileCloseGame){position:static;inset:auto;margin:0;display:inline-flex;align-items:center;justify-content:center;width:104px;height:44px;min-height:44px;padding:0 10px;border-radius:12px;font-size:14px;line-height:1;box-sizing:border-box}

body.editing-pad .pad-drag-bar label:has([data-drag-opacity]){flex:1 0 100%;white-space:nowrap;padding:4px 0} 
body.editing-pad .pad-drag-bar label:has([data-drag-opacity]) output{flex:none;min-width:38px} 
body.editing-pad .pad-drag-bar label:has([data-drag-opacity]) input{flex:1;min-width:0;width:auto}

#mobileSettings .mobile-sheet-heading .mobile-save-note{flex:1;margin:0;font-size:10px;line-height:1.45;letter-spacing:0;text-align:center}
#mobileSettings .mobile-sheet-heading #mobileSupport{margin-right:0}
@media(orientation:landscape) and (max-height:600px){
 #mobileSettings[open]{overflow:hidden;height:100dvh;max-height:100dvh}
 #mobileSettings .mobile-settings-sheet{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;padding:12px}
 #mobileSettings .mobile-sheet-heading{flex:none;flex-wrap:nowrap;gap:8px;margin-bottom:10px;min-height:36px}
 #mobileSettings .mobile-sheet-heading #mobileResume{font-size:13px;white-space:nowrap;padding:6px}
 #mobileSettings .mobile-sheet-heading #mobileSupport{font-size:11px;padding:5px 8px;min-height:32px}
 #mobileSettings .mobile-settings-grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:8px}
 #mobileSettings .mobile-settings-grid button[data-menu-icon]{height:100%;min-height:0;padding:4px 5px;gap:7px;font-size:12px;border-radius:16px}
 #mobileSettings .mobile-settings-grid button[data-menu-icon]::before{width:38px;height:38px}
 #mobileMenuError:empty{display:none}
}

@media(orientation:landscape) and (max-height:600px){
 #mobileSettings .mobile-settings-sheet{width:68%;flex:0 0 68%;padding-left:6px;padding-right:6px}
 #mobileSettings .mobile-menu-title{flex:1 1 32%;min-width:0;padding-left:12px;padding-right:12px}
 #mobileSettings .mobile-settings-grid{width:100%;column-gap:8px}
 #mobileSettings .mobile-settings-grid button[data-menu-icon]{width:100%;max-width:none}
}

@media(orientation:landscape) and (max-height:600px){
 #mobileSettings .mobile-settings-sheet{container-type:inline-size}
 #mobileSettings .mobile-settings-grid{gap:clamp(4px,1.2cqw,8px)}
 #mobileSettings .mobile-settings-grid button[data-menu-icon]{font-size:clamp(8px,min(1.85cqw,3dvh),14px);gap:clamp(3px,1cqw,7px);padding:clamp(2px,.6cqw,5px);border-radius:clamp(10px,2.5cqw,16px);line-height:1.3;min-width:0;overflow-wrap:anywhere}
 #mobileSettings .mobile-settings-grid button[data-menu-icon]::before{width:clamp(22px,min(6cqw,9dvh),42px);height:clamp(22px,min(6cqw,9dvh),42px)}
 #mobileSettings .mobile-sheet-heading .mobile-save-note{font-size:clamp(8px,1.5cqw,10px)}
}
/* Local rewind trial: opposite MENU, clear of speaker decoration. */
.mobile-rewind-button{display:none}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse),(orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.handheld-shell .gamepad .mobile-rewind-button{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;right:22px;bottom:calc(12px + env(safe-area-inset-bottom));width:48px;height:48px;min-height:48px;padding:3px;border:1px solid #d9e7ed80;border-radius:14px;background:#203d50d9;color:#eafff8;box-shadow:0 3px 0 #10223466;pointer-events:auto;touch-action:manipulation;z-index:5}
 body.handheld-shell .mobile-rewind-button span{font:700 26px/1 Arial,sans-serif}
 body.handheld-shell .mobile-rewind-button small{font:700 11px/1.2 Arial,sans-serif}
 body.handheld-shell .mobile-rewind-button:disabled{opacity:.35}
 body.handheld-shell.local-rewind-ui .speaker-grille{bottom:calc(80px + env(safe-area-inset-bottom))}
}
@media(orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.handheld-shell .gamepad .mobile-rewind-button{right:42px;bottom:12px;width:44px;height:44px;min-height:44px}
 body.handheld-shell.local-rewind-ui .center-buttons>div:last-child{bottom:68px}
 body.handheld-shell.local-rewind-ui .speaker-grille{top:15%;bottom:auto;right:32px}
}
/* Tactile rewind control, matching the handheld's physical buttons. */
@media(max-width:760px),(max-width:1000px) and (pointer:coarse),(orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.handheld-shell .gamepad .mobile-rewind-button{
  width:54px;height:54px;min-height:54px;gap:0;padding:4px;
  border:4px solid #24485b;border-radius:50%;
  background:linear-gradient(145deg,#fffef4 8%,#e1eee6 55%,#a8c9bf 100%);
  color:#244a4c;box-shadow:inset 0 2px 1px #fff, inset 0 -2px 2px #76948c80,0 4px 0 #132d3e,0 6px 9px #101b3545;
  transition:transform .12s ease,box-shadow .12s ease,opacity .18s ease;
 }
 body.handheld-shell .mobile-rewind-button span{font:700 27px/25px Arial,sans-serif;text-shadow:0 1px 0 #fff}
 body.handheld-shell .mobile-rewind-button small{font:800 10px/12px Arial,sans-serif;letter-spacing:.2px}
 body.handheld-shell .gamepad .mobile-rewind-button:disabled{opacity:.4;filter:saturate(.35)}
 body.handheld-shell .gamepad .mobile-rewind-button:active:not(:disabled){transform:translateY(3px);box-shadow:inset 0 2px 4px #234d4b40,0 1px 0 #132d3e,0 2px 4px #101b3525}
 body.handheld-shell .gamepad .mobile-rewind-button:focus-visible{outline:3px solid #f7d98b;outline-offset:4px}
}
@media(orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.handheld-shell .gamepad .mobile-rewind-button{width:48px;height:48px;min-height:48px}
 body.handheld-shell .mobile-rewind-button span{font-size:24px;line-height:22px}
}
@media(prefers-reduced-motion:reduce){.mobile-rewind-button{transition:none!important}}
/* Landscape: compact rewind beside the power light in the screen's lower bar. */
@media(orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.handheld-shell .player>.frame>.mobile-rewind-button{display:flex;position:absolute;right:54px;bottom:2px;z-index:5;flex-direction:column;align-items:center;justify-content:center;gap:0;width:32px;height:32px;min-width:32px;min-height:32px;padding:0;border:0;border-radius:8px;background:#bfc1cc;color:#333d50;box-shadow:none;touch-action:manipulation;pointer-events:auto}
 body.handheld-shell .player>.frame>.mobile-rewind-button span{font:700 20px/18px Arial,sans-serif;text-shadow:none}
 body.handheld-shell .player>.frame>.mobile-rewind-button small{font:700 9px/10px Arial,sans-serif}
 body.handheld-shell .player>.frame>.mobile-rewind-button:disabled{opacity:.4}
 body.handheld-shell .player>.frame>.mobile-rewind-button:active:not(:disabled){background:#aeb1bf;transform:translateY(1px)}
 body.handheld-shell .player>.frame>.mobile-rewind-button:focus-visible{outline:2px solid #345d80;outline-offset:2px}
 body.handheld-shell.local-rewind-ui .center-buttons>div:last-child{bottom:12px}
}
