:root{font-family:"Segoe UI",system-ui,sans-serif;color:#142647;background:#edf3fb;color-scheme:light;--ink:#142647;--muted:#4a6080;--line:#d8e2f0;--blue:#174ec5}
*{box-sizing:border-box} [hidden]{display:none!important}
body{margin:0} header{height:70px;background:#102443;color:white;padding:0 clamp(18px,5vw,64px);display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;gap:12px;align-items:center;font-weight:750;font-size:20px}.mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#326de5}.role{color:#d4e2fb;font-size:14px}
main{max-width:1560px;margin:auto;padding:28px clamp(18px,4vw,56px)} h1{font-size:clamp(29px,4vw,42px);letter-spacing:-.04em;margin:0} h2{font-size:19px;margin:0 0 13px} p{color:var(--muted);line-height:1.5;margin:8px 0}
.intro{margin-bottom:22px}.workspace{display:grid;grid-template-columns:minmax(244px,310px) minmax(0,1fr);gap:18px}
aside,.desk{background:white;border:1px solid var(--line);border-radius:16px;min-width:0} aside{padding:18px;align-self:start}.desk{min-height:525px;overflow:hidden;display:flex;flex-direction:column}
ul{margin:0 0 14px;padding:0;list-style:none} li{display:flex;gap:5px;align-items:center;padding:5px 0} li button:first-child{text-align:left;flex:1;overflow-wrap:anywhere} li button:last-child{padding:7px;font-size:14px}
button,summary,input,textarea{font:inherit} button,summary{cursor:pointer} button{border:1px solid var(--line);background:white;color:var(--ink);border-radius:8px;padding:8px 12px;font-weight:600} button:hover,summary:hover{background:#eff5ff} :focus-visible{outline:3px solid #5186ee;outline-offset:2px}
.primary{background:var(--blue);border-color:var(--blue);color:white}.primary:hover{background:#123e9d} summary{color:var(--blue);font-weight:700;padding:5px 0}
form{display:grid;gap:8px;margin-top:10px} label{font-size:14px;font-weight:600} input,textarea{min-width:0;border:1px solid #b9c9de;border-radius:8px;padding:9px;color:var(--ink);background:white} textarea{resize:vertical}
#notice:empty,#tabs:empty{display:none} #notice{font-size:14px} #empty{margin:auto;text-align:center;padding:24px}
#tabs{padding:9px 12px;display:flex;gap:8px;overflow:auto;background:#f5f8fc;border-bottom:1px solid var(--line)} #tabs button{white-space:nowrap} #tabs button[aria-current=true]{border-color:#84a7f1;color:#174ec5}
#view{display:flex;flex-direction:column;flex:1;min-height:0}.toolbar{padding:12px;display:flex;flex-wrap:wrap;align-items:center;gap:12px}.toolbar button{margin-left:auto} #state{color:var(--muted);font-size:14px}
.screen{display:grid;place-items:center;flex:1;background:#102443;min-height:360px;padding:10px}.screen p{color:#d9e5fb;text-align:center}.screen img{display:block;max-width:100%;max-height:75vh;width:auto;height:auto}
dialog{border:1px solid var(--line);border-radius:16px;color:var(--ink);padding:22px;width:min(450px,calc(100vw - 24px))}dialog::backdrop{background:#0d1c35ad}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
@media(max-width:700px){.workspace{grid-template-columns:1fr}.desk{min-height:400px}.screen{min-height:285px}}

body{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
header{height:56px;flex:none}
main{width:100%;min-height:0;flex:1;display:flex;flex-direction:column;padding-top:16px;padding-bottom:16px}
.intro{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
h1{font-size:clamp(22px,3vw,31px)}
.workspace{grid-template-columns:minmax(230px,280px) minmax(0,1fr);min-height:0;flex:1}
.workspace.devices-hidden{grid-template-columns:minmax(0,1fr)}
aside{max-height:100%;overflow:auto}
.desk{min-height:0;min-width:0;height:100%}
#view{flex:1;min-width:0;overflow:hidden}
.toolbar{justify-content:space-between;flex:none;gap:9px}
.toolbar button{margin:0;font-size:14px;padding:7px 10px}
.session-info{display:flex;flex-direction:column;min-width:0;gap:3px}
.session-info strong{overflow-wrap:anywhere}
.tools{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
button:disabled{opacity:.55;cursor:default}
.screen{min-height:0;position:relative;overflow:hidden}
.screen img{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:contain;user-select:none;-webkit-user-drag:none;touch-action:none}
#mediaStatus{margin:.35rem 0;color:var(--ink)}
#captureVideo[aria-pressed="true"]{background:#a11d33;color:white}
#mediaGallery{max-height:80vh;overflow:auto}
#mediaItems{padding:0;list-style:none}
#mediaItems li{border-top:1px solid var(--line);padding:.45rem 0;overflow-wrap:anywhere}
#mediaItems button{margin:.15rem}
#touchPointer{position:absolute;z-index:1;pointer-events:none;width:23px;height:30px;filter:drop-shadow(0 1px 2px #141827)}
#touchPointer::before,#touchPointer::after{content:"";position:absolute;inset:0;clip-path:polygon(0 0,0 86%,27% 65%,49% 100%,68% 90%,49% 58%,94% 58%)}
#touchPointer::before{background:#151922}
#touchPointer::after{inset:2px 4px 4px 2px;background:white}
#touchKeyboard:not([hidden]){display:flex;gap:.35rem;padding:.35rem;align-items:center;flex-wrap:wrap}
#touchKeyboard textarea{flex:1;min-width:9rem;font-size:16px;padding:.35rem;resize:vertical}
#touchKeyboardStatus{flex:1 0 100%;color:var(--ink)}
.screen p{padding:10px}
#transferStatus{margin:0;padding:6px 12px;border-top:1px solid var(--line);font-size:14px}
.remember{display:flex;align-items:center;gap:6px;margin-top:8px}.remember input{margin:0}
.device-actions{display:flex;gap:6px}
#devices li{align-items:stretch;flex-direction:column;padding:7px 0;border-bottom:1px solid var(--line)}
#devices li > button{background:#f4f8ff;color:var(--blue)}
#devices .device-actions button{font-size:13px;padding:5px 7px;flex:0;white-space:nowrap}
.desk:fullscreen{background:#102443;border:0;border-radius:0;width:100%;height:100%;overflow:hidden}
.desk:fullscreen .toolbar{background:white}
.desk:fullscreen #transferStatus{background:white}
@media(max-width:700px){.workspace{display:flex;flex-direction:column}.workspace.devices-hidden{display:flex}aside{max-height:35%;flex:none;width:100%;align-self:stretch}.desk{flex:1;height:auto}main{padding-inline:10px}.intro button{font-size:13px}}

#transferStatus{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
#transferProgress{width:clamp(90px,20vw,220px);accent-color:var(--blue)}
#transferPercent{font-variant-numeric:tabular-nums}
.brand-logo{width:149px;height:43px;border-radius:6px;object-fit:contain;background:white}
#accountLink{margin-left:auto;margin-right:14px;color:#d4e2fb;font-size:14px}

.device-status{font-size:13px;color:#4a6080}#registeredHint{font-size:14px}#registerLink{display:inline-block;margin:2px 0 10px;color:#234fa4;font-weight:650}

/* Keep the viewer as large as the viewport allows during an active session. */
.remote-session header,.remote-session main{width:calc(100% - 14px);max-width:none}
.remote-session header{min-height:38px;margin-top:5px;padding:3px 10px;border-radius:12px}
.remote-session header .brand-logo{width:112px;height:32px}
.remote-session header .role{display:none}
.remote-session header [data-help]{padding:4px 9px}
.remote-session main{padding:6px;margin-block:5px;border-radius:15px}
.remote-session .intro{margin-bottom:5px;padding:3px 8px;border-radius:9px}
.remote-session .intro h1{font-size:17px;line-height:1.3}
.remote-session #toggleDevices{font-size:13px;padding:4px 9px}
.remote-session .workspace{gap:6px}
.remote-session .workspace:not(.devices-hidden){grid-template-columns:minmax(0,1fr) clamp(215px,20vw,285px)}
.remote-session .desk,.remote-session aside{border-radius:12px}
.remote-session #view{border-radius:0 0 12px 12px}
.remote-session aside{padding:10px}
.remote-session aside h2{font-size:16px;margin-bottom:6px}
.remote-session #tabs{padding:3px 6px;gap:4px}
.remote-session #tabs button{font-size:13px;padding:4px 9px}
.remote-session .toolbar{padding:4px 8px;gap:5px}
.remote-session .session-info{flex-direction:row;align-items:center;gap:7px}
.remote-session .tools{gap:4px}
.remote-session .toolbar button{font-size:13px;padding:4px 8px}
.remote-session #transferStatus{padding:3px 8px}
.remote-session .screen{padding:0}
@media(max-width:720px){
  .remote-session header,.remote-session main{width:calc(100% - 8px)}
  .remote-session aside{max-height:25vh}
  .remote-session .toolbar button{font-size:12px;padding:3px 6px}
}
#devicePanel { padding: 12px; }
.device-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
#devicePanel .device-panel-heading h2 { margin:0; font-size:1rem; }
#devicePanel #registerLink { margin:0; font-size:.79rem; white-space:nowrap; }
.device-layout-options { display:flex; align-items:center; gap:.3rem; margin:.5rem 0 .35rem; }
#devicePanel .device-layout-options button { flex:0 0 auto; padding:.2rem .5rem; font-size:.76rem; }
#devicePanel .device-layout-options button[aria-pressed="true"] { background:#e5eaff; border-color:#a8b4ec; color:#24378b; }
#deviceCodePanel { margin:.25rem 0; padding:.15rem 0; }
#deviceCodePanel > summary, .device-menu > summary { font-size:.8rem; cursor:pointer; }
#deviceCodePanel #findDevice { margin:.4rem 0; gap:.3rem; }
#deviceCodePanel #findDevice input, #deviceCodePanel #findDevice button { padding:.35rem .55rem; font-size:.82rem; min-height:0; }
#devicePanel #devices { margin:.35rem 0; display:grid; gap:.28rem; }
#devicePanel #devices[data-layout="list"] li { display:grid; grid-template-columns:minmax(0,1fr) max-content; align-items:center; gap:.15rem .45rem; padding:.28rem 0; }
#devicePanel #devices[data-layout="list"] li > button { grid-column:1; }
#devicePanel #devices[data-layout="list"] .device-status { grid-column:1; }
#devicePanel #devices[data-layout="list"] .device-menu { grid-column:2; grid-row:1 / span 2; }
#devicePanel #devices[data-layout="list"] .device-menu[open] { grid-column:1 / -1; grid-row:auto; }
#devicePanel #devices[data-layout="cards"] { grid-template-columns:repeat(auto-fit,minmax(min(100%, 9rem),1fr)); gap:.4rem; align-items:start; }
#devicePanel #devices[data-layout="cards"] li { display:flex; flex-direction:column; gap:.25rem; padding:.45rem; border:1px solid var(--line); border-radius:.65rem; background:#fff9; }
#devicePanel #devices li > button { flex:none; margin:0; padding:.3rem .5rem; font-size:.85rem; line-height:1.2; min-height:0; text-align:start; overflow-wrap:anywhere; }
#devicePanel #devices .device-status { font-size:.72rem; overflow-wrap:anywhere; }
#devicePanel #devices .device-actions { display:grid; grid-template-columns:minmax(0,1fr); gap:.25rem; margin-top:.25rem; }
#devicePanel #devices .device-actions button { width:100%; min-width:0; text-align:start; padding:.3rem .45rem; font-size:.75rem; line-height:1.25; white-space:normal; overflow-wrap:normal; }
#devicePanel #importPanel { margin:.35rem 0 0; }

