#tabletPair {
  box-sizing: border-box;
  width: min(92vw, 440px);
  max-height: 92vh;
  padding: 26px;
  border: 1px solid #dbe5dd;
  border-radius: 18px;
  background: #f8faf7;
  color: #172b23;
  font: 1rem/1.45 system-ui, sans-serif;
  box-shadow: 0 24px 80px #0006;
}
#tabletPair::backdrop { background: #13211cc9; }
#tabletPair h2 { margin: 0; font: 400 2rem/1.1 Georgia, serif; }
#tabletPair p { margin: 12px 0; }
#tabletQr img { display: block; width: min(100%, 284px); height: auto; margin: 18px auto; image-rendering: pixelated; }
#tabletPair .tablet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#tabletPair :is(button, a) { display: inline-flex; align-items: center; min-height: 42px; padding: 7px 13px; border: 1px solid #d0ddd3; border-radius: 9px; background: #fff; color: #172b23; cursor: pointer; font: inherit; text-decoration: none; }
#tabletPair [hidden], .arch4-remote [hidden] { display: none !important; }

.arch4-remote {
  --remote-ink: #192c22;
  --remote-muted: #4e665a;
  --remote-border: #d9e3d9;
  --remote-green: #1f513b;
  margin: 0;
  min-height: 100vh;
  background: #f7f8f4;
  color: var(--remote-ink);
  color-scheme: light;
  font: 1rem/1.45 system-ui, sans-serif;
}
.arch4-remote *, .arch4-remote *::before, .arch4-remote *::after { box-sizing: border-box; }
.remote-width { width: min(1040px, calc(100% - 36px)); margin-inline: auto; }
.remote-head { padding: clamp(24px, 5vw, 45px) 0 18px; background: #fff; border-bottom: 1px solid var(--remote-border); }
.remote-brand { color: var(--remote-green); font-weight: 650; }
.remote-head h1 { margin: 5px 0 0; font: 400 clamp(34px, 6vw, 56px)/1.08 Georgia, serif; }
.remote-head p { margin: 12px 0 0; color: var(--remote-muted); min-height: 1.45em; }
#remote-controls { padding: 20px 0 35px; }
.remote-projects { display: grid; grid-template-columns: max-content 1fr; gap: 14px; align-items: center; margin-bottom: 16px; }
.remote-projects label { font-weight: 650; }
.remote-projects select, .remote-levels select {
  appearance: none;
  min-width: 0;
  min-height: 52px;
  padding: 9px 42px 9px 14px;
  border: 1px solid var(--remote-border);
  border-radius: 10px;
  background: linear-gradient(45deg, transparent 50%, #224e39 50%) calc(100% - 22px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #224e39 50%, transparent 50%) calc(100% - 16px) 50% / 6px 6px no-repeat, #fff;
  color: var(--remote-ink);
  font: inherit;
}
.remote-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 9px; margin-bottom: 16px; }
.arch4-remote button {
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--remote-border);
  border-radius: 10px;
  background: #edf3ed;
  color: var(--remote-ink);
  cursor: pointer;
  font: 630 clamp(1rem, 2.1vw, 1.17rem)/1.25 system-ui, sans-serif;
  touch-action: manipulation;
  overflow-wrap: anywhere;
}
.arch4-remote :is(button, select):focus-visible, .arch4-remote .remote-sending { outline: 2px solid #1e513b; outline-offset: 3px; }
.remote-tabs button { min-height: 50px; background: #fff; }
.arch4-remote :is(.remote-primary, [aria-pressed="true"]) { border-color: var(--remote-green); background: var(--remote-green); color: #fff; }
.remote-panel { padding: clamp(16px, 3vw, 26px); border: 1px solid var(--remote-border); border-radius: 15px; background: #fff; }
.remote-panel h2 { margin: 0 0 15px; font-size: 1.28rem; }
.remote-panel h3 { margin: 22px 0 12px; font-size: 1.05rem; }
.remote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 10px; }
.remote-levels { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: 10px; align-items: center; margin-top: 20px; }
.remote-levels label { font-weight: 650; }
@media (max-width: 540px) {
  .remote-tabs { grid-template-columns: 1fr 1fr; }
  .remote-tabs [data-page="model"] { grid-column: 1 / -1; }
  .remote-grid { grid-template-columns: 1fr 1fr; }
  .remote-grid > button { min-width: 0; }
  .remote-levels { grid-template-columns: max-content minmax(0, 1fr); }
  .remote-levels button { grid-column: 1 / -1; }
}
