/* 临时远程控制入口独立样式，不修改桌面端品牌与主题样式。 */
@layer remote-base;
@layer remote-base {
body.orbit-remote-mode {
  margin: 0;
  min-width: 0;
  color: #202925;
  background: #f5f7f6;
  font-family: "SimSun", "Songti SC", "Noto Serif CJK SC", serif;
  overflow-x: hidden;
}

body.orbit-remote-mode #app,
body.orbit-remote-mode #settings-view,
body.orbit-remote-mode #workbench-dialog,
body.orbit-remote-mode #local-attachments {
  display: none !important;
}

#orbit-remote-root,
#orbit-remote-root * { box-sizing: border-box; }

#orbit-remote-root button,
#orbit-remote-root input,
#orbit-remote-root textarea { font: inherit; }

#orbit-remote-root button { cursor: pointer; }

.remote-pairing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.remote-pairing > section {
  width: min(480px, 100%);
  padding: 34px;
  border: 1px solid rgba(167, 211, 255, .2);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.remote-pair-brand,
.remote-brand { display: flex; align-items: center; gap: 12px; }
.remote-pair-brand img { width: 46px; height: 46px; }
.remote-pair-brand span,
.remote-brand span { display: grid; gap: 2px; }
.remote-pair-brand strong { font-size: 18px; letter-spacing: .02em; }
.remote-pair-brand small,
.remote-brand small { color: #87a9c8; }
.remote-pairing h1 { margin: 26px 0 10px; font-size: 28px; letter-spacing: 0; }
.remote-pairing > section > p { color: #a8bfd6; line-height: 1.7; }
.remote-pairing form { display: grid; gap: 16px; margin-top: 28px; }
.remote-pairing label { display: grid; gap: 8px; color: #bdd1e5; font-size: 14px; }
.remote-pairing input,
.remote-composer textarea {
  width: 100%;
  color: #f4f9ff;
  border: 1px solid rgba(167, 211, 255, .18);
  outline: none;
  background: rgba(3, 14, 27, .62);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.remote-pairing input { min-height: 48px; padding: 0 14px; border-radius: 13px; }
.remote-pairing input:focus,
.remote-composer textarea:focus { border-color: #55a8ff; box-shadow: 0 0 0 3px rgba(63, 158, 255, .16); }
.remote-pairing form button,
.remote-composer button,
.remote-new-thread {
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, #2388ff, #436fff);
  box-shadow: 0 12px 30px rgba(38, 118, 255, .24);
}
.remote-pair-message { min-height: 22px; }
.remote-field-hint {
  display: block;
  margin-top: -9px;
  color: var(--remote-muted, #54655c);
  font-size: 12px;
  line-height: 1.55;
}
.remote-pairing input[aria-invalid="true"] { border-color: #aa4a29; }
.remote-pair-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.remote-pairing .remote-secondary-action {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--remote-border, #cdd7d0);
  color: var(--remote-text, #202925);
  background: var(--remote-selected, #e0eee7);
}
.remote-empty-devices { margin: 0; padding: 16px 12px; border: 1px solid var(--remote-border); color: var(--remote-muted); text-align: center; }
.remote-readonly-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.remote-readonly-tabs button { min-height: 40px; padding: 0 12px; border: 1px solid rgba(167, 211, 255, .25); border-radius: 6px; color: #cfe6fa; background: rgba(120, 177, 231, .08); }
.remote-readonly-tabs button[aria-selected="true"] { border-color: #55a8ff; background: rgba(35, 136, 255, .25); }
.remote-readonly-tabs button:focus-visible { outline: 2px solid #55a8ff; outline-offset: 2px; }
.remote-read-page { min-height: 44px; max-height: min(45vh, 360px); overflow-y: auto; overflow-wrap: anywhere; }
.remote-read-items { margin: 0; padding: 0; list-style: none; }
.remote-read-items li { padding: 10px 0; border-bottom: 1px solid var(--remote-border, #6f8eac); }
.remote-read-page > button { margin: 10px 0; min-height: 44px; }
.remote-read-items button { width: 100%; min-height: 44px; padding: 8px 4px; text-align: left; overflow-wrap: anywhere; border: 0; border-radius: 4px; color: var(--remote-text); background: transparent; }
.remote-read-items button:focus-visible { outline: 3px solid var(--remote-accent); outline-offset: 2px; }
.remote-read-detail dl { display: grid; grid-template-columns: minmax(72px, 1fr) minmax(0, 3fr); gap: 8px; margin: 12px 0; overflow-wrap: anywhere; }
.remote-read-detail dt { color: var(--remote-muted); }
.remote-read-detail dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.remote-read-detail > button { min-height: 44px; }
.remote-read-page [role="alert"] { color: var(--remote-text); }
.remote-device-list { display: grid; gap: 8px; margin: 18px 0; }
.remote-device-list button { display: grid; gap: 4px; width: 100%; min-width: 0; min-height: 56px; padding: 9px 12px; text-align: left; overflow-wrap: anywhere; border: 1px solid var(--remote-border, #6d827b); border-radius: 6px; background: var(--remote-bg, #f2f7f4); color: var(--remote-text, #20352c); }
.remote-device-list button span { font-size: .875rem; }
.remote-device-list button:disabled { cursor: not-allowed; opacity: .72; }
.remote-device-list button:focus-visible,
.remote-pairing button:focus-visible { outline: 3px solid #11734f; outline-offset: 2px; }
.remote-pairing > section { max-width: 100%; overflow-wrap: anywhere; }
.remote-pairing { padding: clamp(8px, 4vw, 28px); }
.remote-pairing :is(input, button) { min-width: 0; overflow-wrap: anywhere; }
.remote-pairing form button, .remote-pairing input { border-radius: 6px; }
@media (max-width: 480px) {
  .remote-readonly-tabs button { flex: 1 1 45%; min-width: 0; }
  .remote-read-page { max-height: none; }
}
@media (forced-colors: active) {
  .remote-device-list button { border: 1px solid ButtonText; background: Canvas; color: CanvasText; }
  .remote-device-list button:disabled { opacity: 1; color: GrayText; }
  .remote-device-list button:focus-visible { outline-color: Highlight; }
  .remote-readonly-tabs button[aria-selected="true"] { border: 2px solid Highlight; }
  .remote-read-items li { border-color: CanvasText; }
  .remote-read-page [role="alert"] { color: CanvasText; }
}
.remote-pair-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.remote-pair-points span { padding: 7px 10px; border-radius: 999px; color: #99bad8; background: rgba(120, 177, 231, .08); font-size: 12px; }
.remote-account-binding { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.remote-account-binding span { display: grid; gap: 5px; padding: 11px 12px; border: 1px solid rgba(167, 211, 255, .12); border-radius: 11px; background: rgba(120, 177, 231, .06); }
.remote-account-binding small { color: #7897b5; font-size: 11px; }
.remote-account-binding strong { overflow: hidden; color: #d9eafd; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.remote-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(400px, 1fr) 280px;
  grid-template-rows: 66px minmax(0, 1fr);
}
.remote-mobile-tabs { display: none; }
.remote-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(167, 211, 255, .12);
  background: rgba(7, 20, 36, .76);
  backdrop-filter: blur(20px);
}
.remote-brand img { width: 36px; height: 36px; }
.remote-brand strong { font-size: 16px; }
.remote-connection { display: flex; align-items: center; gap: 9px; color: #a8c1d9; font-size: 13px; }
.remote-connection > i { width: 8px; height: 8px; border-radius: 50%; background: #4fe7a4; box-shadow: 0 0 14px rgba(79, 231, 164, .8); }
.remote-connection[data-state="disconnected"] > i { background: #aa4a29; box-shadow: none; }
.remote-connection button,
.remote-session-heading button {
  min-height: 34px;
  padding: 0 12px;
  color: #b9cee2;
  border: 1px solid rgba(167, 211, 255, .14);
  border-radius: 10px;
  background: rgba(120, 177, 231, .07);
}
.remote-sidebar,
.remote-status-panel {
  min-height: 0;
  overflow: auto;
  padding: 18px 14px;
  background: rgba(5, 17, 31, .66);
  backdrop-filter: blur(18px);
}
.remote-sidebar { border-right: 1px solid rgba(167, 211, 255, .1); }
.remote-status-panel { border-left: 1px solid rgba(167, 211, 255, .1); }
.remote-sidebar-heading { display: flex; justify-content: space-between; padding: 12px 8px 8px; color: #8eabc7; font-size: 12px; text-transform: uppercase; letter-spacing: .09em; }
.remote-sidebar nav { display: grid; gap: 5px; }
.remote-project,
.remote-thread {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  text-align: left;
  color: #dceafa;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
}
.remote-project small,
.remote-thread small { overflow: hidden; color: #7997b5; text-overflow: ellipsis; white-space: nowrap; }
.remote-project:hover,
.remote-thread:hover { background: rgba(112, 172, 232, .08); }
.remote-project.active,
.remote-thread.active { border-color: rgba(92, 164, 255, .22); background: linear-gradient(100deg, rgba(47, 135, 255, .19), rgba(60, 167, 255, .06)); }
.remote-new-thread { width: 100%; margin: 12px 0 8px; }
.remote-new-thread:disabled { cursor: wait; opacity: .58; box-shadow: none; }
.remote-new-thread + .remote-new-thread { margin-top: 0; }
.remote-action-hint { margin: -1px 5px 11px; color: #7897b5; font-size: 12px; line-height: 1.55; }
.remote-new-thread.secondary {
  color: #bcd3e9;
  border: 1px solid rgba(167, 211, 255, .16);
  background: rgba(100, 166, 229, .08);
  box-shadow: none;
}
.remote-muted { padding: 8px; color: #6987a5; font-size: 13px; line-height: 1.5; }
.remote-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.remote-session-heading { grid-row: 1; display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid rgba(167, 211, 255, .08); }
.remote-session-heading small { color: #7f9cb9; }
.remote-session-heading h1 { margin: 3px 0 0; font-size: 20px; }
.remote-session-heading button:disabled { cursor: default; opacity: .45; }
.remote-command-banner { grid-row: 2; display: grid; gap: 4px; margin: 12px clamp(18px, 5vw, 68px) 0; padding: 11px 13px; border: 1px solid rgba(88, 167, 255, .18); border-radius: 11px; color: #9ebbd7; background: rgba(42, 112, 184, .08); }
.remote-command-banner strong { color: #dcecff; font-size: 13px; }
.remote-command-banner span { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.remote-command-banner.pending { border-color: rgba(88, 167, 255, .24); }
.remote-command-banner.success { border-color: rgba(79, 231, 164, .2); background: rgba(45, 167, 118, .07); }
.remote-command-banner.error { border-color: rgba(255, 116, 139, .22); background: rgba(201, 60, 84, .08); }
.remote-feed { grid-row: 3; min-height: 0; overflow: auto; padding: 24px clamp(20px, 5vw, 72px); }
.remote-earlier-control { max-width: 760px; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 22px; padding: 8px 10px 8px 14px; color: #8faecb; border: 1px solid rgba(108, 174, 239, .14); border-radius: 13px; background: rgba(67, 133, 199, .065); }
.remote-earlier-control span { min-width: 0; flex: 1 1 auto; font-size: 12px; line-height: 1.5; }
.remote-earlier-control button { min-height: 36px; padding: 0 13px; flex: 0 0 auto; color: #d9ebfc; border: 1px solid rgba(137, 193, 246, .18); border-radius: 10px; background: rgba(95, 161, 224, .1); }
.remote-earlier-control button:disabled { cursor: wait; opacity: .62; }
.remote-earlier-control.pending { border-color: rgba(88, 167, 255, .24); }
.remote-earlier-control.error { color: #f5aebb; border-color: rgba(255, 116, 139, .23); background: rgba(201, 60, 84, .075); }
.remote-empty { max-width: 440px; margin: 18vh auto 0; text-align: center; color: #91acc6; }
.remote-empty strong { display: block; margin-bottom: 8px; color: #e8f3ff; font-size: 22px; }
.remote-history-state { min-height: 240px; display: grid; place-content: center; justify-items: center; gap: 10px; max-width: 520px; margin: 8vh auto 0; padding: 28px; color: #8faac4; text-align: center; border: 1px solid rgba(92, 164, 255, .16); border-radius: 18px; background: rgba(46, 111, 181, .07); }
.remote-history-state i { width: 25px; height: 25px; border: 2px solid rgba(126, 177, 225, .25); border-top-color: #61adff; border-radius: 50%; animation: remote-spin .8s linear infinite; }
.remote-history-state strong { color: #e5f1ff; font-size: 18px; }
.remote-history-state p { max-width: 420px; margin: 0; line-height: 1.65; }
.remote-history-state.error { border-color: rgba(255, 116, 139, .24); background: rgba(201, 60, 84, .08); }
.remote-history-state.error strong { color: #ffd1d8; }
.remote-history-state button { min-height: 44px; padding: 0 18px; color: #fff; border: 0; border-radius: 11px; background: linear-gradient(135deg, #2388ff, #436fff); }
.remote-message { max-width: 760px; margin: 0 0 24px; }
.remote-message > div { display: flex; align-items: center; gap: 9px; color: #8ca8c3; font-size: 12px; }
.remote-message > div strong { color: #dcecff; font-size: 13px; }
.remote-message > p { margin: 8px 0 0; color: #d8e8f8; line-height: 1.72; }
.remote-message.is-user { margin-left: auto; padding: 14px 16px; border: 1px solid rgba(112, 174, 236, .14); border-radius: 18px 18px 5px 18px; background: rgba(54, 120, 188, .12); }
.remote-activity { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; max-width: 760px; margin: 10px 0; padding: 8px 0; color: #8eacc8; }
.remote-activity > i { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #58a7ff; box-shadow: 0 0 12px rgba(88, 167, 255, .5); }
.remote-activity[data-status="error"] > i { background: #ff748b; }
.remote-activity[data-status="running"] > i { background: #53e6b2; }
.remote-activity strong { color: #bed4e9; font-size: 13px; }
.remote-activity p { margin: 3px 0 0; line-height: 1.5; }
.remote-activity > span { font-size: 11px; }
.remote-composer { grid-row: 4; align-self: end; height: fit-content; margin: 0 clamp(18px, 5vw, 68px) 22px; padding: 10px; border: 1px solid rgba(167, 211, 255, .16); border-radius: 18px; background: rgba(7, 23, 40, .84); box-shadow: 0 18px 50px rgba(0, 0, 0, .24); }
.remote-composer textarea { min-height: 52px; max-height: 140px; padding: 9px 10px 5px; field-sizing: content; resize: none; overflow-y: auto; border: 0; background: transparent; }
.remote-composer > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #6f8daa; font-size: 12px; }
.remote-composer-actions { display: flex; align-items: center; gap: 8px; }
.remote-composer button { min-width: 76px; min-height: 38px; }
.remote-composer .remote-draft-button { color: #c7ddf2; border: 1px solid rgba(167, 211, 255, .16); background: rgba(127, 184, 239, .09); box-shadow: none; }
.remote-composer button:disabled { cursor: default; opacity: .45; }
.remote-readonly { grid-row: 4; align-self: end; margin: 0 clamp(18px, 5vw, 68px) 22px; padding: 14px; border: 1px solid rgba(167, 211, 255, .1); border-radius: 14px; color: #8faac4; text-align: center; background: rgba(7, 23, 40, .6); }
.remote-connection-blocked { display: grid; justify-items: center; gap: 7px; }
.remote-connection-blocked strong { color: var(--remote-text); }
.remote-connection-blocked span { color: var(--remote-muted); line-height: 1.55; overflow-wrap: anywhere; }
.remote-connection-blocked button { min-height: 44px; padding: 0 16px; border: 1px solid var(--remote-border); color: var(--remote-text); background: var(--remote-selected); }
.remote-status-panel h2 { margin: 8px 6px 18px; font-size: 15px; }
.remote-status-card { display: grid; gap: 6px; margin-bottom: 10px; padding: 14px; border: 1px solid rgba(167, 211, 255, .1); border-radius: 14px; background: rgba(116, 176, 234, .055); }
.remote-status-card span,
.remote-status-card small { color: #7897b5; font-size: 12px; }
.remote-status-card strong { color: #d9eafd; font-size: 14px; line-height: 1.4; }
.remote-status-card button {
  min-height: 34px;
  margin-top: 6px;
  color: #ffccd4;
  border: 1px solid rgba(255, 126, 145, .2);
  border-radius: 10px;
  background: rgba(255, 95, 122, .08);
}
.remote-security-note { margin: 20px 8px; color: #6f8eac; font-size: 12px; line-height: 1.65; }

.remote-directory-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(2, 8, 16, .7); backdrop-filter: blur(10px); }
.remote-directory-dialog { width: min(620px, 100%); max-height: min(760px, calc(100dvh - 44px)); display: grid; grid-template-rows: auto auto auto minmax(180px, 1fr) auto; overflow: hidden; border: 1px solid rgba(167, 211, 255, .2); border-radius: 18px; background: rgba(8, 24, 42, .96); box-shadow: 0 30px 90px rgba(0, 0, 0, .45); }
.remote-directory-dialog > header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 12px; }
.remote-directory-dialog h2 { margin: 3px 0 0; font-size: 19px; overflow-wrap: anywhere; }
.remote-directory-dialog header small { color: #7d9bb9; }
.remote-directory-close { width: 42px; height: 42px; flex: 0 0 auto; color: #cde0f3; border: 1px solid rgba(167, 211, 255, .14); border-radius: 10px; background: rgba(116, 176, 234, .07); font-size: 24px; line-height: 1; }
.remote-directory-privacy { margin: 0; padding: 0 18px 14px; color: #89a7c4; font-size: 12px; line-height: 1.55; }
.remote-directory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-block: 1px solid rgba(167, 211, 255, .08); background: rgba(116, 176, 234, .035); }
.remote-directory-toolbar button { min-height: 40px; padding: 0 12px; color: #bdd3e8; border: 1px solid rgba(167, 211, 255, .13); border-radius: 9px; background: rgba(116, 176, 234, .06); }
.remote-directory-toolbar span { color: #bdd3e8; font-size: 13px; }
.remote-directory-list { min-height: 0; overflow: auto; padding: 8px; }
.remote-directory-row { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 11px; text-align: left; color: #e3effc; border: 1px solid transparent; border-radius: 9px; background: transparent; }
.remote-directory-row:hover { border-color: rgba(88, 167, 255, .18); background: rgba(79, 143, 207, .08); }
.remote-directory-row > span { min-width: 0; display: grid; gap: 3px; }
.remote-directory-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-directory-row small { color: #7897b5; }
.remote-directory-row b { color: #7ea7ce; font-size: 24px; font-weight: 400; }
.remote-directory-state { min-height: 180px; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 20px; color: #809ebb; text-align: center; }
.remote-directory-state strong { color: #d8e9fa; }
.remote-directory-state i { width: 22px; height: 22px; border: 2px solid rgba(126, 177, 225, .25); border-top-color: #61adff; border-radius: 50%; animation: remote-spin .8s linear infinite; }
.remote-directory-state.error strong { color: #ffb6c2; }
.remote-directory-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-top: 1px solid rgba(167, 211, 255, .09); }
.remote-directory-dialog > footer span { color: #7897b5; font-size: 12px; line-height: 1.45; }
.remote-directory-dialog > footer button { min-height: 44px; padding: 0 15px; flex: 0 0 auto; color: white; border: 0; border-radius: 10px; background: #2e82ed; }
.remote-directory-dialog button:disabled { cursor: wait; opacity: .48; }
@keyframes remote-spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .remote-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .remote-status-panel { display: none; }
}

@media (max-width: 700px) {
  body.orbit-remote-mode { min-width: 0; width: 100%; }
  #orbit-remote-root { width: 100%; min-width: 0; }
  .remote-shell { width: 100%; min-width: 0; height: 100dvh; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  .remote-topbar { position: sticky; top: 0; z-index: 5; width: 100%; min-width: 0; min-height: 60px; height: auto; padding: 8px 10px; gap: 8px; }
  .remote-account-binding { grid-template-columns: 1fr; }
  .remote-brand { min-width: 0; }
  .remote-brand img { width: 34px; height: 34px; }
  .remote-brand span { min-width: 0; }
  .remote-brand small { display: none; }
  .remote-connection { min-width: 0; gap: 7px; }
  .remote-connection > span { font-size: 12px; white-space: nowrap; }
  .remote-connection button { min-width: 52px; min-height: 44px; padding-inline: 9px; }
  .remote-mobile-tabs { width: 100%; min-height: 50px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 5px 8px; border-bottom: 1px solid rgba(167, 211, 255, .1); background: rgba(6, 19, 34, .94); }
  .remote-mobile-tabs button { min-width: 0; min-height: 40px; color: #8faac4; border: 1px solid transparent; border-radius: 10px; background: transparent; }
  .remote-mobile-tabs button.active { color: #ecf7ff; border-color: rgba(92, 164, 255, .2); background: rgba(47, 135, 255, .15); }
  .remote-sidebar,
  .remote-main,
  .remote-status-panel { display: none; }
  .remote-shell[data-mobile-view="projects"] .remote-sidebar { width: 100%; min-height: 0; display: block; flex: 1 1 auto; overflow-y: auto; padding: 10px 10px calc(18px + env(safe-area-inset-bottom)); border-right: 0; border-bottom: 0; }
  .remote-shell[data-mobile-view="chat"] .remote-main { width: 100%; min-height: 0; display: grid; flex: 1 1 auto; overflow: hidden; }
  .remote-shell[data-mobile-view="status"] .remote-status-panel { width: 100%; min-height: 0; display: block; flex: 1 1 auto; overflow-y: auto; padding: 14px 10px calc(18px + env(safe-area-inset-bottom)); border-top: 0; border-left: 0; }
  .remote-sidebar nav { max-height: none; overflow: visible; grid-template-columns: minmax(0, 1fr); }
  .remote-project,
  .remote-thread { min-width: 0; min-height: 48px; padding: 9px 10px; }
  .remote-project span,
  .remote-thread span { overflow-wrap: anywhere; }
  .remote-new-thread { min-height: 48px; }
  .remote-action-hint { font-size: 13px; }
  .remote-feed { min-height: 0; padding: 18px 13px; }
  .remote-earlier-control { align-items: stretch; flex-direction: column; margin-bottom: 16px; padding: 10px; }
  .remote-earlier-control button { width: 100%; min-height: 44px; }
  .remote-empty { margin-top: 9vh; padding-inline: 12px; }
  .remote-message,
  .remote-activity { max-width: 100%; overflow-wrap: anywhere; }
  .remote-session-heading { flex-wrap: wrap; padding: 13px; gap: 10px; }
  .remote-session-heading h1 { font-size: 18px; }
  .remote-session-heading button { min-height: 44px; }
  .remote-command-banner { margin: 10px 10px 0; padding: 10px 11px; }
  .remote-composer { position: sticky; bottom: 0; z-index: 4; margin: 0 8px max(8px, env(safe-area-inset-bottom)); border-radius: 14px; }
  .remote-composer textarea { min-height: 56px; max-height: 120px; font-size: 16px; }
  .remote-composer button { min-width: 96px; min-height: 46px; }
  .remote-composer > div > span:first-child { display: none; }
  .remote-composer-actions { display: flex; width: 100%; }
  .remote-composer-actions button { flex: 1 1 0; min-width: 0; }
  .remote-status-card { min-height: 82px; }
  .remote-status-card button { min-height: 44px; }
  .remote-pairing { padding: 12px; }
  .remote-pairing > section { padding: 24px 18px; border-radius: 18px; }
  .remote-pairing input,
  .remote-pairing form button { min-height: 50px; font-size: 16px; }
  .remote-pair-actions { grid-template-columns: 1fr; }
  .remote-directory-backdrop { padding: 0; place-items: stretch; }
  .remote-directory-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .remote-directory-dialog > header { min-height: 64px; padding: 11px 12px; }
  .remote-directory-dialog h2 { font-size: 18px; }
  .remote-directory-privacy { padding: 0 12px 12px; font-size: 13px; }
  .remote-directory-toolbar { padding: 8px 10px; }
  .remote-directory-toolbar button { min-height: 44px; }
  .remote-directory-list { padding: 6px; }
  .remote-directory-row { min-height: 60px; }
  .remote-directory-dialog > footer { align-items: stretch; flex-direction: column; padding: 10px 10px max(10px, env(safe-area-inset-bottom)); }
  .remote-directory-dialog > footer span { font-size: 13px; }
  .remote-directory-dialog > footer button { width: 100%; min-height: 50px; }
  .remote-history-state { min-height: 210px; margin-top: 4vh; padding: 22px 16px; }
}
}

body.orbit-remote-mode {
  --remote-bg: #f5f7f6;
  --remote-panel: #ffffff;
  --remote-text: #202925;
  --remote-muted: #54655c;
  --remote-border: #cdd7d0;
  --remote-accent: #17694d;
  --remote-selected: #e0eee7;
  color: var(--remote-text);
  background: var(--remote-bg);
}
@media (prefers-color-scheme: dark) {
  body.orbit-remote-mode {
    --remote-bg: #191d1b;
    --remote-panel: #232a26;
    --remote-text: #edf2ef;
    --remote-muted: #afbeb5;
    --remote-border: #48534c;
    --remote-accent: #75d8a8;
    --remote-selected: #304b3e;
  }
}
#orbit-remote-root * { letter-spacing: 0; }
#orbit-remote-root :is(button, input, textarea, section, article) { border-radius: 6px; }
#orbit-remote-root :is(input, textarea) { color: var(--remote-text); background: var(--remote-panel); border-color: var(--remote-border); }
#orbit-remote-root :is(button, a):focus-visible { outline: 3px solid var(--remote-accent); outline-offset: 3px; }
#orbit-remote-root button { min-height: 44px; overflow-wrap: anywhere; }
#orbit-remote-root button:disabled { cursor: not-allowed; opacity: .55; }
.remote-static-unavailable {
  width: min(480px, calc(100% - 32px));
  margin: max(24px, 12vh) auto;
  padding: 24px;
  border: 1px solid var(--remote-border);
  border-radius: 6px;
  background: var(--remote-panel);
  color: var(--remote-text);
  overflow-wrap: anywhere;
}
.remote-static-unavailable h1 { margin: 0 0 12px; font-size: 24px; }
.remote-static-unavailable p { margin: 0; line-height: 1.6; }
#orbit-remote-root .remote-unavailable > p { color: var(--remote-muted); overflow-wrap: anywhere; }
#orbit-remote-root .remote-unavailable > button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--remote-border);
  color: var(--remote-text);
  background: var(--remote-selected);
}
#orbit-remote-root :is(.remote-pairing > section, .remote-topbar, .remote-sidebar, .remote-status-panel, .remote-composer, .remote-directory-dialog, .remote-mobile-tabs) {
  color: var(--remote-text); background: var(--remote-panel); border-color: var(--remote-border); box-shadow: none;
}
#orbit-remote-root :is(p, small, label, .remote-muted, .remote-connection, .remote-sidebar-heading, .remote-action-hint, .remote-activity, .remote-readonly, .remote-security-note) { color: var(--remote-muted); }
#orbit-remote-root :is(strong, h1, h2, .remote-message > p, .remote-project, .remote-thread) { color: var(--remote-text); }
#orbit-remote-root :is(.remote-project.active, .remote-thread.active, .remote-message.is-user, .remote-mobile-tabs button.active) { background: var(--remote-selected); color: var(--remote-text); border-color: var(--remote-border); }
#orbit-remote-root :is(.remote-connection button, .remote-session-heading button, .remote-status-card button, .remote-earlier-control button, .remote-new-thread.secondary, .remote-draft-button) { background: var(--remote-selected); color: var(--remote-text); border-color: var(--remote-border); box-shadow: none; }
#orbit-remote-root :is(.remote-pairing form button, .remote-new-thread, .remote-composer button[type="submit"], .remote-history-state button) { background: #17694d; color: #fff; box-shadow: none; }
#orbit-remote-root :is(.remote-command-banner, .remote-status-card, .remote-history-state, .remote-earlier-control) { background: var(--remote-bg); border-color: var(--remote-border); color: var(--remote-text); box-shadow: none; }
#orbit-remote-root .remote-pair-message { color: var(--remote-muted); overflow-wrap: anywhere; }
#orbit-remote-root .remote-pair-message.is-error { color: #aa4a29; }
#orbit-remote-root .remote-pair-points span { color: var(--remote-muted); background: var(--remote-selected); }
.remote-connection > i { box-shadow: none; }
.remote-sidebar-toggle { position: absolute; top: 72px; left: 225px; z-index: 6; width: 24px; padding: 0; border: 1px solid var(--remote-border); background: var(--remote-panel); color: var(--remote-text); }
@media (min-width: 1101px) {
  .remote-shell[data-sidebar-collapsed="true"] { grid-template-columns: 0 minmax(0, 1fr) 280px; }
  .remote-shell[data-sidebar-collapsed="true"] .remote-sidebar { visibility: hidden; padding: 0; overflow: hidden; }
  .remote-shell[data-sidebar-collapsed="true"] .remote-sidebar-toggle { left: 0; }
}
@media (max-width: 1100px) { .remote-sidebar-toggle { display: none; } }
@media (max-width: 700px) {
  .remote-pairing > section { padding: 24px 18px; }
  .remote-pairing h1 { font-size: 24px; }
  .remote-topbar { flex-wrap: wrap; }
}
/* Keep CJK strokes and Latin labels separate in the account gate. */
.remote-pairing h1,
.remote-static-unavailable h1 {
  font-family: "SimSun", "Songti SC", "Noto Serif CJK SC", serif;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.remote-pairing > section { min-width: 0; }
.remote-pairing :is(p, dt, dd, label, button) {
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.remote-authority-summary {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  border-top: 1px solid var(--remote-border);
}
.remote-authority-summary > div {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) minmax(0, 2fr);
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--remote-border);
}
.remote-authority-summary dt { color: var(--remote-muted); }
.remote-authority-summary dd { min-width: 0; margin: 0; color: var(--remote-text); }
@media (max-width: 390px) {
  .remote-pairing { padding: 8px; }
  .remote-pairing > section { padding: 18px 14px; }
  .remote-pairing h1 { font-size: 22px; }
  .remote-pairing form { gap: 12px; margin-top: 20px; }
}
@media (forced-colors: active) {
  .remote-pairing > section,
  .remote-static-unavailable { background: Canvas; color: CanvasText; border-color: CanvasText; }
  .remote-authority-summary,
  .remote-authority-summary > div { border-color: CanvasText; }
  .remote-authority-summary :is(dt, dd) { color: CanvasText; }
  #orbit-remote-root .remote-unavailable > button,
  #orbit-remote-root .remote-pairing form button {
    background: ButtonFace; color: ButtonText; border: 1px solid ButtonText;
  }
  #orbit-remote-root :is(button, input):focus-visible { outline-color: Highlight; }
}
@media (prefers-reduced-motion: reduce) {
  #orbit-remote-root * { animation: none; transition: none; scroll-behavior: auto; }
}
