:root{
  --bg:#fff8ef;
  --card:#ffffff;
  --ink:#241609;
  --muted:#7a6957;
  --accent:#f28c28;
  --accent-dark:#b85d10;
  --accent-soft:#fff0da;
  --line:#ead7c1;
  --ok:#17803b;
  --bad:#c62828;
  --warn:#a05a00;
  --shadow:0 16px 40px rgba(75,42,5,.12);
}
*{box-sizing:border-box}
body{margin:0;background:linear-gradient(135deg,#fff8ef 0%,#fff2df 46%,#fffaf4 100%);color:var(--ink);font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;min-height:100vh}
.shell{width:min(1180px,94vw);margin:0 auto;padding:24px 0 32px}.shell.narrow{width:min(920px,94vw)}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.brand{display:flex;align-items:center;gap:14px}.brand.compact h1{font-size:1.35rem}.brand-mark{width:58px;height:58px;border-radius:18px;background:linear-gradient(135deg,var(--accent),#ffbe63);display:grid;place-items:center;color:#fff;font-weight:900;letter-spacing:.5px;box-shadow:var(--shadow)}
h1{font-size:2rem;line-height:1.08;margin:0}h2{margin:0 0 12px;font-size:1.15rem}p{line-height:1.5}.brand p,.hint,.path-line,.card small{color:var(--muted);margin:.25rem 0 0}.top-actions,.split-actions,.workspace-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.card,.notice-card{background:rgba(255,255,255,.94);border:1px solid var(--line);border-radius:24px;padding:20px;box-shadow:var(--shadow)}.notice-card{margin-bottom:18px;border-left:8px solid var(--accent)}.notice-card p{margin:.3rem 0}.grid-main{display:grid;grid-template-columns:1.05fr .95fr;gap:18px;margin-bottom:18px}.card-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.card-title-row.wrap{align-items:flex-start;flex-wrap:wrap}.qr-box{min-height:300px;display:grid;place-items:center;border:2px dashed #f1c58f;background:var(--accent-soft);border-radius:22px;margin:14px 0}.qr-box canvas{background:#fff;border:14px solid #fff;border-radius:18px;box-shadow:0 10px 26px rgba(54,27,0,.16)}
.loader{width:42px;height:42px;border-radius:50%;border:5px solid #ffd9aa;border-top-color:var(--accent);animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
button,.primary-btn,.ghost-btn,.danger-btn{border:0;border-radius:14px;padding:12px 16px;font-weight:800;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.2s transform,.2s opacity,.2s background}.primary-btn{background:linear-gradient(135deg,var(--accent),#ffad45);color:#fff}.ghost-btn{background:#fff7ed;color:var(--accent-dark);border:1px solid #efc99b}.danger-btn{background:#fff1f1;color:var(--bad);border:1px solid #f0b6b6}button:hover,.primary-btn:hover,.ghost-btn:hover,.danger-btn:hover{transform:translateY(-1px)}button:disabled{opacity:.45;cursor:not-allowed;transform:none}.wide{width:100%}
.copy-row,.upload-box{display:flex;gap:10px;align-items:center;flex-wrap:wrap}input[type=text],input:not([type]),input[type=file],.copy-row input{border:1px solid var(--line);border-radius:14px;background:#fff;padding:12px 14px;min-height:44px;color:var(--ink)}.copy-row input{flex:1;min-width:260px}.upload-box{background:#fff9f0;border:1px dashed #efc99b;border-radius:18px;padding:14px;margin:12px 0}.upload-box input[type=file]{flex:1;min-width:220px;background:#fff}
.badge{border-radius:999px;padding:7px 11px;font-size:.78rem;font-weight:900;text-transform:uppercase;letter-spacing:.03em}.badge.gray{background:#eee5db;color:#6d5a48}.badge.ok{background:#e6f6ea;color:var(--ok)}.badge.warn{background:#fff3d8;color:var(--warn)}.badge.bad{background:#ffe6e6;color:var(--bad)}
.status-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:12px 0}.status-grid.single{grid-template-columns:1fr}.status-grid>div{border:1px solid var(--line);border-radius:18px;padding:13px;background:#fffaf4;display:grid;grid-template-columns:auto 1fr;column-gap:10px;align-items:center}.status-grid small{grid-column:2;color:var(--muted)}.dot{width:13px;height:13px;border-radius:999px;background:#bbb;box-shadow:0 0 0 4px rgba(0,0,0,.04)}.dot.ok{background:var(--ok)}.dot.bad{background:var(--bad)}.dot.warn{background:#ff9f1c}.timer-box{display:flex;justify-content:space-between;align-items:center;background:linear-gradient(135deg,#fff7eb,#fff);border:1px solid var(--line);padding:14px;border-radius:18px;margin:12px 0}.timer-box strong{font-size:1.4rem;color:var(--accent-dark)}
.audit-ok,.audit-bad{margin-top:12px;border-radius:16px;padding:12px;font-weight:800}.audit-ok{background:#ecfff1;color:var(--ok);border:1px solid #bfe9ca}.audit-bad{background:#fff0f0;color:var(--bad);border:1px solid #f1bcbc}
.workspace-card{margin-bottom:16px}.tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);margin:14px 0}.tab{background:#fff7ed;border:1px solid var(--line);border-bottom:0;border-radius:14px 14px 0 0;color:var(--accent-dark)}.tab.active{background:var(--accent);color:white}.tab-panel{display:none}.tab-panel.active{display:block}.folder-tools{display:grid;grid-template-columns:auto 1fr auto 1fr auto auto;gap:10px;align-items:center;margin:14px 0}.workspace-list{border:1px solid var(--line);border-radius:20px;overflow:hidden;background:#fff}.row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid #f2e4d3}.row:last-child{border-bottom:0}.row-main{min-width:0}.row-title{font-weight:900;word-break:break-word}.row-meta{font-size:.84rem;color:var(--muted);margin-top:4px}.row-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.mini-btn{font-size:.82rem;padding:8px 10px;border-radius:10px}.folder-row .row-title:before{content:'📁 ';}.file-row .row-title:before{content:'📄 ';}.empty{padding:24px;text-align:center;color:var(--muted)}
.footer{text-align:center;color:#6b5948;font-size:.9rem;padding:18px 16px 28px}.mobile-shell{width:min(720px,94vw);margin:0 auto;padding:16px 0}.mobile-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.mobile-notice{position:relative}.mobile-tools{grid-template-columns:1fr 1fr;}.mobile-tools button,.mobile-tools input{width:100%}.muted{color:var(--muted)}code{background:#fff3df;border:1px solid #efcfaa;border-radius:8px;padding:2px 6px}.check-table{width:100%;border-collapse:collapse}.check-table th,.check-table td{padding:10px;border-bottom:1px solid var(--line);text-align:left}.toast{position:fixed;right:18px;bottom:18px;background:#231300;color:#fff;padding:13px 16px;border-radius:16px;box-shadow:var(--shadow);max-width:360px;z-index:30}.toast.bad{background:#8b0000}.toast.ok{background:#11602c}
@media(max-width:860px){.topbar,.grid-main{grid-template-columns:1fr;display:grid}.topbar{gap:14px}.status-grid{grid-template-columns:1fr}.folder-tools{grid-template-columns:1fr 1fr}.qr-box{min-height:240px}.row{grid-template-columns:1fr}.row-actions{justify-content:flex-start}.brand-mark{width:50px;height:50px}h1{font-size:1.55rem}}

.network-box{margin-top:14px;padding:14px;border:1px solid rgba(245,124,0,.22);border-radius:18px;background:#fff8ef}
.network-box label{display:block;font-weight:800;color:#7a3d00;margin-bottom:8px}
.network-box code{background:#fff;border:1px solid rgba(122,61,0,.18);border-radius:7px;padding:1px 5px}

.network-readiness{margin-bottom:18px;border-top:6px solid var(--accent)}
.network-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:14px 0}
.network-summary-grid>div{background:#fffaf4;border:1px solid var(--line);border-radius:18px;padding:13px;min-width:0}
.network-summary-grid small{display:block;color:var(--muted);font-weight:700;margin-bottom:6px}
.network-summary-grid strong{display:block;word-break:break-word;font-size:.95rem}
.network-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 0}
.suggestion-list{display:grid;gap:10px;margin:12px 0}
.suggestion-item{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;border:1px solid #efc99b;background:#fff9f1;border-radius:16px;padding:12px}
.suggestion-item strong,.suggestion-item code{word-break:break-word}
.suggestion-item small{display:block;color:var(--muted);margin-top:4px}
.network-device-panel{border:1px solid var(--line);background:#fffdf9;border-radius:18px;padding:14px;margin-top:12px}
.network-device-panel h3{margin:0 0 8px;font-size:1rem;color:#7a3d00}
.mini-list{display:grid;gap:8px}
.mini-item{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;padding:10px;border:1px solid #f1ddc5;border-radius:14px;background:#fff}
.mini-item-title{font-weight:900;word-break:break-word}
.mini-item-meta{font-size:.84rem;color:var(--muted);margin-top:3px;word-break:break-word}
.limitation-box{margin-top:12px;border-radius:16px;border:1px solid #f1d3a9;background:#fff7e8;color:#6b430d;padding:12px;font-size:.9rem}
.limitation-box ul{margin:6px 0 0;padding-left:18px}
.localhost-warning{border-color:#f0b6b6!important;background:#fff1f1!important;color:#8b0000!important}
@media(max-width:980px){.network-summary-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.network-summary-grid,.suggestion-item,.mini-item{grid-template-columns:1fr}.network-actions button{width:100%}}


/* Version visibility and cache-replacement confirmation */
.version-line{
  display:inline-block;
  margin-bottom:8px;
  padding:8px 12px;
  border:1px solid #efc99b;
  border-radius:999px;
  background:#fff9f1;
  color:#7a3d00;
  font-weight:800;
}
.version-pill{
  display:inline-block;
  vertical-align:middle;
  margin-left:8px;
  padding:3px 8px;
  border-radius:999px;
  background:#fff3df;
  border:1px solid #efc99b;
  color:#8a4100;
  font-size:.72rem;
  font-weight:900;
}
.version-card{
  border-color:#efc99b;
  background:linear-gradient(135deg,#fffaf3,#fff4df);
}


/* v1.0.5 role-aware network pairing */
.mode-card{
  display:grid;
  gap:5px;
  margin:12px 0;
  padding:13px 14px;
  border-radius:18px;
  border:1px solid #efc99b;
  background:#fff9f1;
}
.mode-card strong{color:#7a3d00}
.mode-card span{color:var(--muted);line-height:1.45}
.connectivity-help{
  margin:12px 0;
  padding:13px 14px;
  border-radius:18px;
  border:1px solid #ead7c1;
  background:#fffdf8;
  color:#5f4934;
  line-height:1.5;
}
.connectivity-help.hotspot{border-color:#efc99b;background:#fff3df;color:#7a3d00}
.connectivity-help.warn{border-color:#f0b6b6;background:#fff1f1;color:#8b0000}
.section-subtitle{font-size:1rem;color:#7a3d00;margin:14px 0 8px}
.suggestion-item.hotspot-route{border-color:#f28c28;background:#fff3df}
.missing-session-card{border-left:8px solid var(--warn);margin-bottom:18px}

/* v1.0.6 simple pairing-first interface */
.pairing-shell{width:min(1180px,94vw)}
.simple-topbar{align-items:center}
.connect-first{display:grid;gap:18px;margin-bottom:18px}
.hero-pairing-card{border-top:6px solid var(--accent)}
.pairing-layout{display:grid;grid-template-columns:.95fr 1.05fr;gap:18px;align-items:start;margin-top:14px}
.connection-choice-panel,.qr-panel,.mobile-connection-summary,.qr-scanner-box,.mobile-consent-box{background:#fffaf4;border:1px solid var(--line);border-radius:22px;padding:16px}
.simple-step{display:flex;align-items:center;gap:10px;margin-bottom:10px;color:#5a2b00}
.simple-step span{width:30px;height:30px;border-radius:999px;background:linear-gradient(135deg,var(--accent),#ffad45);color:#fff;display:grid;place-items:center;font-weight:900;flex:0 0 auto}
.simple-step strong{font-size:1.05rem}
.compact{margin-top:10px;margin-bottom:10px}
.simple-list{margin-top:12px}
.connection-option{width:100%;text-align:left;display:grid;gap:4px;background:#fff;border:1px solid #efc99b;border-radius:18px;padding:14px;color:var(--ink);box-shadow:none;transform:none!important}
.connection-option:hover{background:#fff4e4}
.connection-option.recommended{border-width:2px;background:#fff7ec}
.connection-option.hotspot-route{border-color:#f28c28;background:#fff1dc}
.connection-option span{font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;font-weight:900;color:#8a4100}
.connection-option strong{word-break:break-word;color:#271600}
.connection-option small{color:var(--muted);line-height:1.35}
.advanced-box{margin-top:12px;border:1px dashed #efc99b;border-radius:16px;padding:10px 12px;background:#fffdf9}
.advanced-box summary{cursor:pointer;font-weight:900;color:#7a3d00}
.mt-10{margin-top:10px}
.simple-qr{min-height:292px;margin:10px 0}
.simplified-consent{border-left:8px solid #f28c28}
.compact-status{grid-template-columns:repeat(4,1fr)}
.compact-status.single{grid-template-columns:1fr}
.mini-security-notice{border:1px solid #efc99b;background:#fff7ec;color:#5f3a12;border-radius:18px;padding:13px;margin:12px 0;line-height:1.45}
.connected-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;border-top:6px solid var(--ok)}
.connected-banner[hidden],.workspace-card[hidden],#mobileStatusPanel[hidden],#mobileConsentBox[hidden],#scannerBox[hidden],#mobileConnectedArea[hidden],#mobileConnectedBanner[hidden],#connectedArea[hidden],#connectedBanner[hidden]{display:none!important}
.mobile-connection-summary{display:grid;gap:10px;margin-top:12px}
.mobile-reached-box{display:grid;gap:5px;border:1px solid #ead7c1;border-radius:16px;background:#fff;padding:12px}
.mobile-reached-box small{font-weight:800;color:var(--muted)}
.mobile-reached-box strong{word-break:break-word}
.qr-scanner-box,.mobile-consent-box{margin-top:14px}
.scanner-frame{min-height:260px;border:2px dashed #efc99b;border-radius:22px;background:#fff7ed;display:grid;place-items:center;overflow:hidden}
.scanner-frame video{width:100%;height:260px;object-fit:cover;background:#000}
.scan-placeholder{color:#8a4100;font-weight:900}
.text-bad{color:var(--bad)!important;font-weight:800}
@media(max-width:900px){.pairing-layout{grid-template-columns:1fr}.compact-status{grid-template-columns:1fr 1fr}.connected-banner{display:grid}}
@media(max-width:620px){.compact-status{grid-template-columns:1fr}.qr-panel,.connection-choice-panel,.mobile-connection-summary,.qr-scanner-box,.mobile-consent-box{padding:13px}.scanner-frame,.scanner-frame video{min-height:220px;height:220px}}

/* v1.0.7 scanner-free pairing code flow */
.easy-pairing-panel{display:grid;gap:12px}
.phone-open-box,.pairing-code-box,.pair-code-entry{border:1px solid #efc99b;background:#fff8ef;border-radius:18px;padding:14px}
.phone-open-box small,.pairing-code-box small{display:block;color:var(--muted);font-weight:800;margin-bottom:8px}
.pairing-code-box{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;text-align:center}
.pairing-code-box small{grid-column:1/-1;text-align:left}
.pairing-code-box strong{font-size:3.1rem;letter-spacing:.12em;line-height:1;color:#7a3d00;background:#fff;border:2px dashed #f28c28;border-radius:18px;padding:16px 18px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.optional-qr-box .simple-qr{min-height:245px}
.optional-qr-box .qr-box canvas{max-width:240px!important;max-height:240px!important}
.pair-code-entry{display:grid;gap:12px}
.pair-code-entry input{width:100%;font-size:2.15rem;text-align:center;letter-spacing:.18em;font-weight:900;color:#7a3d00;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;border:2px solid #efc99b;background:#fff}
@media(max-width:620px){.pairing-code-box{grid-template-columns:1fr}.pairing-code-box strong{font-size:2.25rem}.pair-code-entry input{font-size:1.8rem}}


/* v1.0.8 session sync and reconnect fix */
.session-terminal-notice{border:2px solid #f0b6b6;background:#fff1f1;color:#7a1600;border-radius:20px;padding:18px;text-align:center;display:grid;gap:10px}
.session-terminal-notice strong{font-size:1.2rem;color:#8b0000}
.session-terminal-notice p{margin:0;color:#6b2a1f;line-height:1.45}

/* v1.0.9 simplified one-row pairing and desktop-name flow */
.compact-pairing-card{padding:18px}
.pairing-cards-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;align-items:stretch;margin-top:14px}
.pair-card{background:#fffaf4;border:1px solid var(--line);border-radius:22px;padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.pair-card-head{display:flex;align-items:center;gap:9px;color:#5a2b00;margin-bottom:2px}
.pair-card-head span{width:28px;height:28px;border-radius:999px;background:linear-gradient(135deg,var(--accent),#ffad45);color:#fff;display:grid;place-items:center;font-weight:900;flex:0 0 auto}
.pair-card-head strong{font-size:1.02rem}
.desktop-name-box{display:grid;gap:3px;border:1px solid #efc99b;background:#fff8ef;border-radius:16px;padding:10px 12px}
.desktop-name-box small{font-weight:800;color:var(--muted);margin:0}
.desktop-name-box strong{font-size:1.05rem;word-break:break-word;color:#7a3d00}
.compact-options{max-height:235px;overflow:auto;padding-right:4px}
.compact-options .connection-option{padding:11px 12px;border-radius:15px}
.compact-options .connection-option small{font-size:.78rem}
.compact-code.pairing-code-box strong{font-size:2.25rem;padding:12px 14px}
.vertical-status{grid-template-columns:1fr;margin:0;gap:8px}
.vertical-status>div{padding:10px 11px;border-radius:14px}
.compact-timer{padding:10px 12px;margin:0}.compact-timer strong{font-size:1.1rem}
.minimal-notice{font-size:.88rem;margin:0;padding:10px 12px}.minimal-notice strong{display:none}
.name-route{background:#fffdf8;border-style:dashed}.name-route span{color:#704b00}
.minimal-mobile-summary{margin-top:10px}.compact-reached-box{gap:6px}.compact-reached-box details{margin-top:6px}
@media(max-width:1100px){.pairing-cards-row{grid-template-columns:1fr 1fr}.pairing-cards-row .consent-card{grid-column:1/-1}.vertical-status{grid-template-columns:repeat(4,1fr)}}
@media(max-width:760px){.pairing-cards-row{grid-template-columns:1fr}.vertical-status{grid-template-columns:1fr}.compact-code.pairing-code-box strong{font-size:2rem}.compact-options{max-height:none}}


/* v1.0.10 user-focused three-card connection layout */
.v1010-pairing-row{grid-template-columns:1.15fr .95fr .9fr}
.computer-details-card .phone-open-box{background:#fff;border:1px solid #f0c18b}
.connection-summary-line{display:flex;gap:10px;align-items:center;flex-wrap:wrap;border:1px solid #efc99b;background:#fff8ef;border-radius:16px;padding:10px 12px}
.connection-inline-text{color:#6e4300;font-weight:800;font-size:.92rem}
.connection-inline-text.hotspot::after{content:' • hotspot ready';font-weight:700;color:#8a4c00}
.connection-inline-text.warn{color:#8b0000}
.primary-phone-link input{font-weight:800;color:#5a2b00}
.primary-code-box{background:#fff3df}
.connection-state-box{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #efc99b;background:#fff8ef;border-radius:16px;padding:10px 12px}
.connection-state-box small{font-weight:800;color:var(--muted)}
.connection-status-only,.mobile-status-only{grid-template-columns:1fr}
.mobile-info-box{display:grid;gap:4px;border:1px solid #efc99b;background:#fff8ef;border-radius:16px;padding:10px 12px}
.mobile-info-box small{font-weight:800;color:var(--muted)}
.mobile-info-box strong{font-size:.96rem;color:#7a3d00;word-break:break-word}
.no-repeat-hint{margin-top:auto}
@media(max-width:1100px){.v1010-pairing-row{grid-template-columns:1fr 1fr}.v1010-pairing-row .mobile-status-card{grid-column:1/-1}.connection-status-only,.mobile-status-only{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.v1010-pairing-row{grid-template-columns:1fr}.v1010-pairing-row .mobile-status-card{grid-column:auto}.connection-status-only,.mobile-status-only{grid-template-columns:1fr}}

/* v1.0.11 simplified dropdown pairing screen */
.v1011-pairing-row{grid-template-columns:1.05fr .98fr .88fr}
.compact-title-row{margin-bottom:2px}.compact-title-row .hint{margin-top:3px}
.connection-select-box{display:grid;gap:7px;border:1px solid #efc99b;background:#fff8ef;border-radius:16px;padding:10px 12px}
.connection-select-box small{font-weight:800;color:var(--muted)}
.connection-select-box select{width:100%;border:1px solid #e6c29a;background:#fff;border-radius:14px;padding:11px 12px;font-weight:900;color:#5a2b00;font-size:.98rem}
.selected-route-box{background:#fff;border-color:#f0c18b}
.route-hint{margin:8px 0 0;color:#755333;font-size:.86rem;line-height:1.35}
.approval-summary{border-radius:18px;padding:14px;border:1px solid #efc99b;background:#fff8ef;color:#6e4300;font-weight:900;line-height:1.35}
.approval-summary.ready{border-color:#f28c28;background:#fff0db;color:#7a3d00}
.approval-summary.active{border-color:#b7e1c0;background:#eefaf0;color:var(--ok)}
.connection-stage-list{grid-template-columns:1fr;margin:0}.connection-stage-list>div[hidden]{display:none!important}
.mobile-state-box{background:#fff3df}.mobile-state-box strong{color:#5a2b00}
.pairing-steps-bottom{margin-top:14px;border:1px solid #efc99b;background:#fff8ef;border-radius:18px;padding:11px 13px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:#664112;font-size:.92rem}
.pairing-steps-bottom strong{color:#7a3d00;margin-right:4px}.pairing-steps-bottom span{background:#fff;border:1px solid #f1d2ad;border-radius:999px;padding:6px 10px}
#approveBtn[hidden]{display:none!important}
@media(max-width:1100px){.v1011-pairing-row{grid-template-columns:1fr 1fr}.v1011-pairing-row .mobile-status-card{grid-column:1/-1}}
@media(max-width:760px){.v1011-pairing-row{grid-template-columns:1fr}.v1011-pairing-row .mobile-status-card{grid-column:auto}.pairing-steps-bottom{display:grid}.pairing-steps-bottom span{border-radius:14px}}


/* v1.0.12 hosted-mode pairing interface base */
.hosting-mode-card .compact-title-row .hint{max-width:760px}
.v1012-hosting-row{grid-template-columns:1.05fr .98fr .88fr}
.hosted-address-box{background:#fff;border-color:#f0c18b}
.hosted-address-box input{font-weight:900;color:#5a2b00}
.local-testing-box{background:#fffaf3;border-color:#f2d3aa}
.hosted-flow-bottom{justify-content:center}
.hosted-mobile-summary{grid-template-columns:1fr!important}
.hosted-mobile-summary .mobile-reached-box{background:#fff8ef}
@media(max-width:1100px){.v1012-hosting-row{grid-template-columns:1fr 1fr}.v1012-hosting-row .mobile-status-card{grid-column:1/-1}}
@media(max-width:760px){.v1012-hosting-row{grid-template-columns:1fr}.v1012-hosting-row .mobile-status-card{grid-column:auto}}


/* v1.0.13 clean hosted pairing and true disconnect */
.v1012-hosting-row{grid-template-columns:.95fr 1.08fr .92fr}
.hosted-address-box{display:none!important}
.computer-details-card .primary-code-box{margin-top:auto}
.hosting-mode-card .compact-title-row .hint{max-width:none}
@media(max-width:1100px){.v1012-hosting-row{grid-template-columns:1fr 1fr}.v1012-hosting-row .mobile-status-card{grid-column:1/-1}}
@media(max-width:760px){.v1012-hosting-row{grid-template-columns:1fr}.v1012-hosting-row .mobile-status-card{grid-column:auto}}

/* v1.0.14 cleanup */
.primary-code-box[hidden] { display: none !important; }
.technical-details-box {
  margin-top: 12px;
  border-top: 1px solid rgba(124,45,18,.12);
  padding-top: 10px;
}
.technical-details-box summary {
  cursor: pointer;
  color: #7c2d12;
  font-weight: 800;
  font-size: 13px;
}
.prominent-phone-line strong {
  font-size: 18px;
}
.phone-label-box {
  margin: 12px 0;
  display: grid;
  gap: 6px;
}
.phone-label-box label {
  font-weight: 800;
  color: #7c2d12;
}
.phone-label-box label span {
  font-weight: 600;
  color: #8a6b5a;
}
.phone-label-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(124,45,18,.22);
  background: #fffaf4;
  font-size: 15px;
}


/* v1.0.15 active-state cleanup and single disconnect action */
#newSessionBtn[hidden], #connectionFlowCard[hidden], #desktopMobileStateBox[hidden] { display: none !important; }
.connection-control-card .split-actions { display: block; }
.connection-control-card .split-actions .danger-btn { width: 100%; }
.mobile-status-card .technical-details-box { margin-top: auto; }

/* v1.0.16 active-session timer and restored advanced local testing */
#advancedLocalTestingBox[hidden], #extendSessionBtn[hidden] { display: none !important; }
.status-expiry-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.expiry-inline,
.mobile-session-expiry-line {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, .18);
  color: #7c2d12;
  font-size: 13px;
  font-weight: 800;
}
.connection-control-card .split-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.connection-control-card .split-actions .ghost-btn,
.connection-control-card .split-actions .danger-btn {
  width: 100%;
}
.local-testing-box summary {
  cursor: pointer;
}
.local-testing-box[open] {
  background: #fffaf4;
  border-radius: 16px;
  padding: 10px;
  border: 1px dashed rgba(234, 88, 12, .28);
}


/* v1.0.17 icon-led pairing cards and compact session actions */
.hosting-mode-card .compact-title-row { margin-bottom: 4px; }
.hosting-mode-card .compact-title-row .hint { display: none !important; }
.pair-card-head.icon-head {
  justify-content: space-between;
  margin-bottom: 4px;
}
.pair-card-head.icon-head span {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid rgba(234, 88, 12, .22);
  box-shadow: 0 8px 18px rgba(124,45,18,.08);
}
.card-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #c2410c;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.connection-control-card .compact-session-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.connection-control-card .compact-session-actions .ghost-btn,
.connection-control-card .compact-session-actions .danger-btn {
  width: 100%;
  min-height: 42px;
  padding-left: 10px;
  padding-right: 10px;
  white-space: nowrap;
}
.connection-control-card .compact-session-actions #extendSessionBtn[hidden] + #revokeBtn,
.connection-control-card .compact-session-actions #revokeBtn:only-child {
  grid-column: 1 / -1;
}
@media (max-width: 440px) {
  .connection-control-card .compact-session-actions { grid-template-columns: 1fr; }
}

/* v1.0.20 larger purpose-specific pairing icons and clearer active/selected state */
.pair-card-head.icon-head {
  justify-content: center;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  margin-bottom: 8px;
  padding: 10px 8px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 20%, #fff7ed 0, #fff1df 48%, #fffaf4 100%);
  border: 1px solid rgba(234,88,12,.16);
}
.pair-card-head.icon-head span {
  width: 46px;
  height: 46px;
  font-size: 1.25rem;
  box-shadow: 0 10px 20px rgba(194,65,12,.18);
}
.card-icon {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  background: linear-gradient(145deg, #fffaf4, #ffedd5);
  border: 2px solid rgba(234,88,12,.32);
  box-shadow: 0 14px 28px rgba(124,45,18,.13);
}
.card-icon svg {
  width: 74px;
  height: 74px;
  stroke-width: 4.5;
  stroke: #a84300;
}
.card-icon .svg-file,
.card-icon .svg-screen,
.card-icon .svg-phone,
.card-icon .svg-shield {
  fill: rgba(255,237,213,.72);
}
.card-icon .svg-check {
  stroke: #15803d;
  stroke-width: 6;
}
.card-icon .svg-wave,
.card-icon .svg-arrow {
  stroke: #ea580c;
  stroke-width: 5;
}
.card-icon .svg-lock,
.card-icon .svg-stand,
.card-icon .svg-phone-detail {
  stroke: #7c2d12;
}
.pair-card {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.pair-card.is-current {
  border-color: rgba(234,88,12,.68);
  box-shadow: 0 18px 34px rgba(234,88,12,.14);
  background: #fff7ed;
}
.pair-card.is-current .pair-card-head.icon-head {
  border-color: rgba(234,88,12,.40);
  background: radial-gradient(circle at 50% 16%, #ffedd5 0, #fff1df 50%, #fffaf4 100%);
}
.pair-card.is-current .card-icon {
  transform: scale(1.04);
  border-color: rgba(234,88,12,.65);
  box-shadow: 0 18px 34px rgba(234,88,12,.20);
}
.pair-card.is-current .pair-card-head.icon-head span::after {
  content: '•';
  position: absolute;
  transform: translate(17px,-17px);
  color: #15803d;
  font-size: 1.35rem;
  line-height: 1;
}
.pair-card.is-complete,
.pair-card.is-connected {
  border-color: rgba(21,128,61,.35);
  background: #f4fbf5;
}
.pair-card.is-complete .card-icon,
.pair-card.is-connected .card-icon {
  border-color: rgba(21,128,61,.42);
  background: linear-gradient(145deg, #f7fff8, #dcfce7);
}
.pair-card.is-complete .pair-card-head.icon-head span,
.pair-card.is-connected .pair-card-head.icon-head span {
  background: linear-gradient(135deg, #15803d, #4ade80);
}
@media (max-width: 760px) {
  .pair-card-head.icon-head { min-height: 84px; }
  .card-icon { width: 78px; height: 78px; border-radius: 24px; }
  .card-icon svg { width: 64px; height: 64px; }
}
.pair-card-head.icon-head span { position: relative; }

/* v1.0.26 stable UI polish: workspace-focused active state */
.connected-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(21,128,61,.22);
  background: linear-gradient(135deg, #f0fdf4, #fffaf4);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(21,128,61,.08);
}
.connected-strip[hidden] { display: none !important; }
.connected-strip-main,
.connected-strip-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.live-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 6px rgba(22,163,74,.12);
  flex: 0 0 auto;
}
.connected-strip strong { color: #14532d; }
.connected-strip span { color: #5a2b00; font-weight: 800; }
.connected-timer {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(22,163,74,.22);
  background: #ffffff;
  font-size: .84rem;
}
.workspace-card {
  border-top: 4px solid rgba(22,163,74,.50);
}
.workspace-card h2::before {
  content: '↔ ';
  color: #ea580c;
}
.upload-box {
  position: relative;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.upload-box::after {
  content: 'Drop file here also supported';
  color: #8a4100;
  font-size: .82rem;
  font-weight: 800;
  opacity: .72;
}
.upload-box.drag-over {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 18px 32px rgba(22,163,74,.16);
  transform: translateY(-1px);
}
.upload-box.drag-over::after {
  content: 'Release to upload';
  color: #15803d;
  opacity: 1;
}
.row {
  transition: background .16s ease, transform .16s ease;
}
.row:hover {
  background: #fff7ed;
}
.folder-row .row-title:before,
.file-row .row-title:before {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  margin-right: 6px;
  background: #ffedd5;
}
.file-row .row-title:before { background: #fef3c7; }
@media(max-width:760px){
  .connected-strip { display: grid; }
  .connected-strip-actions { display: grid; grid-template-columns: 1fr; }
  .connected-strip-actions .mini-btn { width: 100%; }
  .upload-box::after { width: 100%; }
}


/* v1.0.27 stage-coloured connection cards */
.active-only-status[hidden] { display: none !important; }
.mobile-stage-mini {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 2px;
}
.mini-stage {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.25);
  background: rgba(255,255,255,.72);
  color: #6b4a2a;
  font-size: .84rem;
  font-weight: 800;
}
.mini-stage span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: 0 0 0 4px rgba(148,163,184,.13);
  flex: 0 0 auto;
}
.mini-stage.current {
  border-color: rgba(234,179,8,.35);
  background: #fffbeb;
  color: #854d0e;
}
.mini-stage.current span {
  background: #eab308;
  box-shadow: 0 0 0 4px rgba(234,179,8,.16);
}
.mini-stage.done {
  border-color: rgba(22,163,74,.28);
  background: #f0fdf4;
  color: #14532d;
}
.mini-stage.done span {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22,163,74,.13);
}
.computer-details-card.is-complete {
  border-color: rgba(21,128,61,.45);
  background: linear-gradient(180deg,#f0fdf4,#fffaf4);
}
.mobile-status-card.mobile-opened,
.mobile-status-card.is-current {
  border-color: rgba(234,179,8,.48);
  background: linear-gradient(180deg,#fffbeb,#fffaf4);
}
.mobile-status-card.mobile-consented,
.mobile-status-card.is-complete,
.mobile-status-card.is-connected {
  border-color: rgba(21,128,61,.45);
  background: linear-gradient(180deg,#f0fdf4,#fffaf4);
}
.connection-control-card.is-current {
  border-color: rgba(234,88,12,.60);
  background: linear-gradient(180deg,#fff7ed,#fffaf4);
}
.connection-control-card.is-connected {
  border-color: rgba(21,128,61,.45);
  background: linear-gradient(180deg,#f0fdf4,#fffaf4);
}
.session-status-line.active-only-status {
  margin-bottom: 2px;
}


/* v1.0.28 cleaner connection guidance and progressive mobile stages */
.network-guide-line {
  margin: 6px 0 0;
  max-width: 920px;
  color: #6b4a2a;
  font-weight: 700;
  font-size: .94rem;
  line-height: 1.45;
}
.compact-session-actions[hidden],
#revokeBtn[hidden],
#mobileRevokeBtn[hidden],
#workspaceDisconnectBtn[hidden],
#mobileWorkspaceDisconnectBtn[hidden] {
  display: none !important;
}
.mobile-stage-mini:empty { display: none !important; }
.mobile-stage-mini .mini-stage[hidden] { display: none !important; }
.prominent-phone-line strong,
.desktop-name-box strong {
  font-size: .98rem;
}

/* v1.0.29 cleaner connection layout and icon-cell corner labels */
.network-title-row {
  align-items: flex-start;
  gap: 14px;
}
.network-title-row > div:first-child {
  min-width: 0;
}
.network-option-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.network-guide-prefix {
  font-weight: 900;
  color: #7c2d12;
  margin-right: 2px;
}
.network-option-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(234,88,12,.18);
  background: linear-gradient(135deg,#fff7ed,#fffaf4);
  color: #5a2b00;
  box-shadow: 0 5px 12px rgba(124,45,18,.05);
}
.network-option-pill b {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg,#ea580c,#ffad45);
  font-size: .78rem;
}
.top-connection-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 230px;
}
.top-connection-actions[hidden] { display: none !important; }
.top-connection-actions .mini-btn {
  min-height: 38px;
  padding: 9px 12px;
  white-space: nowrap;
}
.icon-info-cell {
  position: relative;
  overflow: hidden;
  padding: 12px 12px 22px;
}
.icon-cell-label {
  position: absolute;
  z-index: 2;
  max-width: calc(100% - 26px);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(124,45,18,.10);
  color: #6b3a12;
  font-size: .74rem !important;
  line-height: 1.15;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(124,45,18,.05);
}
.icon-cell-label.bottom-left {
  left: 10px;
  bottom: 8px;
}
.icon-cell-label.bottom-right {
  right: 10px;
  bottom: 8px;
}
.connection-corner {
  color: #7c2d12;
}
.timer-corner {
  color: #14532d;
  background: #f0fdf4;
  border-color: rgba(21,128,61,.18);
}
.connection-control-card .icon-info-cell::after {
  content: '';
  position: absolute;
  top: 11px;
  right: 11px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239,68,68,.12);
}
.connection-control-card.is-current .icon-info-cell::after {
  background: #eab308;
  box-shadow: 0 0 0 5px rgba(234,179,8,.16);
}
.connection-control-card.is-connected .icon-info-cell::after,
.connection-control-card.is-complete .icon-info-cell::after {
  background: #16a34a;
  box-shadow: 0 0 0 5px rgba(22,163,74,.14);
}
.mobile-status-card .technical-details-box[hidden],
#desktopMobileStageMini[hidden] {
  display: none !important;
}
/* The labels are now embedded in the icon cells. Keep older boxes out if a browser cached partial markup. */
.desktop-name-box,
.prominent-phone-line {
  display: none !important;
}
@media(max-width:900px){
  .network-title-row { display: grid; }
  .top-connection-actions { margin-left: 0; min-width: 0; justify-content: flex-start; }
}
@media(max-width:520px){
  .network-option-strip { display: grid; }
  .network-option-pill { border-radius: 14px; }
  .top-connection-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .top-connection-actions .mini-btn { width: 100%; }
}


/* v1.0.33 active connection cleanup: one compact paired summary sub-card */
#desktopConnectedStrip {
  display: none !important;
}
.connection-active #connectFirst,
#connectFirst.is-active-connection {
  margin-bottom: 14px;
}
.connection-active .compact-pairing-card {
  padding-bottom: 14px;
}
.connection-active .primary-code-box,
.connection-active #newSessionBtn,
.connection-active #advancedLocalTestingBox,
.connection-active #connectionFlowCard,
.connection-active .active-only-status,
.connection-active .connection-stage-list,
.connection-active #desktopMobileStageMini,
.connection-active .mobile-status-card .technical-details-box {
  display: none !important;
}
.paired-network-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: #5a2b00;
  font-weight: 800;
  line-height: 1.4;
}
.paired-network-line span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(21,128,61,.16);
  background: linear-gradient(135deg,#f0fdf4,#fffaf4);
  box-shadow: 0 5px 12px rgba(21,128,61,.06);
}
.paired-network-line strong {
  color: #14532d;
}
.connection-active .top-connection-actions {
  display: flex !important;
}
@media(max-width:620px){
  .paired-network-line span { border-radius: 14px; width: 100%; }
}


/* v1.0.33: one active-session summary card */
.connection-active .network-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(21,128,61,.18);
  border-radius: 20px;
  background: linear-gradient(135deg,#f0fdf4,#fff7ed);
  box-shadow: 0 10px 24px rgba(21,128,61,.08);
}
.connection-active #connectionHeadline {
  margin: 0 0 5px 0;
  font-size: 1.05rem;
  color: #14532d;
}
.connection-active .paired-network-line {
  margin-top: 0;
  gap: 0;
}
.connection-active .paired-network-line span {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: #4a2a00;
  font-size: .94rem;
}
.connection-active .paired-network-line strong {
  color: #14532d;
}
.connection-active .top-connection-actions {
  align-self: center;
  justify-self: end;
  flex-wrap: nowrap;
}
@media(max-width:760px){
  .connection-active .network-title-row { grid-template-columns: 1fr; }
  .connection-active .top-connection-actions { justify-self: start; width: 100%; }
}

/* v1.0.33: compact connected state and small 1-2-3 badges */
.connection-active #connectionHeadline {
  font-size: .96rem;
  letter-spacing: .01em;
}
.connection-active .network-title-row {
  grid-template-columns: minmax(0,1fr) auto;
  padding: 10px 12px;
}
.connection-active .paired-network-line span {
  font-size: .92rem;
  line-height: 1.35;
}
.connection-active .pairing-cards-row {
  gap: 10px;
}
.connection-active .pair-card {
  padding: 9px;
  gap: 6px;
}
.connection-active .pair-card-head.icon-head {
  min-height: 68px;
  padding: 8px 8px 16px;
  gap: 8px;
  border-radius: 18px;
  justify-content: center;
}
.connection-active .pair-card-head.icon-head span {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  font-size: .75rem;
  box-shadow: 0 5px 10px rgba(21,128,61,.16);
}
.connection-active .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(21,128,61,.10);
}
.connection-active .card-icon svg {
  width: 44px;
  height: 44px;
  stroke-width: 4.2;
}
.connection-active .icon-cell-label {
  font-size: .68rem !important;
  padding: 2px 7px;
}
.connection-active .icon-cell-label.bottom-left {
  left: 8px;
  bottom: 6px;
}
.connection-active .icon-cell-label.bottom-right {
  right: 8px;
  bottom: 6px;
}
.connection-active .connection-control-card .icon-info-cell::after {
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 4px rgba(22,163,74,.12);
}
@media(max-width:760px){
  .connection-active .pair-card-head.icon-head { min-height: 62px; }
  .connection-active .card-icon { width: 50px; height: 50px; border-radius: 16px; }
  .connection-active .card-icon svg { width: 40px; height: 40px; }
  .connection-active .network-title-row { grid-template-columns: 1fr; }
}


/* v1.0.33: minor active summary and card-label refinements */
.connection-active .network-title-row {
  border-color: rgba(234, 88, 12, .16) !important;
  background: linear-gradient(135deg, #fffaf4, #ffffff) !important;
  box-shadow: 0 10px 24px rgba(124, 45, 18, .06) !important;
}
.connection-active #connectionHeadline {
  color: #7c2d12 !important;
}
.paired-network-line,
.connection-active .paired-network-line span {
  font-weight: 650 !important;
  color: #5a2b00 !important;
}
.connection-active .paired-network-line strong,
.paired-network-line strong {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, .18);
  color: #7c2d12 !important;
  font-weight: 900 !important;
  line-height: 1.15;
}
.icon-cell-label {
  font-size: .84rem !important;
  padding: 4px 10px !important;
}
.connection-active .icon-cell-label {
  font-size: .82rem !important;
  padding: 4px 10px !important;
}
.timer-corner,
.connection-active .timer-corner {
  font-size: .86rem !important;
  font-weight: 950 !important;
}
.connection-active .icon-cell-label.bottom-left {
  left: 9px !important;
  bottom: 7px !important;
}
.connection-active .icon-cell-label.bottom-right {
  right: 9px !important;
  bottom: 7px !important;
}
@media(max-width:760px){
  .connection-active .icon-cell-label,
  .icon-cell-label { font-size: .78rem !important; }
}

/* v1.0.34 workspace: side-by-side computer and phone cards */
.workspace-folder-tools {
  margin-top: 12px;
  margin-bottom: 12px;
}
.workspace-folder-strip {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
}
.workspace-folder-strip:empty { display: none; }
.workspace-folder-strip .row {
  border: 1px solid #f2e4d3;
  border-radius: 16px;
  background: #fffaf4;
}
.workspace-folder-strip .row + .row { margin-top: 0; }
.compact-empty {
  padding: 12px 14px;
  border: 1px dashed #efc99b;
  border-radius: 16px;
  background: #fffaf4;
}
.workspace-device-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 14px;
}
.device-workspace-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, #fffdf8, #fff8ef);
  box-shadow: 0 14px 34px rgba(111, 69, 18, .08);
  padding: 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.computer-workspace-card {
  border-top: 4px solid rgba(37, 99, 235, .28);
}
.phone-workspace-card {
  border-top: 4px solid rgba(234, 88, 12, .32);
}
.device-workspace-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.device-workspace-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  flex: 0 0 auto;
}
.computer-workspace-card .device-workspace-icon {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.device-workspace-head h3 {
  margin: 0;
  color: #5a2b00;
  font-size: 1.12rem;
}
.device-workspace-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem;
}
.device-file-list {
  min-height: 190px;
  flex: 1;
}
.phone-send-dropzone {
  margin: 0;
  border-width: 2px;
  border-style: dashed;
  border-color: #fdba74;
  background: #fff7ed;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.phone-send-dropzone::after {
  content: '';
  display: none;
}
.phone-send-dropzone.drag-over {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 20px 38px rgba(22,163,74,.16);
}
.phone-send-dropzone.drag-over::after {
  content: '';
  display: none;
}
.legacy-workspace-list[hidden] { display: none !important; }
@media(max-width: 980px) {
  .workspace-device-grid { grid-template-columns: 1fr; }
}
@media(max-width: 680px) {
  .phone-send-dropzone { grid-template-columns: 1fr; }
  .phone-send-dropzone input[type=file],
  .phone-send-dropzone button { width: 100%; }
  .device-workspace-card { padding: 13px; }
}


/* v1.0.35 mobile file source shortcuts */
.mobile-source-card {
  border: 1px solid #efc99b;
  background: linear-gradient(135deg, #fffaf4, #fffdf9);
  border-radius: 22px;
  padding: 14px;
  margin: 14px 0;
}
.mobile-source-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.mobile-source-head h3 { margin: 0 0 4px; color: #5a2b00; }
.mobile-source-head p { margin: 0; color: var(--muted); line-height: 1.35; }
.source-lock-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: .75rem;
  font-weight: 900;
  color: #11633b;
  background: #e9fff3;
  border: 1px solid #a9e7c5;
  border-radius: 999px;
  padding: 6px 10px;
}
.mobile-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.source-btn {
  min-height: 92px;
  border-radius: 18px;
  border: 1px solid #efc99b;
  background: #fff;
  color: #4b2500;
  box-shadow: 0 8px 20px rgba(124, 77, 0, .06);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  text-align: left;
  align-items: center;
  padding: 12px;
}
.source-btn span { grid-row: 1 / span 2; font-size: 1.7rem; }
.source-btn strong { font-size: .96rem; }
.source-btn small { color: var(--muted); line-height: 1.25; }
.source-btn:hover:not(:disabled) { background: #fff4e4; transform: translateY(-1px); }
.source-btn:disabled { opacity: .48; cursor: not-allowed; }
.source-btn.optional { border-style: dashed; }
.mobile-source-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff7ec;
  border: 1px dashed #efc99b;
  color: #704000;
  font-size: .88rem;
  line-height: 1.35;
}
.compact-upload-box { margin-top: 10px; }
@media(max-width:620px){
  .mobile-source-head { display: grid; }
  .source-lock-badge { justify-self: start; }
  .mobile-source-grid { grid-template-columns: 1fr; }
}

/* v1.0.38 desktop storage and auto-download controls */
.storage-options-card {
  border: 1px solid #efc99b;
  background: #fffaf4;
  border-radius: 18px;
  padding: 12px 14px;
  margin: 14px 0;
}
.storage-options-card summary {
  cursor: pointer;
  font-weight: 900;
  color: #5a2b00;
}
.storage-options-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}
.storage-path-field {
  display: grid;
  gap: 6px;
  color: #6b3a00;
  font-weight: 900;
}
.storage-path-field input {
  width: 100%;
}
.auto-download-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 900;
  color: #5a2b00;
  background: #fff;
  border: 1px solid #efc99b;
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 42px;
}
.auto-download-toggle input { width: 18px; height: 18px; accent-color: #16a34a; }
.small-hint { margin: 10px 0 0; font-size: .86rem; }
@media(max-width: 860px) {
  .storage-options-grid { grid-template-columns: 1fr; }
  .storage-options-grid button,
  .auto-download-toggle { width: 100%; justify-content: center; }
}


/* v1.0.39 download folder browser */
.folder-browser-modal[hidden] { display: none !important; }
.folder-browser-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(34, 24, 8, .42);
  backdrop-filter: blur(6px);
}
.folder-browser-panel {
  width: min(780px, 96vw);
  max-height: 86vh;
  overflow: auto;
  border-radius: 24px;
  border: 1px solid #efc99b;
  background: #fffdf8;
  box-shadow: 0 28px 80px rgba(58, 32, 4, .28);
  padding: 18px;
}
.folder-browser-head,
.folder-browser-foot,
.folder-browser-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.folder-browser-head h3 { margin: 0; color: #5a2b00; }
.folder-browser-actions { justify-content: flex-start; margin: 14px 0; flex-wrap: wrap; }
.folder-browser-actions input { min-width: 220px; flex: 1; }
.folder-browser-list { display: grid; gap: 8px; margin: 12px 0; }
.folder-browser-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  gap: 3px 10px;
  text-align: left;
  align-items: center;
  border: 1px solid #f0d7b6;
  background: #fffaf4;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  color: #5a2b00;
  font-weight: 900;
}
.folder-browser-row:hover { border-color: #fb923c; box-shadow: 0 10px 24px rgba(234, 88, 12, .12); }
.folder-browser-row small { grid-column: 2; color: var(--muted); font-weight: 700; overflow-wrap: anywhere; }
.folder-browser-folder-icon { font-size: 1.15rem; }
@media(max-width: 700px) {
  .storage-options-grid { grid-template-columns: 1fr; }
  .folder-browser-head,
  .folder-browser-foot { align-items: stretch; flex-direction: column; }
}


/* v1.0.46 mobile sleeping presence: session stays active, but desktop shows phone as sleeping. */
.connection-control-card.is-sleeping,
.mobile-status-card.is-sleeping {
  border-color: rgba(234,179,8,.55);
  background: linear-gradient(180deg,#fffbeb,#fffaf4);
}
.connection-control-card.is-sleeping .card-icon,
.mobile-status-card.is-sleeping .card-icon {
  border-color: rgba(234,179,8,.55);
  background: linear-gradient(145deg,#fff7d6,#fffbeb);
}
.connection-control-card.is-sleeping .pair-card-head.icon-head span,
.mobile-status-card.is-sleeping .pair-card-head.icon-head span {
  background: linear-gradient(135deg,#ca8a04,#facc15);
}
.connection-control-card.is-sleeping .icon-info-cell::after {
  background: #eab308;
  box-shadow: 0 0 0 5px rgba(234,179,8,.16);
}

.workspace-direction-label{margin:2px 0 0;color:#6b7280;font-size:.82rem;font-weight:700;letter-spacing:.01em;}
.field-help{display:block;margin-top:5px;color:#6b7280;font-size:.78rem;line-height:1.25;}


/* v1.0.55: hide redundant active cards and keep active summary compact */
.connection-active .connection-control-card,
.connection-active .mobile-status-card {
  display: none !important;
}
.connection-active .pairing-cards-row {
  grid-template-columns: minmax(260px, 420px);
  justify-content: start;
}
.connection-active .computer-details-card {
  max-width: 420px;
}
.top-session-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(234, 88, 12, .22);
  background: #fff7ed;
  color: #7c2d12;
  font-weight: 950;
  font-size: .9rem;
}
.top-session-timer[hidden] { display: none !important; }
@media(max-width:760px){
  .connection-active .pairing-cards-row { grid-template-columns: 1fr; }
  .connection-active .computer-details-card { max-width: none; }
}


/* v1.0.56: stronger active-state hiding for redundant cards */
body.connection-active #desktopConsentPanel,
body.connection-active #desktopMobilePanel,
body.connection-active .pair-card.connection-control-card,
body.connection-active .pair-card.mobile-status-card,
#desktopConsentPanel.fd-force-hidden,
#desktopMobilePanel.fd-force-hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}
body.connection-active .pairing-cards-row {
  grid-template-columns: minmax(260px, 420px) !important;
}


/* v1.0.57: force-hide mobile pre-connection/consent cards after active connection */
body.connection-active[data-page="mobile"] #mobileConnectFirst,
body.connection-active[data-page="mobile"] #mobilePairingCard,
body.connection-active[data-page="mobile"] #mobileConsentBox,
body.connection-active[data-page="mobile"] #mobileStatusPanel,
body.connection-active[data-page="mobile"] #scannerBox,
#mobileConnectFirst.fd-force-hidden,
#mobilePairingCard.fd-force-hidden,
#mobileConsentBox.fd-force-hidden,
#mobileStatusPanel.fd-force-hidden,
#scannerBox.fd-force-hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}


/* v1.0.58: mobile workspace cleanup */
.mobile-source-head.compact-source-head { align-items: center; }
.mobile-connected-strip #mobileConnectedPeer { font-weight: 700; }


/* v1.0.59: mobile title and workspace visual refinements */
.workspace-transfer-arrow{
  display:flex;
  align-items:center;
  justify-content:center;
  width:52px;
  height:52px;
  border-radius:18px;
  margin:0 auto 8px;
  background:linear-gradient(135deg,#fff7ed,#ffedd5);
  border:1px solid #fed7aa;
  color:#c2410c;
  font-size:2.05rem;
  font-weight:900;
  line-height:1;
  box-shadow:0 10px 24px rgba(194,65,12,.10);
}
.mobile-transfer-arrow{margin-top:4px;}
#workspacePath[hidden], #mobileWorkspacePath[hidden]{display:none!important;}
.mobile-connected-strip #mobileConnectedPeer strong{
  color:#9a3412;
  font-weight:950;
}
body:not(.connection-active)[data-page="desktop"] #desktopConsentPanel,
body:not(.connection-active)[data-page="desktop"] #desktopMobilePanel{
  display:block;
}


/* v1.0.60: restore desktop cards 2 and 3 after active connection; hide duplicate workspace arrow */
body.connection-active[data-page="desktop"] #desktopConsentPanel,
body.connection-active[data-page="desktop"] #desktopMobilePanel,
body.connection-active[data-page="desktop"] .pair-card.connection-control-card,
body.connection-active[data-page="desktop"] .pair-card.mobile-status-card {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 18px !important;
  margin: 0 !important;
  overflow: visible !important;
}
body.connection-active[data-page="desktop"] .pairing-cards-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  justify-content: stretch !important;
}
body.connection-active[data-page="desktop"] .computer-details-card {
  max-width: none !important;
}
.workspace-transfer-arrow {
  display: none !important;
}


/* v1.0.61: mobile connected title arrow and correct workspace arrow placement */
.workspace-card h2::before {
  content: none !important;
}
body[data-page="mobile"] .workspace-transfer-arrow.mobile-transfer-arrow {
  display: flex !important;
}
body[data-page="desktop"] .workspace-transfer-arrow {
  display: none !important;
}
.mobile-connected-strip #mobileConnectedPeer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}
.mobile-connected-strip #mobileConnectedPeer strong {
  font-weight: 950;
  color: #9a3412;
}
