/* Hikos · 远端模式隐藏的入口（任务 9a0332ca · P3）
   config.js 在远端模式给 <html> 打 data-kmb="remote"；这里按 data-action 把真实系统没有的功能入口藏起来
   （清单见 tools/hikos_backend_map.cjs 的 missing 项与 src/backend/guard.js 的 BLOCK）。藏不住的由 guard.js 在点击时拦下。
   本地模式不带这个属性，原型照旧。接通一项就把它从这里删掉。 */

/* 语音 / 通话：批 G 已接通（src/backend/voice.js）；媒体服务（主力 veRTC / 兜底 LiveKit + TURN）都没配时 voice.js 给 <html> 打 data-kmb-voice="off"，入口藏起来、
   语音星球页面上说明原因；配好后 data-kmb-voice="on" 入口照常。好友 / 群聊入口批 F 已接通（src/backend/friends.js），不再藏 */
html[data-kmb="remote"]:not([data-kmb-voice="on"]) [data-action="lc-call-history"],
html[data-kmb="remote"]:not([data-kmb-voice="on"]) [data-action="join-voice"],
html[data-kmb="remote"]:not([data-kmb-voice="on"]) [data-action="start-call"],
html[data-kmb="remote"]:not([data-kmb-voice="on"]) [data-action="video-call"],
html[data-kmb="remote"]:not([data-kmb-voice="on"]) [data-action="call"],
html[data-kmb="remote"]:not([data-kmb-voice="on"]) [data-action="mute"],
html[data-kmb="remote"]:not([data-kmb-voice="on"]) [data-action="deafen"],
html[data-kmb="remote"]:not([data-kmb-voice="on"]) [data-action="share-screen"],
html[data-kmb="remote"]:not([data-kmb-voice="on"]) [data-action="lc-devices"],
/* 核心通话面板的情景按钮（模拟对方接听 / 忙线 / 无人接听 / 断线）：远端模式对方的动作由服务器推送，按钮不出现 */
html[data-kmb="remote"] [data-action="lc-peer-answer"],
html[data-kmb="remote"] [data-action="lc-peer-busy"],
html[data-kmb="remote"] [data-action="lc-peer-missed"],
html[data-kmb="remote"] [data-action="lc-call-disconnect"],
/* 论坛（贴纸礼物 / 公告发布已在批 A 接通；活动 new-event / events / rsvp 批 B 接通；发帖 new-post 批 C 接通，不再藏） */
/* 消息菜单：置顶 / 举报 / 标未读 / 线程设置已在批 A 接通，不再藏 */
/* 宇宙 / 轨道 / 星球的结构变更与治理面板：批 E 接通宇宙的新建 / 设置 / 删除 / 离开 / 引导（universe.js），不再藏 */
html[data-kmb="remote"] [data-action="invite"],
/* 批 B：lc-category-new（新建轨道）接通，不再藏；批 C：new-channel（新建星球）接通，不再藏（母星上 forum.js 提示） */
html[data-kmb="remote"] [data-action="channel-settings"],
html[data-kmb="remote"] [data-action="join-channel"],
html[data-kmb="remote"] [data-action="join-server"],
/* KMind 层：智能体 / 派驻 / 模板 / 携带 / 保险箱 / 邮箱（下一批接；经典视图可做）；km-agent-new（新建组员）活动栏小批已接通，不再藏 */
html[data-kmb="remote"] [data-action="km-agent-edit"],
html[data-kmb="remote"] [data-action="km-agent-delete"],
html[data-kmb="remote"] [data-action="km-avatar"],
/* 批 B：km-templates / km-tpl-* / km-carry-* / details.km-carry-add 接通，不再藏 */
html[data-kmb="remote"] [data-action="km-join-public"],
html[data-kmb="remote"] [data-action="km-hub-remove"],
html[data-kmb="remote"] [data-action="km-mail"],
html[data-kmb="remote"] [data-action="km-mail-new"],
html[data-kmb="remote"] [data-action^="km-vault"],
html[data-kmb="remote"] #kmu-mail-btn,
/* 设置弹窗的「数据」页（导出 / 导入本机 JSON） */
html[data-kmb="remote"] .settings-menu [data-action="settings-tab"][data-id="data"] {
  display: none !important;
}

