/* Existing black/gold theme; all rules are scoped to the APP entry. */
.app-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background: currentColor;
  mask: url("./assets/app-install/smartphone.svg") center / contain no-repeat;
  -webkit-mask: url("./assets/app-install/smartphone.svg") center / contain no-repeat;
}
.app-icon-close { mask-image: url("./assets/app-install/x.svg"); -webkit-mask-image: url("./assets/app-install/x.svg"); }
.app-icon-copy { mask-image: url("./assets/app-install/copy.svg"); -webkit-mask-image: url("./assets/app-install/copy.svg"); }
.app-icon-share { mask-image: url("./assets/app-install/share.svg"); -webkit-mask-image: url("./assets/app-install/share.svg"); }
.app-icon-arrow { mask-image: url("./assets/app-install/arrow-up-right.svg"); -webkit-mask-image: url("./assets/app-install/arrow-up-right.svg"); }
.app-install-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.app-install-nav {
  min-height: 40px;
  padding: 8px 12px;
  margin-left: 5px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold-2);
  font-size: 14px;
  font-weight: 750;
}
.app-install-nav:hover { background: var(--panel-3); }
.home-edition .hero-actions .app-install-hero { color: #ffd45a; border-color: #b08822; }
.home-edition .hero-actions .app-install-hero:hover { background: #252114; }
.home-edition .hero-actions .hero-signals-link { border-color: transparent; background: transparent; color: #c8c7c1; }
.home-edition .hero-actions .hero-signals-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.app-install-dialog {
  box-sizing: border-box;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 96px rgba(0, 0, 0, 0.5);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}
.app-install-dialog:not([open]) { display: none; }
.app-install-dialog::backdrop { background: rgba(0, 0, 0, 0.76); }
body.app-install-is-open { overflow: hidden; }
.app-install-dialog [hidden] { display: none !important; }
.app-install-close {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.app-install-close:hover { background: var(--panel-2); color: var(--text); }
.app-install-heading { display: flex; align-items: center; gap: 14px; padding-right: 26px; }
.app-install-heading img { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--gold); flex: 0 0 56px; }
.app-install-heading p { margin: 0 0 2px; color: var(--gold-2); font-size: 13px; font-weight: 750; }
.app-install-heading h2 { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 850; }
.app-install-description { margin: 18px 0 24px; color: var(--muted); font-size: 16px; }
.app-install-layout { display: grid; grid-template-columns: 222px minmax(0, 1fr); gap: 28px; align-items: start; }
.app-install-scan { padding-top: 2px; text-align: center; }
.app-install-qr { display: block; width: 222px; height: 222px; max-width: 100%; aspect-ratio: 1; background: #fff; border: 0; border-radius: 4px; }
.app-install-scan strong { display: block; margin-top: 14px; font-size: 16px; }
.app-install-scan p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.app-install-platform { display: flex; margin: 0 0 22px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.app-install-platform label { position: relative; flex: 1 1 0; min-width: 0; cursor: pointer; }
.app-install-platform input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.app-install-platform span { display: grid; place-items: center; min-height: 40px; padding: 7px 8px; border-radius: 4px; color: var(--muted); font-size: 14px; font-weight: 750; }
.app-install-platform input:checked + span { color: var(--gold-2); background: var(--panel-2); box-shadow: 0 1px 3px var(--shadow); }
.app-install-platform input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }
.app-install-steps { margin: 0; padding-left: 24px; }
.app-install-steps li { padding-left: 5px; margin-bottom: 18px; }
.app-install-steps li:last-child { margin-bottom: 0; }
.app-install-steps li::marker { color: var(--gold-2); font-weight: 800; }
.app-install-steps strong { font-size: 15px; font-weight: 750; line-height: 1.55; }
.app-install-steps strong .app-icon { width: 16px; height: 16px; vertical-align: -2px; }
.app-install-steps p { margin: 4px 0 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.app-install-note { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.7; color: var(--muted); }
.app-install-footer { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin: 26px 0 0; padding: 22px 0 0; border: 0; border-top: 1px solid var(--line); }
.app-install-open { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 10px 18px; border-radius: 6px; background: #f3b700; color: #111; font-weight: 800; white-space: nowrap; }
.app-install-open:hover { background: #ffd45a; }
.app-install-address { display: flex; min-width: 0; align-items: center; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); }
.app-install-address input { width: 100%; min-width: 0; padding: 12px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; }
.app-install-address button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 46px; padding: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0 5px 5px 0; color: var(--text); background: transparent; cursor: pointer; }
.app-install-address button:hover { background: var(--panel-2); }
.app-install-feedback { grid-column: 1 / -1; margin: 0; min-height: 20px; color: var(--muted); font-size: 12px; }
.app-install-dialog :is(a, button, input):focus-visible, .app-install-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.app-install-floating { display: none; }
@media (min-width: 641px) {
  .topbar-actions .app-install-link { display: none; }
}
@media (min-width: 641px) and (max-width: 1050px) {
  .topbar { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .topbar .nav { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  body.has-mobile-app-entry { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .app-install-floating {
    position: fixed;
    z-index: 30;
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .app-install-floating-link {
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid #f3b700;
    border-radius: 8px;
    background: #f3b700;
    color: #111;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 0;
  }
  .app-install-floating-link:hover { background: #ffd45a; }
  .app-install-floating-dismiss {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
  }
  .app-install-floating-dismiss:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
  body.app-install-is-open .app-install-floating,
  body.lightbox-open .app-install-floating,
  body:has(dialog[open], #main-nav.open, input:focus, textarea:focus) .app-install-floating { display: none; }
  .topbar .brand { min-width: 0; }
  .topbar .header-cta.app-install-link { color: #111; background: #f3b700; border-color: #f3b700; font-size: 13px; padding-inline: 9px; }
  .topbar .header-cta .app-icon { width: 17px; height: 17px; flex-basis: 17px; }
  .nav .app-install-nav { margin: 0; min-height: 44px; }
  .home-edition .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-edition .hero-actions > * { min-width: 0; }
  .home-edition .hero-actions .hero-signals-link { grid-column: 1 / -1; justify-self: start; padding-left: 0; }
  .app-install-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 24px 20px 18px; }
  .app-install-heading { gap: 11px; padding-right: 18px; }
  .app-install-heading img { width: 46px; height: 46px; flex-basis: 46px; }
  .app-install-heading h2 { font-size: 22px; }
  .app-install-description { font-size: 14px; margin-block: 16px 20px; }
  .app-install-layout { grid-template-columns: minmax(0, 1fr); }
  .app-install-scan { display: none; }
  .app-install-footer { grid-template-columns: minmax(0, 1fr); margin-top: 20px; padding-top: 18px; gap: 12px; }
  .app-install-platform { margin-bottom: 18px; }
  .app-install-open { width: 100%; }
}
@media (max-width: 360px) {
  .topbar { gap: 7px; }
  .topbar .brand { gap: 7px; }
  .topbar .brand strong { font-size: 18px; }
  .topbar-actions { gap: 5px; }
  .app-install-dialog { padding-inline: 16px; }
  .app-install-heading h2 { font-size: 20px; }
}
