:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  --bg: #eef3f9;
  --text: #14243a;
  --muted: #516178;
  --card: #f5f8fc;
  --line: #d6e0ec;
  --blue: #125ac3;
  --action: #125dcc;
  --action-hover: #0e4cb3;
  --header: #ffffff;
  --danger: #bf2440;
  --selection: #0066cc22;
  --hover: #e7effa;
  --field: #ffffff;
  --icon-size: 22px;
  --icon-compact: 20px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --radius-control: 8px;
  --radius-popover: 12px;
  --radius-panel: 14px;
  --control-height: 36px;
  --field-height: 40px;
  --field-padding-inline: 12px;
  --danger-action: #b0203b;
  --danger-action-hover: #901831;
  --workspace-gutter: clamp(12px, 2.2vw, 36px);
  --shadow-sm: 0 1px 3px #0c213c0d, 0 1px 2px #0c213c08;
  --shadow: 0 10px 30px #0c213c1a, 0 2px 6px #0c213c0d;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
[hidden] {
  display: none !important;
}
.startup-status {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.startup-logo {
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.startup-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: geodom-spin 0.8s linear infinite;
}
@keyframes geodom-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes geodom-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.monitor-buttons {
  display: contents;
}
.has-unread::after {
  content: "";
  width: 6px;
  height: 6px;
  position: absolute;
  top: 3px;
  right: 3px;
  border-radius: 50%;
  background: var(--danger);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1826;
  --text: #eaf0fa;
  --muted: #aabbd1;
  --blue: #79b7ff;
  --danger: #ff8da2;
  --selection: #79b7ff30;
  --card: #1c2b40;
  --line: #2d405b;
  --hover: #243752;
  --field: #142032;
  --header: #162234;
  --shadow-sm: 0 2px 6px #0004;
  --shadow: 0 12px 32px #0008;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #0f1826;
    --text: #eaf0fa;
    --muted: #aabbd1;
    --blue: #79b7ff;
    --danger: #ff8da2;
    --selection: #79b7ff30;
    --card: #1c2b40;
    --line: #2d405b;
    --hover: #243752;
    --field: #142032;
    --header: #162234;
    --shadow-sm: 0 2px 6px #0004;
    --shadow: 0 12px 32px #0008;
  }
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 300px;
  height: 100%;
  background: var(--bg);
}
html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  scrollbar-color: var(--muted) var(--card);
  scrollbar-width: thin;
}
.desk-app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}
::selection {
  background: var(--selection);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 160ms ease,
    opacity 140ms ease;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
button:disabled,
.disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
button:hover:not(:disabled),
summary:hover {
  background: var(--hover);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
tr:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
svg {
  display: block;
  width: var(--icon-size);
  height: var(--icon-size);
  flex-shrink: 0;
}
:root[dir="rtl"] .ui-icon[data-icon="back"],
:root[dir="rtl"] .ui-icon[data-icon="arrow"] {
  transform: scaleX(-1);
}
.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius-control);
  flex-shrink: 0;
  color: inherit;
}
.text-button {
  padding: 8px 12px;
  min-height: var(--control-height);
  color: var(--blue);
  border-radius: var(--radius-control);
  white-space: nowrap;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: 6px 18px;
  border-radius: var(--radius-control);
  white-space: nowrap;
}
.primary {
  color: white;
  background: var(--action);
  box-shadow: 0 1px 3px #0003;
}
.primary:hover:not(:disabled) {
  background: var(--action-hover);
}
.primary.danger-action {
  background: var(--danger-action);
}
.primary.danger-action:hover:not(:disabled) {
  background: var(--danger-action-hover);
}
.secondary {
  background: var(--card);
  border: 1px solid var(--line);
}
.danger-text {
  color: var(--danger);
}
input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 9px var(--field-padding-inline);
  caret-color: var(--blue);
}
:is(input[data-model]:not([type="checkbox"], [type="radio"], [type="file"], [type="range"]), select) {
  block-size: var(--field-height);
  padding-block: 6px;
}
input:disabled {
  background: var(--card);
}
input::placeholder {
  color: var(--muted);
}
input[type="checkbox"],
input[type="radio"] {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--blue);
  flex-shrink: 0;
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
h1,
h2,
p {
  margin: 0;
}
h2 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.3;
}
small {
  font-size: 12px;
  color: var(--muted);
}
.app-bar {
  height: 56px;
  flex-shrink: 0;
  background: var(--header);
  border-block-end: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}
