/* Project New Shoes launcher: one card, system fonts, no chrome. */

:root {
  --ns-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --ns-bg: #f5f5f7;
  --ns-card: #ffffff;
  --ns-card-border: rgba(0, 0, 0, .05);
  --ns-text: #1d1d1f;
  --ns-text-2: #6e6e73;
  --ns-text-3: #86868b;
  --ns-accent: #0071e3;
  --ns-accent-hover: #0077ed;
  --ns-on-accent: #ffffff;
  --ns-fill: #f5f5f7;
  --ns-fill-2: #e8e8ed;
  --ns-fill-3: #d2d2d7;
  --ns-line: #d2d2d7;
  --ns-ok: #34c759;
  --ns-warn: #ff9f0a;
  --ns-danger: #ff3b30;
  --ns-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 24px 60px rgba(0, 0, 0, .10);
  --ns-radius: 22px;
  --ns-radius-s: 12px;
  --ns-scrim: rgba(0, 0, 0, .28);
  --desktop-viewport-height: 100vh;
  color-scheme: light;
}

@supports (height: 100dvh) {
  :root { --desktop-viewport-height: 100dvh; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ns-bg: #000000;
    --ns-card: #1c1c1e;
    --ns-card-border: rgba(255, 255, 255, .08);
    --ns-text: #f5f5f7;
    --ns-text-2: #a1a1a6;
    --ns-text-3: #8e8e93;
    --ns-accent: #0a84ff;
    --ns-accent-hover: #2b95ff;
    --ns-fill: #2c2c2e;
    --ns-fill-2: #3a3a3c;
    --ns-fill-3: #48484a;
    --ns-line: #3a3a3c;
    --ns-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 24px 60px rgba(0, 0, 0, .6);
    --ns-scrim: rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ns-bg: #000000;
  --ns-card: #1c1c1e;
  --ns-card-border: rgba(255, 255, 255, .08);
  --ns-text: #f5f5f7;
  --ns-text-2: #a1a1a6;
  --ns-text-3: #8e8e93;
  --ns-accent: #0a84ff;
  --ns-accent-hover: #2b95ff;
  --ns-fill: #2c2c2e;
  --ns-fill-2: #3a3a3c;
  --ns-fill-3: #48484a;
  --ns-line: #3a3a3c;
  --ns-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 24px 60px rgba(0, 0, 0, .6);
  --ns-scrim: rgba(0, 0, 0, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: var(--desktop-viewport-height);
  margin: 0;
  overflow: hidden;
}

body {
  display: block;
  min-height: 0;
  font-family: var(--ns-font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ns-text);
  background: var(--ns-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, output, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--ns-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ns-accent) 45%, transparent);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---- Page ---------------------------------------------------------------- */

.launcher {
  position: relative;
  width: 100%;
  height: var(--desktop-viewport-height);
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.card {
  width: min(520px, 100%);
  padding: 36px 32px 20px;
  border: 1px solid var(--ns-card-border);
  border-radius: var(--ns-radius);
  background: var(--ns-card);
  box-shadow: var(--ns-shadow);
}

.card-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 26px;
  text-align: center;
}

.app-icon {
  width: 96px;
  height: 96px;
  margin-bottom: 6px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .22));
}

.app-icon.small { width: 56px; height: 56px; }

.card-head h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.card-subtitle {
  max-width: 34ch;
  margin: 0;
  color: var(--ns-text-2);
  font-size: 15px;
}

.step { display: none; }
.step.is-visible { display: block; }

/* ---- Source selection ------------------------------------------------------ */

.source-grid { display: grid; gap: 10px; }

.source-button {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 12px 14px 12px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--ns-fill);
  text-align: left;
  transition: background .15s ease, transform .1s ease;
}
.source-button:hover { background: var(--ns-fill-2); }
.source-button:active { transform: scale(.992); }
.source-button:disabled { opacity: .55; }

.source-glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(160deg, #3b9cff, var(--ns-accent));
}
.source-glyph svg { width: 22px; height: 22px; }

.source-copy { display: grid; gap: 2px; min-width: 0; }
.source-copy strong { font-size: 16px; font-weight: 600; }
.source-copy small { color: var(--ns-text-2); font-size: 13px; }
.source-chevron { color: var(--ns-fill-3); font-size: 24px; line-height: 1; }

