#dialog[open]:has([data-connection-sheet]){
  position:fixed;inset:auto 0 0;display:flex;flex-direction:column;width:min(100%,540px);max-width:none;
  height:min(90dvh,840px);max-height:calc(100dvh - env(safe-area-inset-top,0px) - 12px);
  margin:0 auto;padding:0;overflow:hidden;border:1px solid var(--edge);border-bottom:0;
  border-radius:25px 25px 0 0;background:var(--panel);color:var(--ink);box-shadow:0 -12px 56px #17131c2e;
}
#dialog:has([data-connection-sheet])::backdrop{background:#18141c64;}
#dialog:has([data-connection-sheet])>.dialog-head{
  position:relative;flex:none;justify-content:center;margin:0;padding:21px 48px 9px;min-height:61px;
}
#dialog:has([data-connection-sheet])>.dialog-head::before{
  content:'';position:absolute;top:8px;left:calc(50% - 16px);width:32px;height:4px;border-radius:4px;background:var(--muted);opacity:.43;
}
#dialog:has([data-connection-sheet]) .dialog-head h2{margin:0;text-align:center;font-size:17px;letter-spacing:-.035em;}
#dialog:has([data-connection-sheet]) .dialog-head .icon-btn{position:absolute;right:8px;top:12px;background:transparent;color:var(--muted);}
[data-connection-sheet]{display:flex;flex:1;min-width:0;min-height:0;flex-direction:column;overflow:hidden;}
[data-connection-sheet] [hidden]{display:none!important;}
.cs-tabs{display:flex;gap:6px;flex:none;overflow:auto;padding:0 16px 9px;scrollbar-width:none;}
.cs-tabs::-webkit-scrollbar{display:none;}
.cs-tabs button,.cs-back,.cs-summary,.cs-row{appearance:none;border:0;color:inherit;font:inherit;cursor:pointer;}
#dialog .cs-tabs button{flex:none;min-height:35px;padding:5px 13px;background:var(--surface);border-radius:22px;font-size:13px;font-weight:600;}
#dialog .cs-tabs button[aria-pressed=true]{background:var(--ink);color:var(--panel);}
.cs-scroll{flex:1;overflow:auto;min-height:0;padding:0 17px 10px;overscroll-behavior:contain;}
.cs-summary,.cs-row{display:flex;align-items:center;width:100%;padding:8px 0;gap:10px;text-align:left;background:transparent;}
.cs-summary{min-height:46px;border-bottom:1px solid var(--edge);font-size:12px;color:var(--muted);}
.cs-summary b{color:var(--ink);font-size:13px;}
.cs-summary-marks{flex:1;display:flex;align-items:center;gap:3px;}
.cs-summary>.ico,.cs-next .ico,.cs-native-arrow .ico{width:16px;height:16px;}
.cs-group{padding-top:9px;}
.cs-group h3{margin:10px 0 5px;font-size:14px;line-height:1.45;letter-spacing:-.02em;}
.cs-row{min-height:56px;border-radius:10px;line-height:1.35;}
.cs-row:focus-visible,.cs-summary:focus-visible,.cs-back:focus-visible{outline:2px solid var(--plum);outline-offset:-2px;}
@media(hover:hover){.cs-row:hover,.cs-summary:hover{background:var(--surface);}}
.cs-mark,.cs-utility{display:grid;place-items:center;width:37px;height:37px;flex:none;border-radius:11px;background:var(--surface);color:var(--ink);font-size:21px;line-height:1;font-weight:750;}
.cs-google{background:#e4edff;color:#2855ae;}.cs-microsoft{background:#deedf9;color:#136398;}.cs-slack{background:#f1dff1;color:#652f64;}
.cs-notion{background:#ede9e4;color:#2b2828;font-family:Georgia,serif;}.cs-x{background:#28292a;color:#fff;}.cs-naver{background:#03a452;color:white;}
.cs-mark.cs-mini{width:21px;height:21px;border-radius:6px;font-size:13px;}
.cs-copy{display:grid;gap:3px;min-width:0;flex:1;overflow-wrap:anywhere;}
.cs-copy strong{font-size:14px;letter-spacing:-.022em;}.cs-copy small{font-size:12px;color:var(--muted);}
.cs-state{color:var(--muted);font-size:10px;white-space:nowrap;}.cs-state[data-state=connected]{color:var(--plum);}
.cs-next,.cs-native-arrow{display:grid;place-items:center;color:var(--muted);}
.cs-native{border-top:1px solid var(--edge);margin-top:12px;padding-top:11px;}
.cs-native-arrow{width:23px;height:23px;background:var(--surface);border-radius:50%;}
.cs-utility{background:#def0ef;color:#1d5e5c;}.cs-utility .ico{width:21px;height:21px;}
.cs-native .cs-row:nth-of-type(4n+2) .cs-utility{background:#e1efd4;color:#4b6335;}
.cs-native .cs-row:nth-of-type(4n+3) .cs-utility{background:#f5e1d3;color:#70472b;}
.cs-native .cs-row:nth-of-type(4n+4) .cs-utility{background:#e9e1f6;color:#60477c;}
.cs-search{position:relative;display:flex;align-items:center;gap:8px;flex:none;
  padding:9px 16px max(10px,env(safe-area-inset-bottom));margin:0;border-top:1px solid var(--edge);background:var(--panel);}
.cs-search>.ico{position:absolute;left:29px;top:22px;width:18px;height:18px;color:var(--muted);pointer-events:none;}
#dialog .cs-search input{width:100%;height:44px;min-width:0;padding:8px 14px 8px 39px;border:1px solid var(--edge);border-radius:24px;background:var(--surface);color:var(--ink);font:inherit;font-size:16px;}
.cs-feedback{margin:15px 0;color:var(--muted);font-size:14px;}
.cs-back{display:inline-flex;align-items:center;gap:5px;background:transparent;color:var(--muted);font-size:13px;padding:5px;}
.cs-back .ico{width:16px;}
html[data-overlay-keyboard] #dialog[open]:has([data-connection-sheet]){
  inset:auto 0;top:calc(var(--visible-top) + 8px);transform:none;margin:0 auto;height:calc(var(--visible-height) - 8px);max-height:calc(var(--visible-height) - 8px);
}
@media(prefers-reduced-motion:no-preference){
  #dialog[open]:has([data-connection-sheet]){animation:cs-open .24s cubic-bezier(.2,.75,.25,1);}
  @keyframes cs-open{from{translate:0 100%;}to{translate:0 0;}}
}

.bs-panel{display:grid;gap:14px;min-width:0;}
.bs-panel h3,.bs-panel p{margin:0;}
.bs-heading,.bs-actions,.bs-keys,.bs-card header,.bs-settings{display:flex;align-items:center;gap:10px;}
.bs-heading{justify-content:space-between;}
.bs-heading h3,.bs-panel>h3{font-size:15px;letter-spacing:-.03em;}
.bs-actions,.bs-keys{flex-wrap:wrap;}
.bs-card{display:grid;gap:12px;padding:14px;border:1px solid var(--edge);border-radius:16px;}
.bs-card .bs-actions{justify-content:space-between;}
.bs-site-title{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere;text-align:left;}
.bs-site-title small,.bs-empty{font-size:13px;color:var(--muted);}
.bs-resume,.bs-settings{padding:12px;border-radius:12px;border:1px solid var(--edge);background:var(--surface);color:var(--ink);font:inherit;text-align:left;}
.bs-resume{display:grid;gap:6px;}
.bs-resume span{font-size:13px;color:var(--plum);}
.bs-settings{width:100%;margin-bottom:12px;min-height:48px;}
.bs-settings b{flex:1;font-size:14px;}
.bs-panel .text-button{min-height:40px;justify-self:start;}
.bs-direct{padding-top:8px;border-top:1px solid var(--edge);}
.bs-frame{display:block;width:100%;height:auto;min-height:1px;touch-action:manipulation;cursor:pointer;}
.bs-frame:not([src]){display:none;}
.bs-keys button{flex:1;min-width:48px;min-height:42px;}
.bs-panel input,.bs-panel select,.bs-panel textarea{max-width:100%;min-width:0;font-size:16px;}
#dialog:has(.bs-frame){width:min(96vw,820px);}
.bs-type{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px;}
.bs-type input[name=text]{flex:1 1 200px;min-height:44px;font-size:16px;}
.bs-type .bs-hide{display:flex;align-items:center;gap:4px;white-space:nowrap;}
.bs-type button{min-height:44px;min-width:64px;}