/* 批 B：默认轨道「我主持 / 受邀合作」是本地分组、没有服务器 id，不改名 / 不删除（structure.js 也拦） */
html[data-kmb="remote"] [data-action="lc-category-rename"][data-group="我主持"],
html[data-kmb="remote"] [data-action="lc-category-delete"][data-group="我主持"],
html[data-kmb="remote"] [data-action="lc-category-rename"][data-group="受邀合作"],
html[data-kmb="remote"] [data-action="lc-category-delete"][data-group="受邀合作"] { display: none !important; }

/* 「经典视图」入口（seams.js 插入） */
html[data-kmb="remote"] .titlebar .tright .kmb-classic { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; height: 24px; border-radius: 6px; font-size: 12px; text-decoration: none; color: inherit; opacity: .75; white-space: nowrap; }
html[data-kmb="remote"] .titlebar .tright .kmb-classic:hover { opacity: 1; background: rgba(127, 127, 127, .18); }
html[data-kmb="remote"] #kmu-top .kmu-tright .kmb-classic { width: auto; padding: 0 9px; text-decoration: none; font-size: 12px; color: var(--k-ink2); }
html[data-kmb="remote"] #kmu-top .kmu-tright .kmb-classic:hover { color: var(--k-ink); background: rgba(127, 127, 127, .14); }
/* 活动栏小批：「单击头像直接私聊」开关（我的智能体标题栏，分组钮右边） */
html[data-kmb="remote"] .km-side-tool[data-action="kmb-avatar-dm"][aria-pressed="true"] { color: var(--k-acc, #5B8CF3); background: rgba(91, 140, 243, .16); }
html[data-kmb="remote"] .kmb-roster-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 批 A：聊天时间线里的公告卡（公告模块之外也认 headline）与工具栏「发公告」 */
html[data-kmb="remote"] .kmb-announce { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; padding: 6px 10px; border-left: 3px solid var(--accent, #1450E8); border-radius: 6px; background: rgba(20, 80, 232, .10); font-size: 13px; }
html[data-kmb="remote"] .kmb-announce-kind { font-size: 10px; letter-spacing: .08em; padding: 1px 6px; border-radius: 999px; background: var(--accent, #1450E8); color: #fff; }
html[data-kmb="remote"] .kmb-announce strong { font-weight: 600; }
html[data-kmb="remote"] .channelhead .toolbar .kmb-announce-icon { font-size: 14px; line-height: 1; }

/* 批 C（任务 9a0332ca）：论坛星球——归档页签里的主题卡 / 工具栏「论坛设置」图标 */
html[data-kmb="remote"] .post-card.kmb-post-archived { opacity: .78; }
html[data-kmb="remote"] .post-card.kmb-post-archived .footer-actions { margin-top: 10px; }
html[data-kmb="remote"] .kmb-forum-icon { font-size: 14px; line-height: 1; }

/* 批 G（voice.js）：远端视频格子（贴在通话面板 .voice-tiles 之后）；语音星球页面等媒体服务的说明 */
.kmb-voice-video{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px;margin:10px 0}
.kmb-voice-video video{width:100%;aspect-ratio:16/9;border-radius:8px;background:#000;object-fit:cover}
/* veRTC 把 <video> 渲染进我们给的容器（renderDom）；容器本身撑出 16:9 的格子 */
.kmb-voice-video .kmb-voice-tile{position:relative;width:100%;aspect-ratio:16/9;border-radius:8px;background:#000;overflow:hidden}
.kmb-voice-video .kmb-voice-tile video{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;border-radius:0}
.kmb-voice-wait{margin-top:12px;opacity:.8}

/* 建宇宙 / 建星球：星球挂在哪个小组 + 派驻组员（可不选）（大厅 #19641；src/backend/universe.js） */
.kmb-planet-extra { margin-top: 10px; }
.kmb-planet-crew { border: 1px solid rgba(127, 127, 127, .25); border-radius: 10px; padding: 8px 12px 6px; margin: 10px 0 0; }
.kmb-planet-crew legend { padding: 0 6px; }
.kmb-crew-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; max-height: 160px; overflow: auto; }
.kmb-crew-item { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.kmb-crew-item input { width: 15px; height: 15px; margin: 0; }
.kmb-crew-item small { opacity: .7; }
.kmb-crew-team { margin-left: auto; }
