/* 電腦的通訊錄（遠端控制 v2 S2）：搜尋、排序、段落、別名／標籤、星號。顏色都用網站的變數，淺色深色一起對。 */
.rb-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;margin:4px 0 2px}
.rb-search{position:relative;flex:1 1 260px;min-width:0;display:flex;align-items:center}
.rb-search>svg{position:absolute;left:12px;width:18px;height:18px;fill:none;stroke:var(--muted);stroke-width:2;pointer-events:none}
.rb-search input{width:100%;min-height:44px;padding:0 44px 0 40px;border:1px solid var(--line);border-radius:999px;background:var(--bg);color:var(--ink);font:inherit;font-size:16px}
.rb-search input:focus-visible{outline:2px solid var(--ink);outline-offset:1px}
.rb-search input::-webkit-search-cancel-button{display:none}
.rb-clear{position:absolute;right:4px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;border:0;background:transparent;color:var(--muted);border-radius:999px;cursor:pointer}
.rb-clear:hover{background:var(--hover)}.rb-clear svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2}
.rb-sorts{display:flex;gap:6px;flex-wrap:wrap}
.rb-sort,.rb-add{min-height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font:inherit;font-size:14px;white-space:nowrap;cursor:pointer;transition:background 80ms,transform 80ms}
.rb-sort:hover,.rb-add:hover{background:var(--hover)}.rb-sort:active,.rb-add:active{transform:scale(.96)}
.rb-sort.on{background:var(--ink);color:var(--bg);border-color:var(--ink);font-weight:600}
.rb-add{border-style:dashed}
.rb-status{display:flex;align-items:center;gap:10px;margin:8px 4px 0;font-size:13px;color:var(--muted);min-height:20px}
.rb-status[data-kind=fail]{color:var(--danger,#b42318)}.rb-status[data-kind=ok]{color:var(--muted)}
.rb-retry{min-height:32px;padding:0 12px;border-radius:999px;border:1px solid currentColor;background:transparent;color:inherit;font:inherit;font-size:13px;cursor:pointer}
.rb-section{margin-top:22px}
.rb-head{min-height:32px}.rb-head h2{margin:0 0 8px}
.rb-group-more{margin:-4px 0 4px}
.rb-hint{margin:8px 4px 0}
.rb-none{margin:24px 4px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;color:var(--muted)}
.rb-none p{margin:0;overflow-wrap:anywhere}
/* 一列：名字（別名）、下面一行電腦本身的名字・分組・上次連線、標籤 */
.rb-on .rc-list .rc-row{grid-template-areas:"open acts" "meta acts" "line acts"}
.rb-meta{grid-area:meta;display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;padding:0 0 0 38px;margin-top:2px;min-width:0}
.rb-sub{color:var(--muted);font-size:13px;overflow-wrap:anywhere}.rb-bit{display:inline-block;max-width:100%}.rb-dot{margin:0 1px}
.rb-tag{display:inline-flex;align-items:center;max-width:100%;padding:1px 8px;border-radius:999px;background:var(--surface);color:var(--ink);font-size:12px;line-height:20px;overflow-wrap:anywhere}
.rb-note{color:var(--muted);font-size:13px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rb-on .rc-row .node-name strong{white-space:normal;overflow-wrap:anywhere}   /* 名字不切掉（1.3 倍字的手機也看得到整個名字） */
.rb-fav,.rb-more{width:40px;height:40px;min-width:40px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:20px;line-height:1;cursor:pointer;transition:background 80ms,transform 80ms}
.rb-fav:hover,.rb-more:hover{background:var(--hover)}.rb-fav:active,.rb-more:active,.rb-fav.rc-pressed,.rb-more.rc-pressed{transform:scale(.9);background:var(--hover)}
.rb-fav:focus-visible,.rb-more:focus-visible,.rb-sort:focus-visible{outline:2px solid var(--ink);outline-offset:1px}
.rb-star-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.rb-star-icon.on{fill:#f2b01e;stroke:#e0a10f}
@media (max-width:560px){
 .rb-on .rc-list .rc-row{grid-template-areas:"open" "meta" "line" "acts";position:relative}
 .rb-sorts{width:100%}
 /* 手機：星號與 ⋯ 放在這一列右上角（通訊錄 App 的慣例），名字讓出位置、不畫 › */
 .rb-on .rc-row .rb-fav,.rb-on .rc-row .rb-more{position:absolute;top:8px}
 .rb-on .rc-row .rb-fav{right:48px}.rb-on .rc-row .rb-more{right:6px}
 .rb-on .rc-row .rc-open{padding-right:96px}.rb-on .rc-row .node-chevron{display:none}
 .rb-form,.rb-choices{min-width:0}   /* 表單跟著視窗寬，1.3 倍字不會超出 */
}
/* 視窗：編輯、移到…、分組 */
/* 共用的 .reminder-dialog 是 content-box（寬 calc(100vw - 24px) 再加 24px 內距），手機 1.3 倍字時整個視窗超出右邊；照 .ds-key-dialog 的做法改成 border-box */
.reminder-dialog.rb-dialog{box-sizing:border-box;width:min(480px,calc(100% - 24px));max-width:calc(100% - 24px);padding:20px}
.rb-form{display:flex;flex-direction:column;gap:6px;min-width:min(420px,80vw);width:100%;box-sizing:border-box}
.rb-field{min-width:0}.rb-dialog input,.rb-dialog textarea{min-width:0;max-width:100%}
.rb-field{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.rb-label{font-size:14px;font-weight:600}
.rb-form input,.rb-form textarea,.rb-newgroup input{width:100%;box-sizing:border-box;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font:inherit;font-size:16px}
.rb-form textarea{resize:vertical;min-height:96px;line-height:1.5}
.rb-counter{align-self:flex-end;color:var(--muted);font-size:12px}.rb-counter.over{color:var(--danger,#b42318);font-weight:600}
.rb-help{margin:0;line-height:1.5}
.rb-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-height:44px;padding:6px 8px;border:1px solid var(--line);border-radius:12px;background:var(--bg);cursor:text}
.rb-chips input{flex:1 1 140px;min-width:120px;min-height:32px;border:0!important;padding:4px!important;background:transparent}
.rb-chips input:focus{outline:none}
.rb-chip{display:inline-flex;align-items:center;gap:2px;max-width:100%;padding:2px 4px 2px 10px;border-radius:999px;background:var(--surface);color:var(--ink);font:inherit;font-size:14px;border:0;overflow-wrap:anywhere}
.rb-chip-x{width:28px;height:28px;border:0;border-radius:999px;background:transparent;color:var(--muted);font-size:18px;line-height:1;cursor:pointer}.rb-chip-x:hover{background:var(--hover)}
.rb-chip-add{padding:4px 10px;cursor:pointer}.rb-chip-add:hover{background:var(--hover)}
.rb-suggest{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.rb-error{min-height:0;margin:4px 0 0}.rb-error:empty{display:none}
.rb-choices{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden;min-width:min(380px,80vw);margin-top:6px}
.rb-choice{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;padding:0 16px;border:0;border-top:1px solid var(--line);background:transparent;color:var(--ink);font:inherit;font-size:15px;text-align:left;cursor:pointer}
.rb-choice:first-child{border-top:0}.rb-choice:hover,.rb-choice:active{background:var(--hover)}.rb-choice[aria-checked=true]{font-weight:600}
.rb-choice span:first-child{overflow-wrap:anywhere}
.rb-check svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.4}
.rb-newgroup{display:flex;gap:8px;margin-top:14px}.rb-newgroup .rb-sort{flex:none;min-height:44px}
/* 電腦列表元件（給 viewer 分頁、節點 App 控制視窗） */
.rb-picker{display:flex;flex-direction:column;gap:8px}
.rb-picker input{min-height:40px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--bg);color:var(--ink);font:inherit;font-size:15px}
.rb-picker-list{display:flex;flex-direction:column;gap:2px;max-height:60vh;overflow:auto}
.rb-pick{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.rb-pick:hover{background:var(--hover)}.rb-pick[aria-selected=true]{background:var(--surface);font-weight:600}.rb-pick:disabled{opacity:.5;cursor:default}
.rb-pick small{color:var(--muted)}.rb-pick-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rb-pick .rb-star-icon{width:16px;height:16px}
@media (prefers-reduced-motion:reduce){.rb-sort,.rb-add,.rb-fav,.rb-more{transition:none}}
/* claude-uxfix-20261125：通訊錄模式（.rb-on）跟著 remote.css 的清單寬度判斷一起上下排（Fold 展開有側欄時清單不到 640 px），規則同上面手機那段 */
@container (max-width:640px){
 .rb-on .rc-list .rc-row{grid-template-areas:"open" "meta" "line" "acts";position:relative}
 .rb-on .rc-row .rb-fav,.rb-on .rc-row .rb-more{position:absolute;top:8px}
 .rb-on .rc-row .rb-fav{right:48px}.rb-on .rc-row .rb-more{right:6px}
 .rb-on .rc-row .rc-open{padding-right:96px}.rb-on .rc-row .node-chevron{display:none}
}
