/* Official EDAƎ portal palette. Shared by MirrorDesk and MobileDesk. */
:root{color-scheme:dark;--eda-bg:#15161b;--eda-nav:#18191f;--eda-surface:#22232c;--eda-surface-raised:#25252e;--eda-field:#202129;--eda-line:#373440;--eda-text:#edf2ff;--eda-muted:#b4b1c1;--eda-cyan:#12d8ef;--eda-blue:#439cff;--eda-violet:#a458ee;--eda-magenta:#ee20d7;--eda-primary:linear-gradient(110deg,#4b4ab3,#8040a8);--eda-primary-hover:linear-gradient(110deg,#5958c7,#934abd);--eda-primary-line:#a58ada;--ink:var(--eda-text);--muted:var(--eda-muted);--line:var(--eda-line);--paper:var(--eda-surface);--bg:var(--eda-bg);--accent:#bca2ff;--accent-light:#382c4e;--nav:var(--eda-nav);--mint:#bca2ff}
body{background:radial-gradient(ellipse at 20% 25%,#12d8ef0c,transparent 50%),radial-gradient(ellipse at 80% 45%,#ee20d70b,transparent 50%),var(--eda-bg);color:var(--eda-text)}
button,input,select,textarea{accent-color:var(--eda-violet)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline-color:var(--eda-cyan)}
button.primary,button.primary:hover:not(:disabled),button.primary:active{background:var(--eda-primary);border-color:var(--eda-primary-line);color:#fff}
button.primary:hover:not(:disabled){background:var(--eda-primary-hover)}

.topbar,.desktop-mode .topbar{background:#18191ff5;border-bottom-color:var(--eda-line);color:var(--eda-text)}.topbar .brand-mark{color:var(--eda-cyan)}.topbar .brand small{color:var(--eda-muted)}
.desktop-mode .shell{background:radial-gradient(ellipse at 20% 25%,#12d8ef0c,transparent 50%),radial-gradient(ellipse at 80% 45%,#ee20d70b,transparent 50%),#191a20}
.desktop-mode aside,.desktop-launcher,#desktopDock,#audioPanel{background:#22232cf5;border-color:var(--eda-line);color:var(--eda-text)}
.side-tabs,aside .side-tabs{background:var(--eda-nav)}.side-tabs button[aria-selected=true],aside .side-tabs button[aria-selected=true]{background:var(--eda-primary);border-color:var(--eda-primary-line);color:#fff}
.device-card,.settings-card,.setup-card,.status-area,.desktop-mode .title,.app{border-color:var(--eda-line)}
#desktopClock,#desktopDate,#phoneBattery,.launcher-head small,#launcherManage{color:var(--eda-text)}#phoneBattery[data-available=true]{color:var(--eda-cyan)}
.desktop-mode #desktopDock .dock-start,.desktop-mode #desktopDock button[aria-expanded=true]{background:#3c2e52;color:var(--eda-cyan)}
.desktop-mode #empty .installer-actions>.installer-action,.installer-actions>.installer-action{background:var(--eda-primary);border-color:var(--eda-primary-line);color:#fff}.desktop-mode #empty .installer-actions>.installer-action:hover,.installer-actions>.installer-action:hover{background:var(--eda-primary-hover);border-color:var(--eda-primary-line)}
#ipDialog,#installGuide,#filesDialog,#terminalDialog,dialog{background:var(--eda-surface);border-color:#51435e;color:var(--eda-text)}
#pairQrDialog{background:#191a20;border-color:var(--eda-line);color:var(--eda-text)}#pairQrDialog .pair-qr-stage{background:radial-gradient(ellipse at 50% 37%,#a458ee18,transparent 60%),#191a20}#pairQrDialog .pair-qr-topbar{color:var(--eda-text)}#pairQrDialog .pair-qr-back{background:#302c3bbb;border-color:#51435e;color:var(--eda-text)}#pairQrDialog .pair-qr-topbar p,#pairQrDialog .pair-qr-bottom p{color:var(--eda-muted)}
#adbTerminalDialog{background:var(--eda-nav);border-color:#51435e;color:var(--eda-text)}#terminalScreen{background:#15161b;border-color:var(--eda-line)}.file-pane[data-active=true]{border-color:var(--eda-cyan);box-shadow:inset 0 0 0 1px var(--eda-cyan)}

.desktop-mode #empty .eyebrow,.status-label,.eyebrow{text-transform:none}

.panel-title{text-transform:none}

#empty .guide-link,.empty-copy .guide-link{color:var(--eda-cyan)}

/* Compact language switch. IN is the display label; ISO language stays id. */
.language-switch{position:relative;isolation:isolate;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:108px;min-width:108px;min-height:38px;padding:3px;border:1px solid #60526f;border-radius:12px;background:#191a20;color:#b4b1c1;gap:0;line-height:1;cursor:pointer}
.language-switch::before{content:"";position:absolute;z-index:-1;left:3px;top:3px;bottom:3px;width:calc(50% - 3px);border-radius:8px;background:linear-gradient(110deg,#4b4ab3,#8040a8);transition:transform .18s ease}
.language-switch[aria-checked="true"]::before{transform:translateX(100%)}
.language-switch span{display:grid;place-items:center;flex:1;font-size:13px;font-weight:700;line-height:30px;letter-spacing:.4px;color:#b4b1c1}
.language-switch[aria-checked="false"] span:first-child,.language-switch[aria-checked="true"] span:last-child{color:#fff}
.language-switch:focus-visible{outline:2px solid #12d8ef;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.language-switch::before{transition:none}}

/* MobileDesk UI typography: 15 body, 14 controls, 13 supporting text. */
body{font-size:15px;line-height:1.6}
button,input,select,textarea{font-family:inherit}
label,summary{font-size:14px;line-height:1.5}
small,.micro,.settings-hint,.workspace-note,.library-help,.device-card>p,.setup-card p,.setup-card a,#status,#message,#audioStatus,.range-limits,#audioPermissionStatus{font-size:13px;line-height:1.65}
.eyebrow,.status-label,.panel-title{font-size:12px;line-height:1.5;letter-spacing:.6px}
.topbar .brand small{font-size:11px;line-height:1.4}
.sidebar-heading h2,.section-head h2,.setup-card h2{font-size:18px;line-height:1.35}
.sidebar-heading p,.side-bottom small,#diagnostics{font-size:13px;line-height:1.6}
.side-tabs button,.refresh-button,.app span:last-child,.app small{font-size:13px}
#panelSettings .settings-card h3{font-size:16px;line-height:1.4}
#panelSettings .setting-row>label,#panelSettings .settings-card button,#panelSettings .setting-row select,#panelSettings .setting-row input[type=number]{font-size:14px;line-height:1.45}
#panelSettings .settings-card .micro{font-size:13px;line-height:1.65}
#panelSettings .scroll-range output,#panelSettings #resetPreferences{font-size:13px}
.desktop-mode aside{width:min(620px,calc(100vw - 32px))}
.desktop-mode .title strong{font-size:15px;line-height:1.4;font-weight:650}
#desktopLauncher .launcher-head strong{font-size:23px;line-height:1.3}
#desktopLauncher .launcher-head small,#desktopLauncher #refresh,#launcherManage{font-size:13px;line-height:1.5}
#desktopLauncher .launcher-app{font-size:14px;line-height:1.45}
#desktopLauncher input{font-size:15px}
.desktop-mode #empty .empty-copy h2{font-size:clamp(30px,3vw,40px);line-height:1.2}
.desktop-mode #empty .empty-copy p{font-size:15px;line-height:1.7}
#empty .empty-copy>small,#empty .empty-copy>.guide-link,#empty .privacy-links>.guide-link{font-size:13px;line-height:1.6}
#empty .installer-actions>.installer-action{font-size:15px;line-height:1.4}
#installGuide h2,#privacyDialog h2,dialog .guide-heading h2{font-size:23px;line-height:1.3}
#installGuide h3,#privacyDialog h3{font-size:17px;line-height:1.4}
#installGuide p,#installGuide li,#privacyDialog p,#privacyDialog li{font-size:14px;line-height:1.75}
#installGuide small,#privacyDialog small{font-size:13px;line-height:1.65}
#ipDialog label,#ipDialog button,#ipDialog input,#ipDialog p,#desktopMirrorDialog p,#connectionLostDialog p{font-size:14px;line-height:1.6}
#pairQrDialog .pair-qr-topbar p,#pairQrDialog .pair-qr-note,#pairQrDialog .pair-qr-private{font-size:13px;line-height:1.5}
#pairQrDialog .pair-qr-instruction{font-size:14px;line-height:1.65}
#audioPanel .audio-panel-heading{font-size:16px}#audioPanel label,#audioPanel button,#audioPanel output{font-size:14px}#audioPanel small{font-size:13px}
#fileSharingDialog,#adbTerminalDialog{font-size:14px;line-height:1.6}
#fileSharingDialog h2,#adbTerminalDialog h2{font-size:22px;line-height:1.35}
#fileSharingDialog small,#filesPeerStatus,#terminalHelperForm>label{font-size:13px;line-height:1.6}
#terminalHelperForm input,#terminalHelperForm select,#terminalHelperForm button,#fileSharingDialog button,#fileSharingDialog input{font-size:14px}
@media(max-width:600px){#panelSettings .setting-row{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)}#desktopLauncher .launcher-app{font-size:13px}#desktopLauncher .launcher-head strong{font-size:21px}dialog input,dialog select,#panelSettings input,#panelSettings select{font-size:16px!important}}
#controlPanel .device-card p,#controlPanel .setup-card p,#controlPanel .setup-card a,#controlPanel .micro,#controlPanel .sidebar-heading p{font-size:13px;line-height:1.65}
#controlPanel label:not(.checkline),#controlPanel details summary,#controlPanel input:not([type=checkbox]),#controlPanel select,#controlPanel button{font-size:14px;line-height:1.5}
#controlPanel button.language-switch{min-height:38px;line-height:1}
#fileSharingDialog .file-root,#fileSharingDialog .file-row small,#fileSharingDialog .file-pages,#filesStatus,#terminalStatus,.terminal-hint,#actionConfirmItems li,#actionConfirmNote{font-size:13px;line-height:1.6}
#fileSharingDialog .file-row,#fileSharingDialog .file-pane-title,#fileSharingDialog .file-path input,.terminal-toolbar button{font-size:14px;line-height:1.5}
#desktopDock .language-switch span{font-size:13px}
.topbar .brand small{font-size:12px}
.desktop-mode .notice{font-size:13px;line-height:1.6}
#desktopDock #phoneBatteryLevel{font-size:12px}

/* Unified popup surfaces, controls and motion. */
dialog{box-sizing:border-box;color:var(--eda-text);background:var(--eda-surface);border:1px solid #51465f;border-radius:22px;box-shadow:0 28px 90px #0008,0 1px 0 #ffffff0c inset;max-width:calc(100vw - 32px);max-height:calc(100dvh - 40px);scrollbar-width:thin;scrollbar-color:#756384 #22232c;overscroll-behavior:contain}
dialog::backdrop{background:#08090eb8;backdrop-filter:blur(8px)}
dialog[open]{animation:eda-dialog-in .18s cubic-bezier(.2,.7,.2,1)}
dialog .heading,dialog .guide-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:0 0 22px;padding-bottom:18px;border-bottom:1px solid var(--eda-line)}
dialog .heading h2,dialog .guide-heading h2{margin:4px 0 0;font-size:22px;line-height:1.35;letter-spacing:-.4px;overflow-wrap:anywhere}
dialog .heading>button,dialog .guide-heading>button,dialog .close-button{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;min-width:40px;min-height:40px;padding:9px;border:1px solid #51465f;border-radius:12px;background:#2d2937;color:var(--eda-text);font-size:24px;line-height:1;cursor:pointer}
dialog .close-button svg{width:20px;height:20px}
dialog .heading>button:hover,dialog .guide-heading>button:hover,dialog .close-button:hover{background:#3b3249;border-color:#a18ab7}
dialog button,dialog a{touch-action:manipulation}
dialog button:not(.close-button):not(.language-switch),dialog select,dialog input:not([type=range]):not([type=checkbox]){border-radius:11px}
dialog select,dialog input:not([type=range]):not([type=checkbox]){min-height:42px;border:1px solid #51465f;background:#1b1c24;color:var(--eda-text)}
dialog button:focus-visible,dialog a:focus-visible,dialog input:focus-visible,dialog select:focus-visible{outline:2px solid var(--eda-cyan);outline-offset:3px}
dialog p,dialog li{overflow-wrap:anywhere}
dialog button:disabled{opacity:.48;cursor:not-allowed}
@keyframes eda-dialog-in{from{opacity:0;transform:translateY(12px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:560px){dialog{border-radius:18px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}dialog .heading,dialog .guide-heading{gap:12px;margin-bottom:18px;padding-bottom:14px}dialog .heading h2,dialog .guide-heading h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){dialog[open]{animation:none}dialog::backdrop{backdrop-filter:none}}

/* Landing copy remains centered in both languages. */
.desktop-mode #empty .empty-copy,#empty .empty-copy{text-align:center}
.desktop-mode #empty .empty-copy p,#empty .empty-copy p{margin-left:auto;margin-right:auto;text-align:center;text-wrap:pretty}
.desktop-mode #empty .empty-copy>p:first-of-type{max-width:440px}
.desktop-mode aside,#desktopLauncher,#audioPanel{border:1px solid #51465f;border-radius:20px;background:#22232cf7;box-shadow:0 24px 72px #0007,0 1px 0 #ffffff0c inset;scrollbar-width:thin;scrollbar-color:#756384 #22232c}
#controlPanel .sidebar-heading{padding:20px 22px 18px;border-bottom:1px solid var(--eda-line)}
#controlPanel .sidebar-heading h2{font-size:21px;line-height:1.3;margin:0 0 6px}
#controlPanel .sidebar-heading p{margin:0;color:var(--eda-muted)}
#controlPanel #drawerClose{width:38px;height:38px;min-height:38px;padding:8px;border:1px solid #51465f;border-radius:11px;background:#2d2937}
#controlPanel .settings-card,#controlPanel .device-card,#controlPanel .setup-card{border:1px solid var(--eda-line);border-radius:14px;padding:18px;margin-bottom:14px}
#desktopLauncher .launcher-head{padding-bottom:18px;border-bottom:1px solid var(--eda-line);margin-bottom:16px;align-items:center}
#desktopLauncher .launcher-head strong{font-size:22px;line-height:1.3}
#desktopLauncher .launcher-actions{display:flex;gap:8px;align-items:center}
#desktopLauncher #launcherClose{width:38px;height:38px;min-height:38px;border:1px solid #51465f;border-radius:11px;background:#2d2937}
#desktopLauncher #launcherSearch{min-height:46px;background:#1b1c24;border:1px solid #51465f;border-radius:12px;margin-bottom:18px}
#audioPanel{padding:20px}#audioPanel .audio-panel-heading{margin-bottom:18px;font-size:16px;font-weight:650}#audioPanel .audio-mute-row{margin-top:16px;padding-top:16px;border-top:1px solid var(--eda-line)}
#ipDialog,#desktopMirrorDialog,#connectionLostDialog{padding:24px}
#privacyDialog,#installGuide{padding:28px}
#ipDialog .ip-actions,.desktop-mirror-actions,.guide-actions{display:flex;gap:10px;flex-wrap:wrap}
#ipDialog button[type=submit],#desktopMirrorDialog button:not(.close-button),#connectionLostDialog button{min-height:42px;padding:10px 16px}
#actionConfirmDialog .action-confirm-buttons{gap:10px;padding-top:18px;border-top:1px solid var(--eda-line)}
#actionConfirmDialog .action-confirm-buttons button{min-height:42px;padding:10px 16px}
.desktop-toast{border-radius:14px;border-color:#665174;background:#292432f5;color:var(--eda-text);box-shadow:0 14px 40px #0005;font-size:13px}
@media(max-width:560px){#privacyDialog,#installGuide,#ipDialog,#desktopMirrorDialog{padding:20px}#controlPanel .sidebar-heading{padding:18px}#desktopLauncher .launcher-head strong{font-size:20px}}
