/* public/css/download-app.css — Settings → Download App. Uses the same tokens as the rest of Settings. */
.da-main { max-width: 600px; gap: 18px; }

.da-intro h2 { font-size: 1.45rem; line-height: 1.2; margin: 0; }
.da-intro p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }

.da-note { margin: 0; padding: 11px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--text); font-size: .92rem; line-height: 1.45; }
.da-note.hidden { display: none; }

/* One card, one row per app — the app that matches this device is moved to the top by download-app.js. */
.da-list { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-l, 18px); display: flex; flex-direction: column; }
.da-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.da-item + .da-item { border-top: 1px solid var(--line); }
.da-ico { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.da-ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.da-body { flex: 1 1 auto; min-width: 0; }
.da-body h3 { margin: 0; font-size: 1.02rem; }
.da-desc { margin: 2px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.da-meta { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }
.da-item.mine .da-meta { color: var(--brand); font-weight: 600; }

.da-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border-radius: 12px; font-weight: 700; font-size: .95rem; text-decoration: none; text-align: center; line-height: 1.25; white-space: nowrap;
  background: var(--brand); color: var(--on-brand); border: 1px solid var(--brand); }
.da-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.da-btn[aria-disabled="true"] { background: var(--surface-3); color: var(--muted); border-color: transparent; opacity: .8; cursor: not-allowed; pointer-events: none; }
:where(html[data-input="mouse"]) .da-btn:not([aria-disabled="true"]):hover { background: var(--brand-strong); border-color: var(--brand-strong); }

.da-help { display: flex; flex-direction: column; gap: 8px; }
.da-help.hidden { display: none; }
.modal-backdrop.hidden { display: none; }
.da-terms-box { max-width: 420px; }
.da-terms-body { padding: 4px 20px 8px; font-size: .95rem; line-height: 1.55; }
.da-terms-body p { margin: 0 0 10px; }
.da-terms-legal { color: var(--muted); font-size: .9rem; }
.da-terms-legal a { color: var(--brand); }
.da-terms-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 12px 20px 18px; }
.da-terms-actions > * { flex: 0 1 auto; min-width: 0; width: auto; }
.da-terms-actions .btn, .da-terms-actions .da-btn { min-height: 44px; padding: 0 20px; border-radius: 12px; font-weight: 700; }
button.da-btn { font-family: inherit; cursor: pointer; }
.da-help details { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
.da-help summary { cursor: pointer; padding: 13px 0; font-weight: 600; font-size: .95rem; }
.da-help ol { margin: 0 0 8px; padding-left: 20px; color: var(--text); font-size: .9rem; line-height: 1.55; }
.da-help p { margin: 0 0 14px; color: var(--muted); font-size: .86rem; line-height: 1.5; }

/* Phones: the button drops under the text so long labels never squeeze the row. */
@media (max-width: 480px) {
  .da-item { flex-wrap: wrap; }
  .da-body { flex-basis: calc(100% - 60px); }
  .da-item .da-btn { width: 100%; }
  /* dialog buttons stack full width so Cancel can never be pushed off the screen */
  .da-terms-actions { flex-direction: column-reverse; align-items: stretch; }
  .da-terms-actions > * { width: 100%; }
  .da-terms-box { max-width: 100%; }
}

/* Inside Settings (computers): the section sits in the normal Settings panel, same width as the others. */
.da-pane { gap: 18px; }
.da-pane .da-sub { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.da-pane .da-intro h2 { font-size: 1.25rem; }
.da-pane .da-intro p:not(.da-sub) { font-size: .92rem; }
.da-pane .da-list { background: var(--surface-2); }

.da-help details.hidden { display: none; }