.workspace-width {
  width: min(clamp(1120px, 80vw, 1800px), calc(100% - 2 * var(--workspace-gutter)));
  margin-inline: auto;
}
.app-bar-content {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.app-bar h1 {
  font-size: 19px;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-brand h1,
.settings-title,
.connect-label,
.app-dialog h2 {
  letter-spacing: -0.02em;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.app-brand img {
  flex: 0 0 32px;
  display: block;
}
.app-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.app-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 550;
}
.account-shortcut.signed-in::after {
  content: "";
  position: absolute;
  top: 9px;
  inset-inline-start: 26px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #18a96b;
  box-shadow: 0 0 0 2px var(--header);
  pointer-events: none;
}
.app-action span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 14ch;
}
.home-page {
  padding-block: clamp(12px, 3vh, 28px);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow: hidden;
}
.device-library {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--header);
  box-shadow: var(--shadow-sm);
}
.device-results {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: var(--space-4);
}
.connect-box {
  --connect-ink: #0e2444;
  --field-height: 44px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(110px, 16ch) minmax(0, 1fr) auto minmax(0, 29%);
  grid-template-areas: "title title title ." "mode device submit ." "route route route .";
  align-items: center;
  column-gap: var(--space-3);
  row-gap: var(--space-2);
  padding: clamp(16px, 2.7vw, 30px);
  border: 1px solid color-mix(in srgb, #72b0ff 22%, transparent);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
  background:
    linear-gradient(108deg, #0b1f3d 46%, #113468d9 64%, transparent 78%),
    url("../images/connection-platforms.webp") right center / clamp(210px, 30%, 340px) auto no-repeat,
    var(--connect-ink);
  color: #f7faff;
}
:root[dir="rtl"] .connect-box {
  background-position: left center;
  background-image: linear-gradient(252deg, #0b1f3d 46%, #113468d9 64%, transparent 78%), url("../images/connection-platforms.webp");
}
.connect-label {
  grid-area: title;
  justify-self: start;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 6px;
}
.connect-field {
  grid-area: device;
  display: flex;
  align-items: center;
  min-width: 0;
  height: var(--field-height);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  padding-inline: var(--space-3) 1px;
  gap: 2px;
}
.connect-field .clear-field {
  width: 30px;
  height: 30px;
  padding: 6px;
  color: var(--muted);
}
.connect-field .clear-field svg {
  width: 15px;
  height: 15px;
}
.connect-field input {
  flex: 1;
  width: 0;
  block-size: 100%;
  border: 0;
  background: transparent;
  padding: 8px 0;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.connect-field input:focus-visible {
  outline: none;
}
.connect-field:focus-within {
  outline: 2px solid #91c3ff;
  outline-offset: 2px;
}
.connect-box :focus-visible {
  outline-color: #91c3ff;
}
.connect-button {
  grid-area: submit;
  flex-shrink: 0;
  block-size: var(--field-height);
  gap: 6px;
  padding-inline: clamp(12px, 2vw, 24px);
  font-weight: 650;
  box-shadow: 0 2px 8px #07193666;
}
.connect-button svg {
  width: 16px;
  height: 16px;
}
.connect-mode-field {
  grid-area: mode;
  position: relative;
  display: inline-grid;
  align-items: center;
  min-width: 0;
  color: var(--text);
}
.connect-mode {
  appearance: none;
  width: 100%;
  max-width: 100%;
  padding-block: 6px;
  padding-inline: 10px 32px;
  background: var(--field);
  font-size: 14px;
  text-overflow: ellipsis;
  cursor: pointer;
}
.connect-mode:hover {
  background: var(--hover);
}
.connect-mode-field > svg {
  position: absolute;
  inset-inline-end: 12px;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.library-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 4px var(--space-4) 0;
  border-block-end: 1px solid var(--line);
  flex-shrink: 0;
}
.library-tabs {
  display: flex;
  gap: 0;
  margin-inline-end: auto;
}
.library-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 0;
  border-bottom: 2px solid transparent;
}
.library-tab:active,
.icon-button:active,
.app-action:active {
  background: var(--selection);
}
.library-tab svg {
  width: var(--icon-compact);
  height: var(--icon-compact);
}
.tab-label {
  white-space: nowrap;
}
.tab-label.compact {
  display: none;
}
.library-tabs .selected {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 650;
}
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding-inline: 6px;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.library-tabs .selected .tab-count {
  background: var(--selection);
  color: var(--blue);
}
.library-search {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.library-search svg {
  width: 20px;
  height: 20px;
}
.library-search input {
  width: 160px;
  font-size: 14px;
}
.library-tools > .icon-button {
  block-size: var(--field-height);
}
#refresh-devices[aria-busy="true"] svg {
  animation: geodom-spin 0.9s linear infinite;
}
.online-filter-button .online-filter-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--muted) 25%, transparent);
}
.online-filter-button.active {
  background: var(--selection);
  color: #18a96b;
}
.online-filter-button.active .online-filter-dot {
  background: #18a96b;
  box-shadow: 0 0 0 3px color-mix(in srgb, #18a96b 25%, transparent);
}
.empty-state {
  min-height: 160px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  padding-inline: var(--space-4);
}
.empty-state svg {
  width: 36px;
  height: 36px;
  color: var(--text);
}
.empty-state small {
  font-size: 13px;
  max-width: 32ch;
}
.device-list {
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.device-list.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr));
  gap: var(--space-3);
  align-content: start;
}
.device-list.grid .device-card {
  display: flex;
  flex-direction: column;
}
.device-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--field);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 140ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background-color 140ms ease;
}
.device-card:hover {
  border-color: color-mix(in srgb, var(--blue) 38%, var(--line));
  box-shadow: 0 4px 12px #0c213c14;
  transform: translateY(-1px);
}
.device-card.is-selected {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 6%, var(--field));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--blue) 28%, transparent);
}
.device-main {
  display: flex;
  width: 100%;
  align-items: center;
  text-align: start;
  border-radius: 12px;
  padding: 8px;
  gap: 12px;
}
.device-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  width: 42px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--card);
  color: var(--muted);
}
.device-status {
  position: absolute;
  inset-inline-end: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--field);
  background: var(--muted);
}
.device-status.online {
  background: #18a96b;
}
.device-status.offline {
  background: color-mix(in srgb, var(--muted) 55%, var(--field));
}
.device-art svg {
  width: 22px;
  height: 22px;
}
.device-art.windows {
  background: var(--selection);
  color: var(--blue);
}
.device-art.linux {
  background: color-mix(in srgb, #7c55b5 14%, var(--field));
  color: color-mix(in srgb, #7c55b5 58%, var(--text));
}
.device-art.macos {
  background: var(--field);
  color: var(--text);
}
.device-art.android,
.device-art.ios {
  background: color-mix(in srgb, #248461 14%, var(--field));
  color: color-mix(in srgb, #248461 60%, var(--text));
}
.device-description {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.device-description strong {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-description small {
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.device-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  max-width: 100%;
}
.device-saved,
.device-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 19px;
  padding-inline: 6px;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  max-width: 11ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-saved {
  padding-inline: 5px;
  background: var(--selection);
  color: var(--blue);
}
.device-saved svg {
  width: 11px;
  height: 11px;
}
.device-list:not(.grid) .device-card {
  display: flex;
  align-items: center;
}
.device-list:not(.grid) .device-main {
  flex: 1;
  min-width: 0;
}
.device-list:not(.grid) .device-actions {
  padding: 6px 8px;
  flex-shrink: 0;
}
.device-list.grid .device-main {
  flex: 1;
  min-height: 78px;
  padding: var(--space-3);
}
.device-list.grid .device-description strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.device-actions {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  justify-content: flex-end;
}
.device-list.grid .device-actions {
  border-block-start: 1px solid var(--line);
}
.device-actions .text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-end: auto;
  padding-inline: 8px;
  font-size: 14px;
}
.device-actions .text-button svg {
  width: 16px;
  height: 16px;
}
.device-actions .icon-button {
  width: 32px;
  height: 32px;
  padding: 6px;
}
.device-actions svg {
  width: 20px;
  height: 20px;
}
.filled {
  fill: currentColor;
  color: #d99b00;
}
.menu-anchor {
  display: inline-flex;
}
.floating-menu {
  position: fixed;
  z-index: 50;
  width: min(220px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 6px;
  border-radius: var(--radius-popover);
  background: color-mix(in srgb, var(--field) 94%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: geodom-rise 120ms ease-out;
}
.floating-menu button,
.action-list button {
  display: block;
  width: 100%;
  min-height: 38px;
  text-align: start;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  font-size: 14px;
}
.floating-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
}
.floating-menu .ui-icon {
  width: var(--icon-compact);
  height: var(--icon-compact);
}
.more-devices {
  display: flex;
  flex-shrink: 0;
  margin: 24px auto 0;
}
.settings-page {
  display: flex;
  flex: 1;
  min-height: 0;
}
.settings-nav {
  flex: 0 0 200px;
  background: var(--header);
  border-inline-end: 1px solid var(--line);
  padding: 0 8px;
  overflow: auto;
  overscroll-behavior: contain;
}
.settings-nav > button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 16px;
  min-height: 44px;
  text-align: start;
  border-radius: 8px;
  margin-block-end: 4px;
}
.settings-nav > button span {
  overflow-wrap: anywhere;
}
.settings-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  height: 62px;
}
.settings-heading h1 {
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
}
.settings-nav button.selected {
  color: var(--blue);
  background: var(--selection);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--blue);
}
:root[dir="rtl"] .settings-nav button.selected {
  box-shadow: inset -3px 0 0 var(--blue);
}
.settings-nav svg {
  width: 22px;
  height: 22px;
}
.settings-content {
  min-width: 0;
  width: min(900px, calc(100% - 200px));
  margin-inline: auto;
  padding: 24px 24px 48px;
  overflow: auto;
  overscroll-behavior: contain;
}
.settings-title {
  font-size: 24px;
  font-weight: 700;
}
.settings-overview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-block-end: var(--space-4);
}
@media (min-width: 992px) {
  .settings-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.settings-overview .settings-col {
  min-width: 0;
}
.settings-overview .setting-card {
  height: 100%;
  margin-block-end: 0;
}
.settings-overview .setting-card:has(input[name="theme"]) .option {
  display: inline-flex;
  margin-inline-end: var(--space-4);
  padding-block: 6px;
}
.setting-card {
  padding: var(--space-4);
  margin: 0 0 var(--space-4);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-sm);
}
.setting-card h2 {
  font-size: 17px;
  font-weight: 600;
  margin-block-end: var(--space-3);
}
.setting-body {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}
.setting-body > p {
  overflow-wrap: anywhere;
}
.setting-description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.setting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.setting-actions > button {
  min-width: min(92px, 100%);
  max-width: 100%;
  white-space: normal;
  font-size: 14px;
}
.setting-card > select {
  width: 100%;
}
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
  font-size: 14px;
}
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, min(42%, 144px));
  align-items: center;
  gap: var(--space-3);
  font-size: 14px;
  margin: 12px 0;
}
.field-row > span {
  overflow-wrap: anywhere;
}
.field-row > :is(input, select) {
  width: 100%;
}
.field-row input[type="number"] {
  text-align: end;
}
.about-card {
  max-inline-size: 42rem;
}
.about-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.about-brand h2 {
  margin-block-end: 4px;
  overflow-wrap: anywhere;
}
.about-brand img {
  flex: none;
}
.about-card .setting-description {
  text-wrap: balance;
}
.about-card > .setting-actions {
  margin-block-start: var(--space-4);
  padding-block-start: var(--space-3);
  border-block-start: 1px solid var(--line);
}
.session-page {
  position: fixed;
  inset: 0;
  background: #0c192c;
  color: #fff;
  z-index: 20;
}
.session-page:is([data-soft-keyboard], [data-form-keyboard]) {
  inset-block: var(--visible-top, 0px) auto;
  height: var(--visible-height, 100dvh);
}
.remote-viewport {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
}
.remote-viewport canvas {
  display: block;
  max-width: 100%;
  max-height: 100dvh;
  object-fit: contain;
  touch-action: none;
  transform-origin: center;
}
.original .remote-viewport {
  display: block;
}
.original .remote-viewport canvas {
  width: var(--original-frame-width, auto);
  height: auto;
  max-width: none;
  max-height: none;
}
.original .remote-viewport.auto-scroll {
  overflow: hidden;
}
.session-page[data-soft-keyboard] .remote-viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  inset-block-end: 64px;
  overflow: hidden;
}
.session-page[data-soft-keyboard] .remote-viewport canvas {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
}
.session-page[data-soft-keyboard] .remote-toolbar {
  inset: auto auto 8px 50%;
  flex-direction: row;
  transform: translateX(-50%);
  --toggle-rotation: 0deg;
}
.session-page[data-soft-keyboard] .toolbar-controls {
  flex-direction: row;
}
.session-page[data-soft-keyboard] .toolbar-secondary,
.session-page[data-soft-keyboard] .monitor-buttons,
.session-page[data-soft-keyboard] .session-name {
  display: none;
}
.remote-viewport canvas:focus-visible {
  outline: 2px solid #91c3ff;
  outline-offset: -3px;
}
.mobile-tools {
  display: none;
}
.connect-route {
  grid-area: route;
  min-height: 44px;
  gap: var(--space-2);
  color: #dae6f7;
  width: 100%;
}
.connect-route input {
  flex-shrink: 0;
  color-scheme: dark;
  accent-color: #72b0ff;
}
.connect-route span {
  overflow-wrap: anywhere;
}
.ime-composer {
  position: absolute;
  inset: 8px auto auto 8px;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
  font-size: 16px;
  pointer-events: none;
  border: 0;
}
.session-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 70px 24px;
  color: #e0e0e4;
}
.session-status::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ffffff38;
  border-top-color: #79b7ff;
  animation: geodom-spin 0.8s linear infinite;
  flex-shrink: 0;
}
.remote-toolbar {
  --toggle-rotation: 180deg;
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: color-mix(in srgb, var(--field) 90%, transparent);
  backdrop-filter: blur(12px);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-popover);
  box-shadow: 0 8px 24px #0005;
  max-width: calc(100% - 16px);
  max-height: calc(100% - 16px);
  overflow: visible;
}
.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}
.left .toolbar-controls,
.right .toolbar-controls {
  flex-direction: column;
  max-height: calc(100dvh - 104px);
}
.remote-toolbar.top {
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}
.remote-toolbar.bottom {
  --toggle-rotation: 0deg;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
}
.remote-toolbar.left {
  --toggle-rotation: 90deg;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
}
.remote-toolbar.right {
  --toggle-rotation: 270deg;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
}
.remote-toolbar .icon-button {
  width: 36px;
  height: 36px;
  padding: 7px;
}
#toolbar-toggle svg {
  transform: rotate(var(--toggle-rotation));
}
.remote-toolbar.collapsed #toolbar-toggle svg {
  transform: rotate(calc(var(--toggle-rotation) + 180deg));
}
.remote-toolbar .icon-button:hover {
  background: var(--hover);
}
.remote-toolbar #fullscreen-button[aria-pressed="true"] {
  background: var(--selection);
  color: var(--blue);
}
.remote-toolbar .disconnect-button {
  color: var(--danger);
  margin-inline-start: 2px;
}
.remote-toolbar .disconnect-button:hover {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}
.remote-toolbar .off {
  opacity: 0.5;
}
.monitor-button {
  min-width: 28px;
  height: 28px;
  border-radius: 4px;
  font-size: 12px;
  flex-shrink: 0;
}
.monitor-button.selected {
  background: var(--selection);
  color: var(--blue);
}
.session-name {
  max-width: 145px;
  padding: 0 8px;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: move;
}
.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--selection);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.session-pill.danger {
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger);
}
.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.terminal-text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.left .terminal-tool,
.right .terminal-tool {
  display: none;
}
.left .session-pill,
.right .session-pill {
  height: 22px;
  width: 32px;
  justify-content: center;
  padding: 0;
  gap: 0;
  font-size: 0;
  overflow: hidden;
}
.left .session-name,
.right .session-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  max-width: 32px;
  height: 22px;
  padding: 0;
  font-size: 0;
  color: transparent;
  cursor: move;
}
.left .session-name::before,
.right .session-name::before {
  content: "⋮⋮";
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--muted);
}
.session-popover {
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  width: min(340px, calc(100% - 24px));
  max-height: calc(100dvh - 80px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--field) 95%, transparent);
  backdrop-filter: blur(12px);
  color: var(--text);
  border-radius: var(--radius-popover);
  box-shadow: var(--shadow);
}
.session-popover.wide {
  width: min(440px, calc(100% - 24px));
}
.session-popover.bottom {
  top: auto;
  bottom: 62px;
}
.session-popover.left {
  top: 12px;
  left: 62px;
  transform: none;
  max-width: calc(100% - 74px);
}
.session-popover.right {
  top: 12px;
  left: auto;
  right: 62px;
  transform: none;
  max-width: calc(100% - 74px);
}
.popover-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  min-height: 32px;
}
.popover-title strong {
  font-size: 17px;
  font-weight: 650;
}
.popover-title .icon-button {
  width: 32px;
  height: 32px;
  padding: 5px;
}
.session-popover textarea {
  display: block;
  width: 100%;
  margin: 8px 0 12px;
  resize: vertical;
}
.button-row,
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.clipboard-preview {
  max-width: 100%;
  max-height: 180px;
  display: block;
  margin: 12px 0;
  object-fit: contain;
}
.chat-messages {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 350px;
  overflow: auto;
}
.chat-messages li {
  padding: 8px 10px;
  margin: 0 0 10px;
  background: var(--card);
  border-radius: var(--radius-control);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-messages .mine {
  background: var(--selection);
}
.chat-form {
  display: flex;
  gap: 8px;
}
.chat-form input {
  min-width: 0;
  flex: 1;
}
.chat-form > button {
  min-height: var(--field-height);
}
.quality-monitor {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #ffffff1c;
  color: white;
  background: #0c192cb8;
  backdrop-filter: blur(8px);
  font:
    12px ui-monospace,
    monospace;
  pointer-events: none;
}
.terminal-view {
  position: absolute;
  inset: 66px 12px 12px;
  min-width: 0;
  background: #0e1b30;
  border-radius: var(--radius-popover);
  padding: var(--space-2);
  overflow: hidden;
}
@media (min-width: 701px) {
  .terminal-view.bottom {
    inset-block: 12px 64px;
  }
  .terminal-view.left {
    left: 64px;
  }
  .terminal-view.right {
    right: 64px;
  }
}
.terminal-status {
  position: absolute;
  inset: auto 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #14243ae6;
  border: 1px solid #ffffff1c;
  border-radius: var(--radius-control);
  color: #e8edf4;
  pointer-events: none;
}
.terminal-status.exited {
  pointer-events: auto;
}
.terminal-status .secondary {
  min-height: 30px;
  padding: 4px 12px;
  font-size: 13px;
  color: #fff;
  background: var(--action);
  border-color: transparent;
}
.device-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-3);
  margin-block-end: var(--space-3);
  background: var(--card);
  border-radius: var(--radius-control);
}
.file-panel {
  position: absolute;
  z-index: 5;
  inset: 72px 24px 24px;
  max-width: 1100px;
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 16px;
  background: var(--field);
  color: var(--text);
  box-shadow: var(--shadow);
}
.file-panel.drag-over {
  outline: 2px dashed var(--blue);
  outline-offset: -6px;
  background: color-mix(in srgb, var(--blue) 6%, var(--field));
}
.file-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  gap: 2px;
  margin-top: 8px;
  padding: 3px 6px;
  border-radius: var(--radius-control);
  background: var(--card);
  font-size: 12px;
}
.file-breadcrumb {
  flex-shrink: 0;
  padding: 4px 8px;
  min-height: 28px;
  border-radius: 6px;
  color: var(--muted);
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-breadcrumb.current {
  color: var(--text);
  font-weight: 600;
}
.file-breadcrumb-sep {
  display: inline-flex;
  color: var(--muted);
  opacity: 0.55;
}
.file-breadcrumb-sep svg {
  width: 13px;
  height: 13px;
  transform: rotate(-90deg);
}
:root[dir="rtl"] .file-breadcrumb-sep svg {
  transform: rotate(90deg);
}
.file-drop-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 var(--space-2);
  padding: 5px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-control);
  font-size: 12px;
  color: var(--muted);
}
.file-drop-hint svg {
  width: 14px;
  height: 14px;
}
.file-panel.drag-over .file-drop-hint {
  border-color: var(--blue);
  background: var(--selection);
  color: var(--blue);
  font-weight: 600;
}
.file-panel.standalone {
  inset: 64px 16px 16px;
  max-width: none;
}
@media (min-width: 701px) {
  .file-panel.bottom {
    inset-block: 16px 64px;
  }
  .file-panel.left {
    left: 64px;
  }
  .file-panel.right {
    right: 64px;
  }
}
.file-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.file-tools form {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}
.file-tools input {
  flex: 1;
  width: 0;
}
.file-tools .icon-button {
  inline-size: var(--field-height);
  block-size: var(--field-height);
}
.file-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0;
  font-size: 13px;
}
.file-actions :is(.primary, .secondary) {
  padding: 5px 12px;
  min-height: var(--control-height);
}
.file-actions .option {
  font-size: 13px;
  min-height: 32px;
  margin-inline-start: auto;
  gap: 7px;
}
.upload-button {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.file-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block-start: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: start;
}
.file-table td:not(:first-child),
.file-table th:not(:first-child) {
  width: 1%;
}
.file-tools form.dirty input {
  border-color: var(--blue);
}
.file-tools form.dirty button[type="submit"] {
  color: var(--blue);
  background: var(--selection);
}
.file-actions .file-filter-input {
  width: clamp(130px, 18vw, 210px);
  height: var(--control-height);
  padding: 4px 10px;
  font-size: 13px;
}
.file-actions .file-clear-jobs {
  font-size: 13px;
}
.file-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 0;
  font: inherit;
  font-weight: inherit;
  color: inherit;
  text-align: start;
}
.file-sort-button:hover:not(:disabled) {
  background: transparent;
  color: var(--blue);
}
.file-sort-button.active {
  color: var(--blue);
}
.file-sort-button svg {
  width: 14px;
  height: 14px;
  transition: transform 140ms ease;
}
.file-sort-button.desc svg {
  transform: rotate(180deg);
}
.file-table .col-mtime {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.file-table th {
  position: sticky;
  top: 0;
  padding: 10px 12px;
  background: var(--card);
  font-weight: 650;
  text-align: start;
  z-index: 1;
}
.file-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.file-entry-label {
  display: flex;
  align-items: start;
  gap: var(--space-2);
}
.entry-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.file-table td svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
}
.file-table tr {
  cursor: default;
}
.file-table tr:hover {
  background: var(--card);
}
.file-table tr.selected {
  background: var(--selection);
}
.file-table tr:focus-visible,
.session-popover:focus-visible,
.settings-title:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.file-table td:nth-child(2),
.file-table td:nth-child(3),
.file-table td:nth-child(4) {
  white-space: nowrap;
}
.file-status {
  padding: 16px 0;
  color: var(--muted);
}
.file-retry {
  margin-block-end: var(--space-3);
}
.panel-empty {
  padding: var(--space-4);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}
