.cloud #mobile-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--card, white);
  border-bottom: 1px solid var(--line);
}
.cloud #studio[data-view="overview"] [data-section]:not([data-section="overview"]),
.cloud #studio[data-view="recordings"] [data-section]:not([data-section="recordings"]),
.cloud #studio[data-view="updates"] [data-section]:not([data-section="updates"]),
.cloud #studio[data-view="pairing"] [data-section]:not([data-section="pairing"]),
.cloud #studio[data-view="pairing"] aside { display: none; }
.cloud #studio[data-view="pairing"] { grid-template-columns: minmax(0, 1fr); }
#pair-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
#pair-table th, #pair-table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
#pair-table th:nth-child(2) { width: 45%; }
#pair-table small { display: block; margin: 5px 0; overflow-wrap: anywhere; }
#pair-table td { overflow-wrap: anywhere; }
#pair-table .row { margin-top: 4px; }
#pair-settings { border: 1px solid var(--line); border-radius: 11px; margin: 0; min-width: 0; padding: 10px; }
#pair-error { color: var(--error); }
.cloud input[type="checkbox"] { width: 24px; min-height: 44px; accent-color: var(--accent); }
#theme-toggle { margin-left: auto; }
.cloud .brand { margin-right: 0; }
.cloud .header-content { flex-wrap: wrap; }
.cloud [id^="apply-"] { margin-left: auto; }
.cloud #connection-status, .cloud #app-update { padding: 10px 12px; }
:root[data-theme="dark"] {
  color-scheme: dark;
  color: #e3f1e8;
  background: #101d17;
  --card: #182923;
  --muted: #a9c2b5;
  --line: #375447;
  --accent: #9fe2b7;
  --soft: #254937;
  --error: #ffa1ab;
}
:root[data-theme="dark"] :is(.card, header.top, input, select, textarea, dialog, .cloud #mobile-nav) {
  background: var(--card);
}
:root[data-theme="dark"] :is(button, a.button) { background: #20362c; }
:root[data-theme="dark"] button[aria-pressed="true"] { background: var(--soft); }
:root[data-theme="dark"] button.primary { background: var(--accent); color: #10221a; }
:root[data-theme="dark"] .notice { background: #332a19; border-color: #635436; color: #f2dbaf; }
:root[data-theme="dark"] .upload-completed { color: #9fe2b7; }
@media (max-width: 720px) {
  .cloud #mobile-nav {
    position: fixed;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 7px max(10px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
    border-bottom: 0;
  }
  .cloud #mobile-nav button { font-size: .84rem; }
  .cloud #theme-toggle { font-size: .84rem; }
  #pair-table, #pair-table tbody, #pair-table tr, #pair-table td { display: block; }
  #pair-table thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  #pair-table tr { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px; }
  #pair-table td { border-bottom: 0; padding: 8px 10px; }
  #pair-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .8rem; }
}