.text-button {
  display: inline-block;
  min-height: 32px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--ns-accent);
  font-size: 13px;
}
.text-button:hover { text-decoration: underline; }
.text-button:disabled { color: var(--ns-text-3); text-decoration: none; }
#pickFolderFallbackButton { display: block; margin: 8px auto 0; }

.privacy-line {
  max-width: 40ch;
  margin: 18px auto 0;
  color: var(--ns-text-3);
  font-size: 12px;
  text-align: center;
}
.privacy-line a { color: var(--ns-text-2); }

/* ---- Media list ------------------------------------------------------------ */

.media-panel { margin-top: 16px; }
.media-panel header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.media-panel header strong { font-weight: 600; }
.media-panel header span { color: var(--ns-text-3); }
.media-panel header .text-button { margin-left: auto; padding: 0; }

.media-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--ns-radius-s);
  background: var(--ns-fill);
}
.media-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--ns-card);
  font-size: 13px;
}
.media-list li:first-child { border-top: 0; }
.media-list .media-name { display: grid; min-width: 0; }
.media-list .media-name strong { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.media-list .media-name span { color: var(--ns-text-3); font-size: 12px; }
.media-list .media-size { color: var(--ns-text-2); font-variant-numeric: tabular-nums; }
.remove-button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: var(--ns-fill-2);
  color: var(--ns-text-2);
  font-size: 15px;
  line-height: 1;
}
.remove-button:hover { background: var(--ns-fill-3); color: var(--ns-text); }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chip-list:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: var(--ns-fill);
  font-size: 12px;
}
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .remove-button { width: 18px; height: 18px; font-size: 12px; }

/* ---- Progress -------------------------------------------------------------- */

.progress-block { margin-top: 16px; }
.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.progress-head strong { font-weight: 600; }
.progress-head span { color: var(--ns-text-3); font-variant-numeric: tabular-nums; }
.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ns-fill-2);
}
.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--ns-accent);
  transition: width .2s ease;
}
.progress-detail {
  margin: 8px 0 0;
  color: var(--ns-text-2);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.progress-detail.error { color: var(--ns-danger); }
.progress-note { margin: 6px 0 0; color: var(--ns-text-3); font-size: 12px; }

/* ---- Help ------------------------------------------------------------------- */

.help { margin-top: 18px; }
.help summary {
  color: var(--ns-accent);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  list-style: none;
}
.help summary::-webkit-details-marker { display: none; }
.help[open] summary { margin-bottom: 8px; }
.help-body {
  padding: 14px 16px;
  border-radius: var(--ns-radius-s);
  background: var(--ns-fill);
  color: var(--ns-text-2);
  font-size: 13px;
}
.help-body h3 { margin: 14px 0 6px; color: var(--ns-text); font-size: 13px; font-weight: 600; }
.help-body p { margin: 0 0 8px; }
.help-body ol { margin: 0; padding-left: 18px; }
.help-body li { margin-bottom: 6px; }
.help-body code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.help-body strong { color: var(--ns-text); font-weight: 600; }

/* ---- Storage step --------------------------------------------------------- */

.detected {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.detected .check, .ready .status-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ns-ok);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.detected div, .ready div { display: grid; min-width: 0; }
.detected strong, .ready strong { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.detected span:not(.check), .ready span:not(.status-dot) { color: var(--ns-text-2); font-size: 13px; }

.choice-list {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--ns-radius-s);
  background: var(--ns-fill);
}
.choice {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--ns-card);
  cursor: pointer;
}
.choice:first-of-type { border-top: 0; }
.choice input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ns-accent);
}
.choice-copy { display: grid; gap: 1px; min-width: 0; }
.choice-copy strong { font-size: 14px; font-weight: 600; }
.choice-copy small { color: var(--ns-text-2); font-size: 12px; }
.choice-meta { color: var(--ns-text-3); font-size: 12px; white-space: nowrap; }
.choice.is-disabled { opacity: .5; cursor: not-allowed; }

.switch-row, .switch-setting {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--ns-radius-s);
  background: var(--ns-fill);
  cursor: pointer;
}
.switch-row.is-disabled { opacity: .55; cursor: not-allowed; }
.switch-copy, .switch-setting > span { display: grid; gap: 1px; min-width: 0; }
.switch-copy strong, .switch-setting strong { font-size: 14px; font-weight: 600; }
.switch-copy small, .switch-setting small { color: var(--ns-text-2); font-size: 12px; }