.file-empty {
  padding-block: 32px;
}
.file-jobs {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: min(180px, 25%);
  overflow: auto;
  font-size: 12px;
}
.file-jobs li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.file-jobs li > div {
  width: 28%;
  min-width: 0;
}
.file-jobs li[data-state="error"] small {
  color: var(--danger);
}
.file-jobs strong,
.file-jobs small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}
.file-jobs progress {
  flex: 1;
  min-width: 50px;
  max-width: 100%;
  accent-color: var(--blue);
}
.app-feedback {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 100;
  max-width: calc(100% - 24px);
  padding: 8px 10px 8px 16px;
  border-radius: var(--radius-popover);
  border: 1px solid #ffffff1f;
  color: white;
  background: #14243ae6;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  font-size: 14px;
}
.desk-app.in-session .app-feedback {
  bottom: 72px;
}
.app-feedback > span {
  min-width: 0;
  overflow-wrap: anywhere;
  overflow: auto;
  max-height: min(216px, calc(100dvh - 64px));
}
.app-feedback.error {
  background: #a51f32;
}
.app-feedback .icon-button {
  width: 30px;
  height: 30px;
  padding: 5px;
}
.app-feedback .icon-button:hover {
  background: #ffffff20;
}
.app-dialog {
  --dialog-padding: var(--space-5);
  width: min(420px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  scroll-padding-block: 20px 100px;
  padding: var(--dialog-padding);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  color: var(--text);
  background: var(--field);
  box-shadow: 0 20px 60px #06112455;
}
.app-dialog[open] {
  animation: geodom-rise 140ms ease-out;
}
.app-dialog::backdrop {
  background: #07132699;
  backdrop-filter: blur(4px);
}
.app-dialog form {
  display: grid;
  gap: var(--space-3);
}
.credential-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin-block: 4px;
}
.app-dialog input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
}
.password-field {
  position: relative;
  min-width: 0;
}
.password-field input {
  padding-inline-end: calc(var(--field-height) + 4px);
}
.password-field .password-toggle {
  position: absolute;
  inline-size: var(--field-height);
  block-size: var(--field-height);
  inset-inline-end: 1px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.app-dialog .dialog-actions button {
  min-height: var(--field-height);
}
.dialog-device,
.auth-status {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
}
.app-dialog .option small {
  margin-inline-start: auto;
  font-size: 12px;
  color: var(--muted);
}
.app-dialog h2 {
  margin: 0 0 10px;
  font-weight: 700;
}
.app-dialog label {
  font-size: 14px;
}
.app-dialog .dialog-actions {
  position: sticky;
  bottom: calc(-1 * var(--dialog-padding));
  z-index: 1;
  margin: 4px calc(-1 * var(--dialog-padding)) calc(-1 * var(--dialog-padding));
  padding: var(--space-3) var(--dialog-padding) var(--dialog-padding);
  border-block-start: 1px solid var(--line);
  background: var(--field);
}
.app-dialog .form-error:has([data-dialog-error]:empty) {
  display: none;
}
.form-error {
  min-height: 1.5em;
  font-size: 13px;
  color: var(--danger);
}
.app-dialog p,
.about-card p {
  overflow-wrap: anywhere;
}
.upload-button:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
@media (min-width: 1600px) {
  .connect-box {
    grid-template-columns: minmax(110px, 16ch) minmax(0, min(45%, 640px)) auto 1fr;
  }
  .settings-page {
    width: min(100%, 1180px);
    margin-inline: auto;
  }
}
@media (max-width: 700px) {
  .file-tools {
    flex-wrap: wrap;
  }
  .file-tools form {
    flex: 1 0 100%;
  }
  :root {
    --workspace-gutter: 12px;
    --control-height: 44px;
  }
  .app-bar {
    height: 52px;
  }
  .app-bar h1 {
    font-size: 17px;
  }
  .app-action {
    justify-content: center;
    padding: 8px;
  }
  .app-action span {
    display: none;
  }
  .connect-box {
    --field-height: 48px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title title" "mode mode" "device submit" "route route";
    padding: 14px;
    background-position: right top;
    background-size: 100% 100%, 146px auto;
  }
  .connect-label {
    font-size: 20px;
  }
  :root[dir="rtl"] .connect-box {
    background-position: left top;
  }
  .connect-mode-field {
    width: min(100%, 160px);
  }
  .home-page {
    gap: var(--space-3);
    padding-block: var(--space-3);
  }
  .connect-route {
    align-items: center;
    font-size: 13px;
  }
  .connect-field .icon-button,
  .app-bar .icon-button {
    width: 44px;
    height: 44px;
  }
  .device-actions {
    padding-inline: 3px;
  }
  .device-actions .icon-button {
    width: 44px;
    height: 44px;
  }
  .device-actions .text-button {
    padding-inline: 6px;
  }
  .library-search {
    flex: 1 0 100%;
    min-width: 0;
    order: 2;
  }
  .library-search input {
    width: 100%;
  }
  .floating-menu button {
    min-height: 44px;
  }
  .library-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 0 var(--space-2) 2px;
  }
  .library-tools > .icon-button {
    width: 44px;
    height: 44px;
    order: 1;
  }
  .library-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    flex: 1 0 100%;
    min-width: 0;
    margin-inline-end: 0;
    order: 0;
  }
  .library-tab {
    gap: 4px;
    padding: 6px 1px;
    font-size: 12px;
    min-height: 44px;
  }
  .library-tab svg,
  .tab-count,
  .file-drop-hint {
    display: none;
  }
  .tab-label.full {
    display: none;
  }
  .tab-label.compact {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
    text-align: center;
  }
  .primary,
  .secondary,
  .text-button {
    min-height: 44px;
  }
  .file-actions :is(.primary, .secondary) {
    min-height: 44px;
  }
  .device-list.grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: 10px;
  }
  .device-results {
    padding: 10px;
  }
  .device-list.grid .device-main {
    padding: var(--space-2);
    gap: var(--space-2);
    min-height: 64px;
  }
  .device-art {
    width: 36px;
    height: 36px;
  }
  .device-list.grid .device-description strong {
    font-size: 14px;
  }
  .device-list.grid .device-actions .text-button svg {
    display: none;
  }
  .settings-nav {
    flex-basis: 68px;
    padding-inline: 4px;
  }
  .settings-nav > button {
    flex-direction: column;
    gap: 3px;
    padding: 12px 3px;
    font-size: 11px;
  }
  .settings-nav button.selected {
    box-shadow: inset 0 -3px 0 var(--blue);
  }
  .settings-heading {
    justify-content: center;
    gap: 0;
    padding-inline: 0;
  }
  .settings-heading h1 {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .settings-nav svg {
    width: 22px;
    height: 22px;
  }
  .settings-content {
    width: calc(100% - 68px);
    padding: 16px 12px 30px;
  }
  .settings-title {
    font-size: 20px;
    margin-block-end: 12px;
  }
  .setting-card {
    padding: 16px;
  }
  .option {
    align-items: flex-start;
    font-size: 14px;
    gap: 10px;
    padding: 7px 0;
  }
  .option input {
    margin-top: 1px;
  }
  .session-name {
    display: none;
  }
  .file-actions {
    gap: 6px;
  }
  .file-actions .option {
    margin-inline-start: 0;
    padding: 2px 0;
  }
  .file-table {
    font-size: 12px;
  }
  .file-table .col-mtime {
    display: none;
  }
  .file-table th,
  .file-table td {
    padding: 8px;
  }
  .file-jobs li {
    flex-wrap: wrap;
    gap: 5px;
  }
  .file-jobs li > div {
    width: 45%;
  }
  .file-jobs li > span {
    font-size: 10px;
  }
  .empty-state {
    min-height: 160px;
  }
}
@media (max-width: 360px) {
  .connect-box {
    background-size: 100% 100%, 120px auto;
  }
  .device-list.grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .device-list.grid .device-card {
    flex-direction: row;
    align-items: center;
  }
  .device-list.grid .device-main {
    min-height: 62px;
    flex: 1;
    min-width: 0;
    padding: var(--space-2);
    gap: var(--space-2);
  }
  .device-list.grid .device-actions {
    padding-block: 0;
    flex-shrink: 0;
    border: 0;
  }
  .device-list.grid .device-description strong {
    font-size: 14px;
  }
}

