/* DownloadQR: the App Store download CTA for the tool and guide pages.
   Only the tool/guide pages load this file (never the homepage or the legal pages).
   Desktop: a scannable QR (/assets/qr/app-store-<page>.svg, black on white with a 4-module quiet zone) beside the copy.
   Phones and touch tablets: the QR is hidden and the button opens the store for that phone (Android: Google Play, otherwise the App Store).
   The QR opens /download?ct=<token>, which sends iPhones to the App Store and Android phones to Google Play.

   <aside class="dlqr" aria-label="Get the PushPong app">
     <div>
       <p class="dlqr-title">Get PushPong for iPhone</p>
       <p class="dlqr-text">One line of copy.</p>
       <a class="dlqr-btn" href="https://apps.apple.com/app/id6822350498?ct=pushpong_web_<page>&amp;mt=8">Download on the App Store</a>
     </div>
     <div class="dlqr-qr"><img src="/assets/qr/app-store-<page>.svg" width="148" height="148" alt="QR code that opens PushPong on the App Store" loading="lazy"><span>Scan with your iPhone camera</span></div>
   </aside>

   Add .dlqr-quiet for a secondary (non-gold) button when the section already has a gold action. */
.dlqr, .dlqr-btn { --dlqr-gold: var(--gold, #f5c518); --dlqr-muted: var(--muted, var(--dim, #9d9b94)); --dlqr-line: var(--line, rgba(255, 255, 255, .1)); }
.dlqr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin: 28px 0;
  padding: 22px 24px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(245, 197, 24, .14), rgba(245, 197, 24, .03));
  border: 1px solid rgba(245, 197, 24, .4);
  text-align: left;
}
.dlqr-title { margin: 0 0 6px; padding: 0; font-size: 19px; line-height: 1.3; font-weight: 800; color: #fff; }
.dlqr-text { margin: 0 0 16px; font-size: 16px; line-height: 1.5; color: var(--dlqr-muted); }
.dlqr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--dlqr-gold);
  color: #120d00;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.dlqr-btn:visited, .dlqr-btn:hover { color: #120d00; }
.dlqr-btn:hover { filter: brightness(1.08); }
.dlqr-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.dlqr-quiet .dlqr-btn { background: rgba(255, 255, 255, .08); border: 1px solid var(--dlqr-line); color: #fff; }
.dlqr-quiet .dlqr-btn:visited, .dlqr-quiet .dlqr-btn:hover { color: #fff; }
.dlqr-quiet .dlqr-btn:hover { filter: none; border-color: var(--dlqr-gold); }
.dlqr-qr { display: grid; justify-items: center; gap: 8px; margin: 0; }
.dlqr-qr img { display: block; width: 148px; height: 148px; max-width: none; border: 0; border-radius: 10px; background: #fff; }
.dlqr-qr span { max-width: 148px; font-size: 13px; line-height: 1.3; text-align: center; color: var(--dlqr-muted); }

/* Both store buttons are in the raw HTML. Phones see the one for their platform (class set on <html> by the head script). */
.dlqr-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.pp-android .dlqr-btn.apple, .pp-ios .dlqr-btn.play { display: none; }

@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  .dlqr { grid-template-columns: 1fr; padding: 20px; }
  .dlqr-qr { display: none; }
  .dlqr-btns { display: grid; }
  .dlqr-btn { width: 100%; }
}

/* Tool and guide pages have four nav links: let them wrap at 390px. Legal pages keep the plain row. */
nav.links.wrap-links { flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; }
@media (max-width: 420px) { nav.links.wrap-links { gap: 6px 12px; font-size: 14px; } }