.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 51px;
  height: 31px;
  margin: 0;
  border-radius: 999px;
  background: var(--ns-fill-3);
  transition: background .2s ease;
  cursor: pointer;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .06);
  transition: transform .2s ease;
}
.switch:checked { background: var(--ns-ok); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }

.note {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: var(--ns-radius-s);
  background: color-mix(in srgb, var(--ns-warn) 12%, var(--ns-card));
  color: var(--ns-text-2);
  font-size: 12px;
}
.note [data-storage-free] { color: var(--ns-text); font-weight: 500; }

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* ---- Buttons --------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: background .15s ease, transform .1s ease, opacity .15s ease;
}
.button.primary { background: var(--ns-accent); color: var(--ns-on-accent); }
.button.primary:hover { background: var(--ns-accent-hover); }
.button.secondary { background: var(--ns-fill-2); color: var(--ns-text); }
.button.secondary:hover { background: var(--ns-fill-3); }
.button:active { transform: scale(.98); }
.button:disabled { opacity: .45; transform: none; }
.button.small { min-height: 32px; padding: 0 14px; font-size: 13px; }

.play-button {
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  font-size: 17px;
  font-weight: 600;
}

/* ---- Ready step ------------------------------------------------------------ */

.ready {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 12px;
}
.ready-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 6px;
}

/* ---- Footer ---------------------------------------------------------------- */

.card-foot {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--ns-line);
  color: var(--ns-text-3);
  font-size: 12px;
}
.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.options-button {
  min-height: 40px;
  padding: 0 16px 0 12px;
  font-size: 15px;
  font-weight: 600;
}
.options-button svg { width: 20px; height: 20px; }
.options-button[aria-expanded="true"] { background: var(--ns-fill-3); }
.foot-meta { font-variant-numeric: tabular-nums; }
.foot-meta a { color: inherit; }
.whats-new { margin-top: 6px; }
.whats-new summary { cursor: pointer; color: var(--ns-text-3); list-style: none; }
.whats-new summary::-webkit-details-marker { display: none; }
.whats-new summary:hover { color: var(--ns-text-2); }
.changelog { max-height: 200px; margin-top: 8px; overflow: auto; }
.changelog h3 { margin: 10px 0 4px; color: var(--ns-text-2); font-size: 12px; font-weight: 600; }
.changelog ul { margin: 0; padding-left: 16px; }
.changelog li { margin-bottom: 4px; }
.changelog li a { margin-left: 6px; }
.about-resources { margin: 8px 0 0; }
.about-resources a { color: var(--ns-text-3); }
.about-resources a:hover { color: var(--ns-text-2); }
.about-legal { margin: 10px 0 0; line-height: 1.5; }

