/* Compact Luna workspace. The desktop retains its original geometry. */
#mobile-task, #show-desktop, #mobile-programs, .mobile-start-search, .chat-mobile-tabs, .pb-mobile-tabs, .arcade-mobile-options { display: none; }
.startitem[hidden], .mobile-search-empty[hidden] { display: none; }
.mobile-workspace { --taskbar-space: calc(48px + env(safe-area-inset-bottom, 0px)); }
.mobile-workspace #desktop { top: var(--visual-top,0px); bottom: auto; height: calc(var(--visual-height,100dvh) - var(--taskbar-space)); }
.mobile-workspace #windows { position: absolute; inset: env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) 0 env(safe-area-inset-left,0px); pointer-events: none; }
.mobile-workspace .window { pointer-events: auto; }
.mobile-workspace .window.inactive { visibility: hidden; pointer-events: none; }
.mobile-workspace .window-body { min-height: 0; overscroll-behavior: contain; }
.mobile-workspace #deskicons { inset: max(12px,env(safe-area-inset-top,0px)) max(8px,env(safe-area-inset-right,0px)) 8px max(8px,env(safe-area-inset-left,0px)); max-height: none; overflow-x: hidden; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fit,minmax(98px,1fr)); grid-auto-rows: 88px; align-content: start; gap: 6px 2px; padding: 2px 0 102px; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; }
.mobile-workspace .deskicon { width: auto; min-width: 0; padding: 8px 1px; gap: 6px; justify-content: center; }
.mobile-workspace .deskicon .label { font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mobile-workspace .deskicon .glyph, .mobile-workspace .deskicon .glyph img { width: 44px; height: 44px; }
.mobile-workspace #clippy-agent { bottom: calc(var(--taskbar-space) + 8px); pointer-events: none; }
.mobile-workspace #clippy-agent img { height: 82px; }
.mobile-workspace .titlebar { height: 48px; padding: 0 3px 0 8px; font-size: 13px; }
.mobile-workspace .titlebar .tbicon { width: 20px; height: 20px; margin-right: 6px; }
.mobile-workspace .titlebar .tbbtns { gap: 2px; }
.mobile-workspace .titlebar-btn { width: 44px; height: 44px; min-width: 44px; padding: 0; font-size: 0; position: relative; }
.mobile-workspace .titlebar-btn.min::before { width: 12px; }
.mobile-workspace .titlebar-btn.max::before { width: 12px; height: 12px; }
.mobile-workspace .titlebar-btn.close::before, .mobile-workspace .titlebar-btn.close::after { width: 15px; }
.mobile-workspace .window .xp-btn, .mobile-workspace .window .arcade-button, .mobile-workspace .window .rd-button { min-height: 44px; min-width: 44px; font-size: 12px; padding: 7px 10px; touch-action: manipulation; }
.mobile-workspace .window input:not([type=checkbox]):not([type=radio]), .mobile-workspace .window select, .mobile-workspace .window textarea { font-size: 16px; }
.mobile-workspace .window select, .mobile-workspace .window input:not([type=checkbox]):not([type=radio]) { min-height: 44px; }
.mobile-workspace .window summary { min-height: 44px; display: flex; align-items: center; }
.mobile-workspace #taskbar { top: calc(var(--visual-top,0px) + var(--visual-height,100dvh) - var(--taskbar-space)); bottom: auto; height: var(--taskbar-space); padding-bottom: env(safe-area-inset-bottom,0px); padding-left: env(safe-area-inset-left,0px); padding-right: env(safe-area-inset-right,0px); gap: 3px; }
.mobile-workspace #startbtn { min-width: 75px; padding: 0 10px 0 8px; margin: 0; font-size: 16px; flex: none; }
.mobile-workspace #startbtn img { height: 29px; }
.mobile-workspace #taskbtns { display: none; }
.mobile-workspace #mobile-task, .mobile-workspace #show-desktop { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin: 2px 0; padding: 0 6px; border: 1px solid #1649a1; border-radius: 3px; background: linear-gradient(#3b7deb,#2255b8); color: #fff; font: 12px var(--tahoma); }
.mobile-workspace #mobile-task:hover, .mobile-workspace #mobile-task:focus-visible, .mobile-workspace #show-desktop:hover, .mobile-workspace #show-desktop:focus-visible { background: #397fe3; color: #fff; }
.mobile-workspace #mobile-task[aria-expanded=true] { background: #174fb5; color: #fff; }
.mobile-workspace #mobile-task { flex: 1; min-width: 0; justify-content: flex-start; }
.mobile-workspace #mobile-task>img { width: 20px; height: 20px; flex: none; }
.mobile-workspace #mobile-task>span { flex: 1; min-width: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.mobile-workspace #mobile-task>small { font-size: 11px; color: #e3eeff; }
.mobile-workspace #mobile-task>svg { width: 12px; height: 12px; flex: none; }
.mobile-workspace #show-desktop { flex: 0 0 44px; }
.mobile-workspace #show-desktop img { width: 25px; height: 25px; }
.mobile-workspace #systray { padding: 0 6px; font-size: 10px; gap: 0; flex: none; }
.mobile-workspace #systray .tray-ico { display: none; }
.mobile-workspace #clock { min-width: 45px; }
.mobile-workspace #mobile-programs:not([hidden]) { display: flex; flex-direction: column; position: fixed; z-index: 9600; left: max(6px,env(safe-area-inset-left,0px)); right: max(6px,env(safe-area-inset-right,0px)); bottom: calc(100% - var(--visual-top,0px) - var(--visual-height,100dvh) + var(--taskbar-space) + 4px); max-height: calc(var(--visual-height,100dvh) - var(--taskbar-space) - 16px); background: #ece9d8; color: #163550; border: 1px solid #0831d9; border-radius: 6px 6px 0 0; overflow: hidden; }
.mobile-workspace #mobile-programs header { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: linear-gradient(#078cff,#0053e8,#0744c6); padding: 2px 4px 2px 12px; color: #fff; min-height: 48px; flex: none; }
.mobile-program-list { overflow-y: auto; overscroll-behavior: contain; padding: 5px; min-height: 0; }
.mobile-program-list>p { padding: 16px 12px; line-height: 1.6; }
.mobile-program-row { display: flex; align-items: center; gap: 8px; padding: 3px 4px; }
.mobile-program-row>button:first-child { display: flex; align-items: center; gap: 12px; text-align: left; flex: 1; min-width: 0; min-height: 58px; padding: 7px 9px; border: 0; border-radius: 2px; color: #183954; background: transparent; }
.mobile-program-row>button:first-child:hover, .mobile-program-row>button:first-child:focus-visible, .mobile-program-row.current>button:first-child { background: #d8e8fc; color: #16365b; }
.mobile-program-row img { width: 30px; height: 30px; flex: none; }
.mobile-program-row span { min-width: 0; }
.mobile-program-row b, .mobile-program-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-program-row b { font-size: 13px; }
.mobile-program-row small { font-size: 11px; font-weight: normal; margin-top: 4px; color: #536579; }
#mobile-programs footer { padding: 11px 14px; font-size: 11px; flex: none; }
.mobile-workspace #startmenu { bottom: calc(100% - var(--visual-top,0px) - var(--visual-height,100dvh) + var(--taskbar-space)); height: min(730px,calc(var(--visual-height,100dvh) - var(--taskbar-space) - 4px)); width: min(540px,calc(100vw - 4px)); }
.mobile-workspace .start-header { height: 48px; flex-basis: 48px; }
.mobile-workspace .start-header img { width: 34px; height: 34px; }
.mobile-workspace .start-footer { height: 48px; flex-basis: 48px; }
.mobile-workspace .start-footer .sf-item { min-height: 44px; }
.mobile-workspace .startitem { min-height: 44px; padding: 5px 4px; gap: 6px; font-size: 11px; }
.mobile-workspace .startitem b { font-size: 11px; }
.mobile-workspace .startitem small { font-size: 9px; }
.mobile-workspace .startitem .si-ico, .mobile-workspace .startitem .si-ico img { width: 24px; height: 24px; }
.mobile-workspace .start-left { flex-basis: 58%; padding: 4px; }
.mobile-workspace .start-right { flex-basis: 42%; padding: 4px; }
.mobile-workspace .start-right .startitem { font-size: 10px; }
.mobile-workspace .mobile-start-search { display: block; padding: 7px 8px; background: #ece9d8; flex: none; }
.mobile-start-search>label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mobile-start-search>div { display: flex; gap: 6px; }
.mobile-start-search input { width: 100%; min-width: 0; min-height: 44px; padding: 7px 10px; font: 16px var(--tahoma); border: 1px solid #7f9db9; border-radius: 0; background: #fff; color: #1d3550; user-select: text; }
.mobile-start-search input:focus { border-color: #245edb; background: #fffef8; }
.mobile-start-search .xp-btn { min-height: 44px; min-width: 58px; }
.mobile-search-empty { font-size: 12px; color: #52637b; padding: 9px; line-height: 1.5; }
.mobile-landscape #startmenu { width: min(760px,calc(100vw - 4px)); }
.mobile-landscape .start-right { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; align-content: start; flex-basis: 52%; }
.mobile-landscape .start-left { flex-basis: 48%; }
.mobile-landscape .start-right .start-sep { display: none; }
.mobile-workspace .arcade-host-menu { padding: 4px; gap: 4px; flex-wrap: wrap; }
.mobile-workspace .arcade-host-menu .xp-btn { padding: 5px 8px; }
.mobile-workspace .arcade-mobile-options { display: inline-block; margin-left: auto; }
.arcade-host-extra { display: contents; }
.mobile-workspace .arcade-host-extra { display: none; }
.mobile-workspace .arcade-host[data-options=true] .arcade-host-extra { display: flex; flex-basis: 100%; gap: 6px; }
.mobile-workspace .arcade-host-level { display: none; margin: 0; padding: 3px 8px 7px; }
.mobile-workspace .arcade-host[data-options=true] .arcade-host-level { display: flex; }
.mobile-workspace .arcade-host-level select { max-width: 75%; width: 215px; }
.mobile-workspace .arcade-host-hud { min-height: 36px; padding: 7px 10px; }
.mobile-workspace .arcade-host-screen { min-height: 80px; }
.mobile-workspace .arcade-host-bottom { padding: 6px; gap: 4px; }
.mobile-workspace .arcade-host-tip { font-size: 10px; }
.mobile-workspace .arcade-touch { justify-content: space-between; gap: 6px; }
.mobile-workspace .arcade-touch-pad { grid-template: repeat(2,44px) / repeat(3,44px); gap: 3px; }
.mobile-workspace .arcade-touch button { height: 44px; min-width: 44px; padding: 0 8px; touch-action: none; }
.mobile-workspace .arcade-touch-pad button { width: 44px; padding: 0; }
.mobile-workspace .arcade-touch button svg { width: 20px; height: 20px; }
.mobile-workspace .arcade-host-tip .keyboard-tip { display: none; }
.mobile-workspace .arcade-host-dialog { font-size: 13px; padding: 14px; }
.mobile-workspace .arcade-library header { padding: 14px; }
.mobile-workspace .arcade-library-item { grid-template-columns: 105px minmax(0,1fr); gap: 12px; }
.mobile-workspace .arcade-library-item p { font-size: 12px; }
.mobile-workspace .arcade-library-item h2 { font-size: 13px; }
.mobile-workspace .arcade-library-item .arcade-game-icon { width: 23px; height: 23px; }
.mobile-workspace .arcade-library-list { padding: 5px 12px 16px; }
.mobile-landscape .arcade-host { display: grid; grid-template-columns: 150px minmax(0,1fr) 120px; grid-template-rows: 52px 34px minmax(0,1fr); }
.mobile-landscape .arcade-host-menu { grid-column: 1 / -1; grid-row: 1; }
.mobile-landscape .arcade-host-hud { grid-column: 1 / -1; grid-row: 2; min-height: 0; padding: 3px 16px; }
.mobile-landscape .arcade-host-screen { grid-column: 2; grid-row: 3; }
.mobile-landscape .arcade-host-bottom, .mobile-landscape .arcade-host-bottom>.arcade-touch { display: contents; }
.mobile-landscape .arcade-host-tip, .mobile-landscape .arcade-host-bottom>.arcade-touch>span { display: none; }
.mobile-landscape .arcade-touch-pad { grid-column: 1; grid-row: 3; align-self: center; justify-self: center; }
.mobile-landscape .arcade-touch-pad+.arcade-touch { grid-column: 3; grid-row: 3; display: flex; flex-direction: column; justify-content: center; }
.mobile-landscape .arcade-host-bottom>.arcade-touch>[data-code="37"] { grid-column: 1; grid-row: 3; align-self: center; justify-self: center; width: 80px; }
.mobile-landscape .arcade-host-bottom>.arcade-touch>[data-code="39"] { grid-column: 3; grid-row: 3; align-self: center; justify-self: center; width: 80px; }
.mobile-landscape .arcade-host-bottom>.arcade-touch>[data-code="32"] { grid-column: 3; grid-row: 3; align-self: end; justify-self: center; margin-bottom: 5px; width: 80px; }
.mobile-landscape .arcade-host[data-options=true] { display: flex; }
.mobile-landscape .arcade-host[data-options=true] .arcade-host-bottom { display: none; }
.mobile-workspace .chat-mobile-tabs, .mobile-workspace .pb-mobile-tabs { display: flex; flex: none; gap: 4px; padding: 5px 7px; background: #ece9d8; }
.mobile-workspace .chat-mobile-tabs button, .mobile-workspace .pb-mobile-tabs button { min-height: 44px; min-width: 68px; padding: 6px 12px; border: 1px solid #919b9c; border-radius: 3px 3px 0 0; background: #e2dfd4; color: #29445f; font: 12px var(--tahoma); }
.mobile-workspace .chat-mobile-tabs button:hover, .mobile-workspace .chat-mobile-tabs button:focus-visible, .mobile-workspace .pb-mobile-tabs button:hover, .mobile-workspace .pb-mobile-tabs button:focus-visible { background: #fff4d6; color: #173b62; }
.mobile-workspace .chat-mobile-tabs button[aria-selected=true], .mobile-workspace .pb-mobile-tabs button[aria-selected=true] { background: #fff; color: #174e96; border-color: #6c91c2; }
.mobile-workspace .clippy-chat { height: 100%; min-height: 0; overflow: hidden; }
.mobile-workspace .chat-header { padding: 7px 10px; }
.mobile-workspace .chat-header h1 { font-size: 16px; }
.mobile-workspace .chat-header>img { height: 35px; width: auto; }
.mobile-workspace .chat-workspace { display: flex; min-height: 0; flex: 1; overflow: hidden; }
.mobile-workspace .chat-main { min-height: 0; height: 100%; width: 100%; }
.mobile-workspace .chat-log { max-height: none; min-height: 0; padding: 15px 12px; }
.mobile-workspace .chat-message-copy { font-size: 14px; }
.mobile-workspace .chat-welcome { margin: 4px auto 15px; }
.mobile-workspace .chat-welcome>img { height: 80px; }
.mobile-workspace .chat-welcome h2 { font-size: 17px; margin: 9px 0; }
.mobile-workspace .chat-welcome p { font-size: 13px; }
.mobile-workspace .chat-compose { padding: 7px 10px; }
.mobile-workspace .chat-compose textarea { min-height: 57px; height: 57px; max-height: 90px; resize: none; font-size: 16px; line-height: 1.35; }
.mobile-workspace .chat-send-row { margin-top: 5px; }
.mobile-workspace .chat-send-row>span { font-size: 10px; }
.mobile-workspace .chat-privacy { font-size: 10px; padding: 0 10px 8px; }
.mobile-workspace .chat-sidebar { display: none; overflow: auto; width: 100%; height: 100%; padding: 15px; }
.mobile-workspace .clippy-chat[data-panel=sources] .chat-main { display: none; }
.mobile-workspace .clippy-chat[data-panel=sources] .chat-sidebar { display: block; }
.mobile-workspace .chat-prompts button, .mobile-workspace .chat-answer-actions button { min-height: 44px; font-size: 12px; }
.mobile-workspace .chat-sources { font-size: 12px; }
.mobile-keyboard .chat-header, .mobile-keyboard .chat-privacy, .mobile-keyboard .chat-compose>label { display: none; }
.mobile-keyboard .chat-mobile-tabs { padding-block: 1px; }
.mobile-keyboard #startmenu .start-header, .mobile-keyboard #startmenu .start-footer, .mobile-keyboard #startmenu .start-right { display: none; }
.mobile-keyboard #startmenu .start-left { flex-basis: 100%; }
.mobile-workspace .pinball-v2 { height: 100%; min-height: 0; display: flex; flex-direction: column; padding: 0 8px 6px; overflow: hidden; }
.mobile-workspace .pb-menubar { display: none; }
.mobile-workspace .pb-layout { flex: 1; min-height: 0; width: 100%; display: block; }
.mobile-workspace .pb-table-column { height: 100%; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.mobile-workspace .pb-scorebar { flex: none; width: 100%; max-width: none; margin: 0; padding: 0; min-height: 44px; gap: 5px; }
.mobile-workspace .pb-scorebar b { font-size: 17px; }
.mobile-workspace .pb-scorebar .xp-btn { padding: 4px 7px; font-size: 11px; }
.mobile-workspace .pinball-v2 .pb-cabinet { flex: none; width: min(100%,var(--pb-table-width)); }
.mobile-workspace .pinball-v2 .pinball-flippers { flex: none; margin: auto 0 0; gap: 6px; padding-top: 2px; }
.mobile-workspace .pinball-v2 [data-flipper] { min-height: 48px; touch-action: none; }
.mobile-workspace .pinball-v2 .pb-sidebar { display: none; height: 100%; max-width: none; overflow: auto; margin: 0; padding: 8px; }
.mobile-workspace .pinball-v2[data-panel=scores] .pb-table-column { display: none; }
.mobile-workspace .pinball-v2[data-panel=scores] .pb-sidebar { display: block; }
.mobile-workspace .pb-sidebar p, .mobile-workspace .pb-weekly p { font-size: 12px; }
.mobile-workspace .pb-rules summary { min-height: 44px; }
.mobile-workspace .snake-pad { grid-template: repeat(2,44px) / repeat(3,44px); gap: 4px; }
.mobile-workspace .trail-app .snake-pad { width: 140px; }

/* The 3D renderer fits the available table area without stretching its scene. */
.pinball-3d { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.pinball-3d .pb-layout { flex: 1; min-height: 0; width: 100%; max-width: none; grid-template-columns: minmax(0,1fr) 225px; }
.pinball-3d .pb-table-column { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.pinball-3d .pb-cabinet, .mobile-workspace .pinball-3d .pb-cabinet { width: 100%; flex: 1; min-height: 60px; aspect-ratio: auto; background: #182b22; border: 0; }
.pinball-3d .pb-cabinet canvas { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.pinball-3d .pb-cabinet canvas[hidden] { display: none; }
.pinball-3d .pb-sidebar { height: 100%; overflow: auto; margin: 0; padding: 3px 3px 12px 0; }
.pinball-3d .pb-input-tip { flex: none; margin: 6px 0 0; text-align: center; font-size: 10px; color: #526375; }
.pinball-3d .pinball-flippers { flex: none; }
.pinball-3d [data-plunger] { touch-action: none; }
.pinball-3d .pb-table-notice { left: 8px; right: 8px; bottom: 8px; background: #eeecdf; color: #244766; border: 1px solid #809bb4; }
.pb-plunger-guide { position: absolute; right: 2px; top: 55%; bottom: 12%; width: 26px; display: none; flex-direction: column; align-items: center; justify-content: flex-end; pointer-events: none; background: #d6d7c3; color: #173951; }
.pb-plunger-guide span { font-size: 10px; }
.pb-plunger-guide i { width: 100%; height: calc(var(--pull,0) * 85%); background: #a8c371; }
.pb-pulling .pb-plunger-guide { display: flex; }
.mobile-workspace .pinball-3d .pb-layout { display: block; }
.mobile-workspace .pinball-3d .pb-table-column { max-width: none; }
.mobile-workspace .pinball-3d .pb-scorebar { flex: none; }
.mobile-workspace .pinball-3d .pinball-flippers { margin: 0; }
.mobile-workspace .pinball-3d .pb-input-tip { font-size: 10px; margin: 0; }
.mobile-landscape .pinball-3d .pb-mobile-tabs { position: absolute; top: 0; left: 0; width: 142px; flex-direction: column; }
.mobile-landscape .pinball-3d { position: relative; padding: 4px 8px 4px 148px; }
.mobile-landscape .pinball-3d .pb-table-column { display: grid; grid-template-columns: minmax(0,1fr) 105px; grid-template-rows: 42px minmax(0,1fr); gap: 4px; }
.mobile-landscape .pinball-3d .pb-scorebar { grid-row: 1; grid-column: 1; }
.mobile-landscape .pinball-3d .pb-cabinet { grid-row: 2; grid-column: 1; height: 100%; }
.mobile-landscape .pinball-3d .pinball-flippers { grid-row: 1 / 3; grid-column: 2; flex-direction: column; justify-content: center; }
.mobile-landscape .pinball-3d .pinball-flippers button { width: 100%; }
.mobile-landscape .pinball-3d .pb-input-tip { position: absolute; left: 9px; bottom: 12px; width: 125px; line-height: 1.5; }
.mobile-landscape .pinball-3d[data-panel=scores] .pb-table-column { display: none; }
.mobile-workspace .snake-pad .snake-direction { width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; }
.mobile-workspace .snake-menubar { flex-wrap: wrap; }
.mobile-workspace .snake-menubar label { flex: 1; }
.mobile-workspace .sol-board { --sol-gap: 4px; padding: 8px; }
.mobile-workspace .arcade { padding: 10px; }
.mobile-workspace .arcade-toolbar { gap: 5px; }
.mobile-landscape .chat-header { display: none; }
.mobile-landscape .chat-privacy { display: none; }
.mobile-landscape .chat-compose { display: flex; align-items: end; gap: 8px; }
.mobile-landscape .chat-compose>label, .mobile-landscape .chat-send-row>span { display: none; }
.mobile-landscape .chat-compose textarea { flex: 1; }
.mobile-landscape .chat-send-row { flex: none; }
.mobile-landscape #clippy-agent { display: none; }