@media (max-height: 500px) {
  .home-page {
    overflow: auto;
    overscroll-behavior: contain;
  }
  .connect-box {
    padding-block: var(--space-3);
  }
  .device-results .empty-state {
    min-height: 120px;
    gap: var(--space-2);
  }
  .device-results {
    flex: 1 0 auto;
    overflow: visible;
  }
  .device-library {
    flex: 1 0 auto;
  }
  .file-table-wrap {
    flex: 1 0 auto;
    overflow: visible;
  }
  .file-jobs {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 700px), (pointer: coarse) and (max-height: 500px) {
  :root {
    --field-height: 44px;
  }
  .file-panel,
  .file-panel.standalone,
  .terminal-view {
    inset: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right))
      calc(max(8px, env(safe-area-inset-bottom)) + 58px) max(6px, env(safe-area-inset-left));
    padding: 10px;
  }
  .terminal-status {
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + 60px);
  }
  .file-panel .icon-button,
  .file-actions :is(.primary, .secondary),
  .file-actions .option {
    min-height: 44px;
  }
  .file-breadcrumb {
    min-height: 44px;
  }
  .file-drop-hint {
    display: none;
  }
  .file-panel .icon-button {
    min-width: 44px;
    flex-shrink: 0;
  }
  .remote-toolbar.top,
  .remote-toolbar.bottom,
  .remote-toolbar.left,
  .remote-toolbar.right {
    top: auto;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    flex-direction: row;
    --toggle-rotation: 0deg;
    border-radius: 12px;
  }
  .remote-toolbar .toolbar-controls {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .remote-toolbar .toolbar-controls::-webkit-scrollbar {
    display: none;
  }
  .remote-toolbar .icon-button {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }
  .remote-toolbar .toolbar-secondary,
  .remote-toolbar .monitor-buttons,
  .remote-toolbar .session-name {
    display: none;
  }
  .session-popover.top,
  .session-popover.bottom,
  .session-popover.left,
  .session-popover.right {
    inset: auto max(10px, env(safe-area-inset-right))
      calc(max(8px, env(safe-area-inset-bottom)) + 58px) max(10px, env(safe-area-inset-left));
    width: auto;
    max-width: none;
    max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)) - 58px);
    transform: none;
    border-radius: 12px;
  }
  .mobile-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-block-end: 8px;
    padding-block-end: 8px;
    border-block-end: 1px solid var(--line);
  }
  .mobile-tools button,
  .action-list button,
  .session-popover .icon-button {
    min-height: 44px;
  }
  .file-panel .file-jobs .icon-button,
  .session-popover .popover-title .icon-button,
  .app-feedback .icon-button {
    min-width: 44px;
    min-height: 44px;
  }
  .app-dialog {
    --dialog-padding: 16px;
    position: fixed;
    inset: calc(var(--visible-top, 0px) + max(8px, env(safe-area-inset-top))) 0
      max(8px, env(safe-area-inset-bottom));
    max-height: calc(var(--visible-height, 100dvh) - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)));
    margin: auto;
    padding: var(--dialog-padding);
  }
  .app-dialog:has(input:focus, textarea:focus) {
    inset-block-end: auto;
  }
  :is(input[data-model]:not([type="checkbox"], [type="radio"], [type="file"], [type="range"]), select),
  .app-dialog textarea,
  .session-popover textarea {
    font-size: 16px;
  }
  .app-dialog .dialog-actions {
    bottom: calc(-1 * var(--dialog-padding));
    margin: 4px calc(-1 * var(--dialog-padding)) calc(-1 * var(--dialog-padding));
    padding: 8px var(--dialog-padding) var(--dialog-padding);
  }
  .library-search input {
    width: 100%;
  }
  .session-page[data-form-keyboard] .session-popover {
    max-height: calc(var(--visible-height) - 76px);
  }
}
