.nestly-install {
  --ni-paper: #fffefa; --ni-ink: #293c33; --ni-muted: #56675d; --ni-sage: #365d4c; --ni-soft: #edf1e7; --ni-line: #dce3d8;
  box-sizing: border-box; position: fixed; inset: 0; width: min(35rem, calc(100% - 24px)); max-width: calc(100% - 24px);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: auto; padding: 24px; border: 1px solid var(--ni-line); border-radius: 24px;
  background: var(--ni-paper); color: var(--ni-ink); font: 1rem/1.55 system-ui, -apple-system, sans-serif;
  overflow: auto; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; -webkit-text-size-adjust: 100%;
}
.nestly-install *, .nestly-install *::before { box-sizing: border-box; }
.nestly-install::backdrop { background: #172019a8; }
.nestly-install [hidden] { display: none !important; }
.nestly-install h1 { font: 400 1.5em/1.2 Georgia, serif; margin: 16px 0 12px; overflow-wrap: anywhere; }
.nestly-install h2 { font: 650 1em/1.4 system-ui, sans-serif; margin: 0 0 5px; }
.nestly-install p { margin: 0 0 16px; color: var(--ni-muted); overflow-wrap: anywhere; }
.nestly-install button, .nestly-install select { font: inherit; color: var(--ni-ink); min-height: 44px; cursor: pointer; }
.nestly-install :focus-visible { outline: 3px solid var(--ni-sage); outline-offset: 3px; }
.nestly-install h1:focus { outline: none; }
.ni-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ni-top img { border-radius: 12px; }
.nestly-install .ni-close { width: 44px; padding: 0; font-size: 28px; border: 0; border-radius: 50%; background: var(--ni-soft); }
.ni-device { display: grid; gap: 6px; margin: 20px 0 16px; color: var(--ni-muted); }
.ni-device select { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--ni-line); border-radius: 10px; background: var(--ni-paper); }
.ni-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 10px; }
.ni-steps li { position: relative; padding: 14px 14px 14px 54px; border-radius: 14px; background: var(--ni-soft); counter-increment: step; }
.ni-steps li::before { content: counter(step); position: absolute; top: 14px; left: 14px; width: 28px; height: 28px; display: grid; place-items: center; background: var(--ni-sage); color: var(--ni-paper); border-radius: 50%; font-size: 16px; font-weight: 700; }
.ni-steps p { margin: 0; }
.nestly-install .ni-note, .nestly-install .ni-internet { margin-top: 18px; }
.ni-extra, .ni-device-switch { margin: 16px 0; color: var(--ni-muted); }
.ni-extra summary, .ni-device-switch summary { min-height: 44px; padding: 8px 0; cursor: pointer; }
.nestly-install .ni-primary { display: block; width: 100%; min-height: 48px; padding: 12px 16px; background: var(--ni-sage); color: var(--ni-paper); border: 0; border-radius: 14px; font-weight: 650; }
.ni-primary:disabled { opacity: .65; }
.nestly-install .ni-again { margin: 16px 0 0; font-size: .9em; }
.nestly-install .ni-status { padding: 12px; background: var(--ni-soft); border-radius: 12px; }
@media (prefers-color-scheme: dark) {
  .nestly-install { color-scheme: dark; --ni-paper: #1e2822; --ni-ink: #edf2e8; --ni-muted: #c1cbbf; --ni-sage: #c3d5bd; --ni-soft: #324334; --ni-line: #465548; }
}
@media (max-width: 360px) { .nestly-install { padding: 18px; } }
