/* Shared desktop/web interface: restrained colors, 4px spacing, visible focus. */
:root { color-scheme:light; --ink:#24324a; --muted:#607086; --blue:#2864d9; --line:#e0e6ee; --paper:#fff; --mono:"Cascadia Mono",Consolas,"SFMono-Regular",monospace; font-family:"Segoe UI",-apple-system,BlinkMacSystemFont,Arial,sans-serif; font-size:14px; background:#f5f7fa; color:var(--ink); font-synthesis:none; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; display:flex; flex-direction:column; }
button,input { font:inherit; }
button { cursor:pointer; }
button,a,.file-button { touch-action:manipulation; }
button:disabled { cursor:not-allowed; opacity:.55; }
button:focus-visible,a:focus-visible,input:focus-visible,.file-button:focus-visible { outline:3px solid #97b9ff; outline-offset:3px; }
a { color:inherit; text-decoration:none; }
[hidden] { display:none!important; }
svg { display:block; flex-shrink:0; width:20px; height:20px; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.skip-link { position:fixed; top:8px; left:8px; padding:12px 18px; background:#fff; color:var(--blue); border:1px solid var(--blue); z-index:50; transform:translateY(-160%); }
.skip-link:focus { transform:none; }
.masthead { background:#fff; border-bottom:1px solid var(--line); }
.header-inner { max-width:1144px; padding:0 32px; margin:auto; min-height:76px; display:flex; align-items:center; gap:40px; }
.brand { display:flex; align-items:center; gap:10px; font-size:22px; letter-spacing:-.6px; font-weight:650; }
.brand-mark { width:34px; height:34px; color:var(--blue); stroke:none; }
nav { display:flex; align-self:stretch; gap:28px; }
.nav { color:var(--muted); padding:0 2px; border:0; border-bottom:2px solid transparent; background:transparent; font-size:13px; }
.nav:hover { color:var(--blue); }
.nav.active { color:var(--blue); border-color:var(--blue); font-weight:600; }
.mode { margin-left:auto; font-size:12px; color:var(--muted); white-space:nowrap; }
main { flex:1; width:100%; }
.page { max-width:1144px; margin:auto; padding:40px 32px 24px; }
.page-title { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:26px; }
h1 { font-size:27px; line-height:1.25; font-weight:650; letter-spacing:-.6px; margin:0; }
h2 { font-size:18px; line-height:1.4; font-weight:600; letter-spacing:-.25px; margin:0; }
p { margin:0; font-size:13px; line-height:1.7; }
.page-title p { color:var(--muted); margin-top:8px; max-width:600px; }
.connection { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--muted); flex-shrink:0; }
.connection i { width:7px; height:7px; border-radius:50%; background:#939fb1; }
.connection i.online { background:#209268; }
.access-board { display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--line); border-radius:12px; background:var(--paper); box-shadow:0 3px 12px #172d4c05; overflow:hidden; }
.host-panel,.connect-panel { padding:30px 32px; min-width:0; }
.connect-panel { border-left:1px solid var(--line); }
.panel-heading { display:flex; align-items:center; gap:12px; margin-bottom:28px; }
.panel-heading p { color:var(--muted); margin-top:3px; font-size:12px; }
.section-icon { display:grid; place-items:center; background:#eef4ff; color:var(--blue); width:40px; height:40px; border-radius:10px; flex-shrink:0; }
.section-icon svg { width:22px; height:22px; }
label:not(.check-label):not(.file-button),.field-label { display:block; font-size:13px; line-height:1.5; font-weight:500; color:#475773; margin:0 0 8px; }
.id-row { display:flex; align-items:center; justify-content:space-between; gap:12px; background:#f2f6fc; border:1px solid #e3ebf6; border-radius:8px; padding:15px 16px; }
#my-id { font:600 clamp(23px,2.7vw,36px)/1.4 var(--mono); white-space:nowrap; letter-spacing:.2px; color:#263f65; }
.icon-button { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border:1px solid transparent; background:transparent; color:#567292; border-radius:6px; }
.icon-button:hover { background:#e4ecf7; color:var(--blue); }
.id-help { font-size:12px; color:var(--muted); margin-top:10px; }
.pin-row { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:26px; }
#my-pin { font:500 23px/1.5 var(--mono); letter-spacing:4px; color:#354a6a; }
.host-footer { color:var(--muted); font-size:12px; margin-top:13px; }
.permission-note { display:flex; align-items:flex-start; gap:12px; border-top:1px solid var(--line); padding-top:23px; margin-top:26px; }
.permission-note>svg { color:#6b87a6; width:19px; height:21px; margin-top:2px; }
.permission-note strong { font-size:12px; font-weight:600; }
.permission-note p { color:var(--muted); font-size:12px; margin-top:4px; }
input:not([type=checkbox]):not([type=file]) { width:100%; height:44px; min-width:0; border:1px solid #ccd5e2; border-radius:7px; background:#fff; color:var(--ink); padding:0 12px; outline:none; margin-bottom:20px; font-size:14px; }
input::placeholder { color:#758399; opacity:1; }
input:not([type=checkbox]):focus { border-color:var(--blue); box-shadow:0 0 0 3px #e7efff; }
input:disabled { background:#f5f7fa!important; color:#7b899a; }
#remote-id { font-family:var(--mono); font-size:17px; letter-spacing:1px; }
.check-label { display:flex; align-items:flex-start; gap:9px; color:#52617a; font-size:12px; line-height:1.6; margin-bottom:23px; cursor:pointer; }
.check-label input { width:16px; height:16px; margin:1px 0 0; flex-shrink:0; accent-color:var(--blue); }
.primary,.secondary,.danger { min-height:40px; border-radius:7px; padding:10px 16px; font-size:13px; font-weight:500; display:inline-flex; align-items:center; justify-content:center; gap:10px; border:1px solid transparent; }
.primary { background:var(--blue); color:#fff; }
.primary:hover { background:#2057c0; }
.secondary { background:#fff; border-color:#cfd8e4; color:#435975; }
.secondary:hover { background:#f4f7fb; border-color:#aebed1; }
.compact { min-height:36px; font-size:12px; padding:7px 10px; }
.compact svg { width:16px; height:16px; }
.connect-button { width:100%; min-height:44px; }
.connect-button svg { width:18px; height:18px; }
.connect-foot { font-size:12px; color:var(--muted); margin-top:16px; }
.join-progress { margin-top:16px; padding:13px; border:1px solid #d9e5fb; border-radius:7px; background:#f5f8ff; }
.join-progress p { font-size:12px; color:#405f8d; margin-bottom:10px; }
.browser-note { display:flex; align-items:flex-start; gap:11px; margin-top:22px; padding:0 4px; }
.browser-note svg { width:18px; height:18px; margin-top:2px; color:#7189a5; }
.browser-note p { color:var(--muted); font-size:12px; max-width:880px; }
.browser-note strong { color:#52657f; font-weight:600; }
.page-footer { max-width:1144px; width:100%; margin:auto; padding:21px 32px; display:flex; justify-content:space-between; gap:20px; color:#6e7e94; font-size:11px; }
.settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.settings-panel { padding:26px 28px; background:#fff; border:1px solid var(--line); border-radius:10px; min-width:0; }
.muted { color:var(--muted); font-size:13px; line-height:1.75; }
.settings-panel>.muted { margin:10px 0 22px; }
.settings-actions { display:flex; flex-wrap:wrap; gap:10px; }
.secure-line { color:#59738d; font-size:12px; margin-top:18px; }
.system-panel { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:32px; }
.system-panel .muted { margin-top:8px; max-width:560px; }
.shortcut-note { font-size:12px; color:var(--muted); flex-shrink:0; line-height:2.2; }
kbd { display:inline-block; border:1px solid #ccd5e2; background:#f5f7fa; border-radius:4px; padding:1px 5px; font:11px/1.5 var(--mono); color:#4c607a; }
.session-header { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.session-header h1 { font-size:23px; }
.session-header p { margin-top:6px; font-size:12px; }
.danger { border-color:#f0c9cd; color:#b54452; background:#fff; flex-shrink:0; }
.danger:hover { background:#fff1f2; }
.session-toolbar { display:flex; align-items:center; gap:20px; background:#fff; border:1px solid var(--line); border-radius:8px; padding:12px 14px; margin:22px 0 12px; }
.session-toolbar .check-label { margin:0; }
.session-toolbar>span { color:var(--muted); font-size:12px; }
.session-toolbar>button { margin-left:auto; }
.session-layout { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:14px; }
.screen-wrap { background:#202a39; border:1px solid #34435a; border-radius:8px; min-height:420px; display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden; }
video { width:100%; height:100%; object-fit:contain; max-height:68vh; outline:none; }
video:focus-visible { outline:2px solid #89b2ff; outline-offset:-3px; }
.screen-wrap:fullscreen { border-radius:0; }
.screen-wrap:fullscreen video { max-height:100vh; }
#screen-placeholder { position:absolute; color:#bdc9dc; font-size:13px; pointer-events:none; }
.chat-panel { background:#fff; border:1px solid var(--line); border-radius:8px; padding:18px; display:flex; flex-direction:column; max-height:68vh; }
.chat-heading { padding-bottom:15px; border-bottom:1px solid var(--line); }
.chat-heading h2 { font-size:15px; }
#messages { flex:1; overflow:auto; min-height:220px; padding:16px 0; font-size:12px; overflow-wrap:anywhere; }
.message { padding:10px 12px; margin-bottom:10px; border-radius:7px; background:#f3f6fa; color:#465873; white-space:pre-wrap; line-height:1.65; }
.message.mine { background:#edf3ff; color:#365987; }
.message small { display:block; color:#657b94; font-size:10px; margin-bottom:4px; }
.message a { display:block; color:var(--blue); text-decoration:underline; margin-top:8px; }
.message button { margin-top:8px; }
.file-button { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0 0; font-size:12px; color:#526e95; cursor:pointer; border:0; background:transparent; min-height:38px; text-align:left; }
.file-button:hover { color:var(--blue); }
.file-button small { color:var(--muted); font-size:10px; }
.file-button.is-disabled { color:#8591a1; pointer-events:none; }
dialog { color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:13px; padding:28px; max-width:440px; width:calc(100% - 32px); box-shadow:0 20px 90px #142b4b33; }
dialog::backdrop { background:#25385270; }
.dialog-icon { display:grid; place-items:center; width:42px; height:42px; background:#eef4ff; color:var(--blue); border-radius:10px; margin-bottom:18px; }
dialog h2 { font-size:21px; margin-bottom:12px; }
dialog p { margin-bottom:12px; }
dialog .check-label { margin-top:20px; }
.dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:25px; }
#toast { position:fixed; bottom:23px; left:50%; transform:translateX(-50%); background:#293e5c; color:#fff; padding:13px 20px; border-radius:8px; font-size:12px; line-height:1.6; max-width:min(600px,90vw); z-index:20; box-shadow:0 5px 25px #152e4826; }
@media(max-width:980px) { .header-inner{gap:28px}.host-panel,.connect-panel{padding:26px 24px}.panel-heading h2{font-size:16px}#my-id{font-size:29px}.system-panel{align-items:flex-start;flex-direction:column;gap:18px}.session-layout{grid-template-columns:1fr}.chat-panel{max-height:380px}#messages{min-height:160px} }
@media(max-width:700px) {
  .header-inner{min-height:70px;gap:20px;padding:0 20px}.brand{font-size:20px;gap:8px}.brand-mark{width:30px;height:30px}nav{gap:20px}.nav{font-size:12px}.mode{display:none}
  .page{padding:26px 20px 20px}.page-title{align-items:flex-start;flex-direction:column;gap:14px;margin-bottom:20px}h1{font-size:25px}.page-title p{font-size:12px}.connection{font-size:11px}
  .access-board{grid-template-columns:1fr}.connect-panel{border-left:0;border-top:1px solid var(--line)}.host-panel,.connect-panel{padding:25px}.panel-heading{margin-bottom:24px}.panel-heading h2{font-size:17px}#my-id{font-size:clamp(23px,7vw,35px)}.id-row{padding:12px}.permission-note{margin-top:22px;padding-top:18px}.browser-note{margin-top:18px}
  .settings-grid{grid-template-columns:1fr;gap:16px}.settings-panel{padding:23px}.shortcut-note{flex-shrink:1}.settings-panel .primary{font-size:12px;padding:10px 13px}.page-footer{padding:20px;font-size:10px}.page-footer>span:last-child{display:none}
  .session-header{align-items:flex-start;flex-direction:column;gap:14px}.session-header h1{font-size:21px;overflow-wrap:anywhere}.session-toolbar{flex-wrap:wrap;gap:12px}.session-toolbar>button{margin-left:0}.screen-wrap{min-height:250px}.dialog-actions{flex-wrap:wrap}
}
@media(max-width:370px) { .header-inner{padding:0 14px;gap:16px}nav{gap:14px}.nav{font-size:11px}.brand{font-size:19px}.page{padding-left:14px;padding-right:14px}.host-panel,.connect-panel{padding:22px 18px}.id-row{gap:8px}#my-id{font-size:23px}.pin-row{gap:10px}#my-pin{font-size:21px;letter-spacing:3px}.settings-panel{padding:20px 18px} }
@media(prefers-reduced-motion:reduce) { *{scroll-behavior:auto!important;transition:none!important} }
.access-board.viewer-only { grid-template-columns:1fr; max-width:650px; }.viewer-only .connect-panel { border-left:0; }
#purchase-notice { position:fixed; bottom:28px; right:28px; z-index:30; max-width:400px; box-shadow:0 12px 50px #263a5520; }
.control-hint { font-size:12px; color:var(--muted); margin:10px 0 18px; max-width:850px; }
.check-label:has(input:disabled) { color:#8792a2; cursor:not-allowed; }
#check-control { margin-top:12px; }
.host-sharing { background:white; border:1px solid var(--line); border-radius:8px; min-height:420px; padding:42px 36px; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; gap:18px; }
.host-sharing>svg { width:48px; height:48px; color:var(--blue); stroke-width:1.2; }
.host-sharing .muted { max-width:560px; }
.host-shortcut { color:var(--muted); font-size:12px; border-top:1px solid var(--line); padding-top:18px; margin-top:8px; }
.history-panel { margin-top:24px; background:#fff; border:1px solid var(--line); border-radius:10px; padding:24px 28px; }
.history-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.history-heading .muted { font-size:12px; margin-top:4px; }
.history-row { display:grid; grid-template-columns:36px minmax(160px,1fr) minmax(160px,1fr) auto auto; align-items:center; gap:16px; padding:16px 0; border-top:1px solid var(--line); }
.history-row>svg { color:#6884a2; width:26px; height:26px; }
.history-device strong { display:block; font:500 16px/1.6 var(--mono); }
.history-device small,.history-state small { display:block; color:var(--muted); font-size:11px; margin-top:3px; }
.history-state span { font-size:12px; color:#6f7b8c; }
.history-state span::before { content:''; display:inline-block; width:7px; height:7px; background:currentColor; border-radius:50%; margin-right:7px; }
.history-state.online span { color:#23845f; }.history-state.busy span { color:#af7a28; }
.history-note { color:var(--muted); font-size:11px; margin-top:16px; }
@media(max-width:700px) { .history-panel{padding:22px}.history-heading{align-items:flex-start}.history-row{grid-template-columns:28px 1fr auto;gap:12px}.history-state{grid-column:2}.history-row>.secondary{grid-column:2;justify-self:start}.history-row>.icon-button{grid-column:3;grid-row:1 / span 3}.host-sharing{padding:28px;min-height:320px} }
