/* Device previews have explicit orientations, independent of the desktop viewport. */
.preview-orientation{position:fixed;right:16px;top:16px;z-index:10005;display:flex;gap:4px;padding:5px;border:1px solid var(--glass-line);border-radius:20px;background:var(--glass-surface);color:var(--theme-ink);backdrop-filter:blur(20px)}
.preview-orientation[hidden]{display:none}
.preview-orientation button{padding:7px 12px;border-radius:15px;background:transparent;color:inherit;font-size:11px}
.preview-orientation button[aria-pressed=true]{background:var(--artist-header,#ffffff44);box-shadow:inset 0 0 0 1px var(--glass-line)}
body[data-device=phone][data-orientation=portrait] .shell{width:min(393px,calc(100vw - 32px),calc((100dvh - 34px)*9/19.5));max-width:none;height:auto;min-height:0;aspect-ratio:9/19.5;margin:0 auto;top:50%;transform:translateY(-50%)}
body[data-device=tablet][data-orientation=portrait] .shell{width:min(825px,calc(100vw - 32px),calc((100dvh - 32px)*3/4));aspect-ratio:3/4}
@media(max-width:600px) and (orientation:portrait){body[data-device=phone][data-orientation=portrait] .shell{width:100%;height:100dvh;aspect-ratio:auto;top:0;transform:none}}
/* One fixed row with six slots, including the menu, in the portrait phone workspace. */
body[data-mode=phone][data-appearance] .dock-wrap{left:14px;right:14px;width:auto;transform:none;justify-content:center}
body[data-mode=phone][data-appearance] .dock{width:100%;max-width:460px;min-width:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:center;justify-items:center;gap:0;padding:12px 4px;overflow:visible;touch-action:manipulation}
body[data-mode=phone][data-appearance] .dock :is(.phone-organizer-icon,.phone-menu){position:relative;display:grid!important;place-items:center;min-width:0;width:min(43px,100%);height:43px;padding:0;background:none;border:0;box-shadow:none;color:inherit}
body[data-mode=phone][data-appearance] .dock .phone-menu .papi-start-logo{display:block;width:35px;height:39px}
body[data-mode=phone][data-appearance] .dock .dock-tip{display:none}
body[data-mode=phone][data-appearance] .start-menu:not([hidden]){display:block;position:absolute;z-index:10002;inset:auto 14px 112px;width:auto;max-height:calc(100% - 170px);overflow:auto;padding:22px 16px 0;background:var(--artist-paper);color:var(--artist-ink);border:1px solid var(--glass-line);border-radius:16px;box-shadow:0 12px 40px #0005}
body[data-mode=phone] .start-apps{min-height:0;grid-template-columns:repeat(3,minmax(0,1fr))}
body[data-mode=phone] .start-apps button{min-width:0;padding:10px 3px;font-size:10px}
body[data-mode=phone] .start-input{min-width:0;width:100%;font-size:16px}
body[data-mode=phone]:has(.window[data-app=games]:not(.hidden)) .preview-orientation{display:none}

body[data-mode=phone][data-appearance] .dock .ico{width:min(40px,100%)!important;height:40px!important}

.phone-dock-settings{display:none}body[data-mode=phone] .phone-dock-settings{display:block;padding:12px 0;border-top:1px solid var(--glass-line);margin-bottom:16px}body[data-mode=phone] .phone-dock-settings h3{font-size:14px;margin:0 0 5px}body[data-mode=phone] .phone-dock-settings p{font-size:11px;line-height:1.5;margin:0 0 10px;color:var(--theme-muted)}


/* Keep the mobile workspace vertical; ask for a turn when the actual phone is horizontal. */
.phone-portrait-guard{display:none}
body.phone-needs-portrait .phone-portrait-guard{position:fixed;inset:0;z-index:2147483000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;text-align:center;background:var(--artist-paper,#191919);color:var(--artist-ink,#fff)}
.phone-portrait-guard svg{width:42px;height:54px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round}
.phone-portrait-guard strong{font-size:18px}
.phone-portrait-guard p{margin:0;font-size:13px}
body.phone-needs-portrait :is(.shell,.preview-orientation,dialog){visibility:hidden}
/* Account and notifications are fixed at the right, after the menu and three personal shortcuts. */
body[data-mode=phone][data-appearance] .dock{grid-template-columns:repeat(6,minmax(0,1fr))}
body[data-mode=phone][data-appearance] .dock .phone-dock-status{display:grid!important;place-items:center;min-width:0;width:100%;height:43px;background:none;padding:0;border:0;box-shadow:none}
body[data-mode=phone][data-appearance] .dock .phone-dock-dollar{grid-column:5;grid-row:1}
body[data-mode=phone][data-appearance] .dock .phone-dock-envelope{grid-column:6;grid-row:1}
body[data-mode=phone][data-appearance] .dock .phone-dock-dollar svg{width:min(25px,100%);height:28px}
body[data-mode=phone][data-appearance] .dock .phone-dock-envelope svg{width:min(34px,100%);height:28px}
body[data-mode=phone][data-appearance] .dock .ico{height:auto!important;aspect-ratio:1}
body[data-mode=phone][data-appearance] .dock .phone-menu .papi-start-logo{max-width:100%;height:auto}