/* ---- Options sheet ---------------------------------------------------------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--ns-scrim);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.sheet {
  position: fixed;
  z-index: 10001;
  left: 50%;
  top: 50%;
  width: min(480px, calc(100% - 32px));
  max-height: min(680px, calc(var(--desktop-viewport-height) - 48px));
  display: flex;
  flex-direction: column;
  transform: translate(-50%, -50%);
  border: 1px solid var(--ns-card-border);
  border-radius: var(--ns-radius);
  background: var(--ns-card);
  box-shadow: var(--ns-shadow);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}
.sheet-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.close-button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--ns-fill-2);
  color: var(--ns-text-2);
  font-size: 18px;
  line-height: 1;
}
.close-button:hover { background: var(--ns-fill-3); color: var(--ns-text); }

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin: 0 20px 6px;
  padding: 2px;
  border-radius: 9px;
  background: var(--ns-fill-2);
}
.segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ns-text-2);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.segmented button[aria-selected="true"] {
  background: var(--ns-card);
  color: var(--ns-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.sheet-body { padding: 8px 20px 20px; overflow: auto; }
.sheet-body h3 { margin: 18px 0 4px; color: var(--ns-text-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.setting {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--ns-line);
}
.setting:first-child, h3 + .setting { border-top: 0; }
.setting.switch-setting { margin-top: 0; padding: 11px 0; border-radius: 0; background: none; }
.setting > label { display: grid; gap: 1px; min-width: 0; }
.setting strong { font-size: 14px; font-weight: 500; }
.setting small { color: var(--ns-text-2); font-size: 12px; }
.setting select, .setting input[type="text"], .setting input[type="password"], .setting input[type="number"] {
  min-height: 32px;
  max-width: 200px;
  padding: 0 10px;
  border: 1px solid var(--ns-line);
  border-radius: 8px;
  background: var(--ns-card);
  color: var(--ns-text);
  font-size: 13px;
}
.setting input[type="text"], .setting input[type="password"] { width: 180px; }
.setting input[type="number"] { width: 78px; }
.setting select { padding-right: 26px; appearance: auto; }
.setting .inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.setting input[type="range"] { width: 130px; accent-color: var(--ns-accent); }
.setting output { min-width: 3ch; color: var(--ns-text-2); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.setting.capture-setting { grid-template-columns: 1fr; }
.setting.capture-setting .inline { justify-content: flex-start; }
#dumpStatus { color: var(--ns-text-3); }
#recordToggle.active { background: var(--ns-danger); color: #fff; }
.status-text { margin: 8px 0 0; color: var(--ns-text-2); font-size: 12px; }
.advanced { margin-top: 10px; }
.advanced summary { color: var(--ns-accent); font-size: 13px; cursor: pointer; }

/* ---- Toasts ---------------------------------------------------------------- */

.toast-region {
  position: fixed;
  z-index: 30000;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
  width: min(420px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--ns-card-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--ns-card) 92%, transparent);
  box-shadow: var(--ns-shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: toast-in .2s ease-out;
}
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: .2s ease; }
.toast-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ns-ok);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.toast.warning .toast-icon { background: var(--ns-warn); }
.toast div { display: grid; gap: 1px; min-width: 0; }
.toast strong { font-size: 13px; font-weight: 600; }
.toast span { color: var(--ns-text-2); font-size: 12px; overflow-wrap: anywhere; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---- Launch overlay (owned by play.mjs) ------------------------------------- */

.launch-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  overflow: hidden;
  background: #000;
  color: #f5f5f7;
}
.launch-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(400px, calc(100% - 48px));
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: translate(-50%, -50%);
  text-align: center;
}
.launch-loader h1 { margin: 6px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.launch-loader #launchStatus { margin: 0; color: #a1a1a6; font-size: 13px; overflow-wrap: anywhere; }
.launch-loader #launchStatus.error { color: #ff6961; }
.launch-progress {
  width: 100%;
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #2c2c2e;
}
.launch-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: #0a84ff;
  transition: width .25s ease;
}
.launch-stages {
  display: flex;
  gap: 16px;
  color: #6e6e73;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.launch-stages .is-done { color: #a1a1a6; }
.launch-loader .bootProgress { width: 100%; margin-top: 8px; }

/* ---- Responsive -------------------------------------------------------------- */

@media (max-width: 560px) {
  .card { padding: 28px 20px 16px; border-radius: 20px; }
  .card-head h1 { font-size: 28px; }
  .app-icon { width: 80px; height: 80px; }
  .source-button { min-height: 68px; }
  .actions { flex-direction: column-reverse; }
  .actions .button { width: 100%; min-height: 44px; }
  .ready-links { flex-direction: column; align-items: center; gap: 6px; }
  .sheet {
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: calc(var(--desktop-viewport-height) - 40px);
    transform: translateX(-50%);
    border-radius: var(--ns-radius) var(--ns-radius) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .setting { grid-template-columns: 1fr; }
  .setting .inline { justify-content: flex-start; }
  .setting select, .setting input[type="text"], .setting input[type="password"] { width: 100%; max-width: none; }
  .setting.switch-setting { grid-template-columns: 1fr auto; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .launcher { place-items: start center; }
  .card-head { margin-bottom: 16px; }
  .app-icon { width: 60px; height: 60px; margin-bottom: 4px; }
  .card-head h1 { font-size: 24px; }
}

@media (pointer: coarse) {
  .text-button { min-height: 44px; padding: 10px 0; }
  .options-button { min-height: 46px; }
  .remove-button { width: 32px; height: 32px; }
  .choice { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
