/* AutoType: Finish Pass — original visual language, sharper execution.
 * Supplement to styles.css, scoped to shared components and existing routes.
 * Built to preserve user themes, photo backgrounds and keyboard gameplay.
 */
:root {
  --finish-ring:rgba(0,162,255,.42);
  --finish-shadow:0 18px 42px rgba(0,0,0,.11);
  --finish-ease:cubic-bezier(.2,.7,.2,1);
}
html { scroll-behavior:smooth; }
body { text-rendering:optimizeLegibility; }
:where(a,button,input,textarea,select,summary):focus-visible {
  outline:2px solid var(--blue);
  outline-offset:3px;
}
:where(.button,.account-button,.home-mode-card,.mode-tile,.explore-links a,
       .special-mode-strip a,.shop-item-card,.tournament-card,.platform-section-head>a) {
  transition:transform .18s var(--finish-ease),border-color .18s ease,
    box-shadow .18s ease,background-color .18s ease,color .18s ease;
}

/* A real navigation shell, not a second distracting hero. */
.topbar { border-bottom-color:color-mix(in srgb,var(--border) 85%,transparent); }
body:not(.has-photo-bg) .topbar {
  background:color-mix(in srgb,var(--bg) 92%,transparent);
  -webkit-backdrop-filter:saturate(125%) blur(16px);
  backdrop-filter:saturate(125%) blur(16px);
}
.brand { letter-spacing:-.035em; }
.brand-logo { border:1px solid rgba(255,255,255,.15);box-shadow:0 3px 12px rgba(0,0,0,.16); }
.main-nav a,.nav-more summary { transition:color .17s ease,background-color .17s ease; }
.main-nav a.active { font-weight:800; }
.account-button { border:1px solid transparent; }
.account-button:hover,.account-button.open { border-color:var(--border); }
.account-dropdown {
  border-radius:12px;box-shadow:0 22px 55px rgba(0,0,0,.3);
  padding:8px;z-index:90;
}

/* Editorial hierarchy: readable at a glance, generous without wasted space. */
.page-heading h1,.platform-page-heading h1,.account-intro h1 {
  text-wrap:balance;
}
.platform-page-heading {
  border-bottom-color:var(--border-soft);
  padding-bottom:24px;
}
.platform-page-heading h1 { letter-spacing:-.052em; }
.platform-page-heading p,.page-heading p { max-width:62ch;line-height:1.62; }
.section-kicker { font-size:10px;letter-spacing:.11em; }
.platform-section-head h2 { font-size:clamp(17px,1.65vw,21px);line-height:1.2; }
.platform-section-head>a { text-underline-offset:3px; }
.platform-section-head>a:hover { color:var(--text); }
.section-note,.help { line-height:1.6; }

/* Shared panels: comfortable contrast and restrained depth. */
.platform-section,.panel,.stat {
  border-radius:13px;
  border-color:color-mix(in srgb,var(--border) 92%,transparent);
}
.platform-section {
  box-shadow:0 10px 28px rgba(0,0,0,.085);
}
.panel { box-shadow:0 9px 26px rgba(0,0,0,.06); }
.stat strong { letter-spacing:-.025em; }
.stat span { font-size:11px; }
:where(.platform-section,.panel) .empty { line-height:1.6; }

/* Buttons should feel clickable without affecting layout or game timing. */
.button { border-radius:9px;min-height:42px;line-height:1.2;letter-spacing:-.008em; }
.button-primary { box-shadow:0 4px 13px rgba(0,162,255,.16); }
.button-primary:hover:not(:disabled) { box-shadow:0 7px 20px rgba(0,162,255,.21); }
.button:hover:not(:disabled) { transform:translateY(-1px); }
.button:active:not(:disabled) { transform:translateY(0); }
.input,.textarea,.select { border-radius:9px; }
.input:focus,.textarea:focus,.select:focus {
  box-shadow:0 0 0 3px rgba(0,162,255,.14);
}
:where(.button,.input,.textarea,.select):disabled { cursor:not-allowed; }

/* Home: keep the original message and predictor, add game-like art direction. */
.home-command-shelf {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border-radius:18px;
  border-color:color-mix(in srgb,var(--border) 80%,var(--blue) 20%);
  background:
    radial-gradient(ellipse 72% 100% at 92% 4%,rgba(0,162,255,.11),transparent 78%),
    color-mix(in srgb,var(--surface) 95%,transparent);
  box-shadow:var(--finish-shadow);
}
.home-command-shelf::before {
  content:"";position:absolute;z-index:-1;pointer-events:none;
  top:-112px;right:-95px;width:310px;height:310px;border-radius:50%;
  border:1px solid rgba(0,162,255,.105);
  box-shadow:0 0 0 46px rgba(0,162,255,.018),
             0 0 0 92px rgba(0,162,255,.013);
}
.home-command-copy h1 { text-wrap:balance; }
.home-command-copy>p { max-width:52ch; }
.home-play-button { min-width:142px; }
.home-game-preview {
  border-radius:14px;
  box-shadow:0 18px 33px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.025);
  border-color:color-mix(in srgb,var(--border) 75%,var(--blue) 25%);
}
.home-game-preview-head { font-size:10px;letter-spacing:.08em; }
.home-target-sample { font-size:12px; }
.home-preview-keys { gap:9px;flex-wrap:wrap;font-size:10px;line-height:1.3; }
.home-preview-keys b { color:var(--muted); }
.preview-learn-link {
  margin-left:auto;white-space:nowrap;color:#8cd5ff;font-weight:850;
  text-decoration:underline;text-decoration-color:transparent;
  text-underline-offset:3px;
}
.preview-learn-link:hover { text-decoration-color:currentColor;color:#fff; }
.home-mini-stats span { font-size:10px; }
.home-mini-stats strong { font-size:19px;font-variant-numeric:tabular-nums; }

/* Roblox-like discovery hierarchy, implemented with AutoType's own visual language.
   Five useful modes remain visible; no new modes or artificial content. */
.home-mode-grid { grid-template-columns:repeat(5,minmax(0,1fr));gap:12px; }
.home-mode-card {
  min-width:0;position:relative;isolation:isolate;overflow:hidden;
  border-radius:13px;min-height:168px;padding:19px;
  background:linear-gradient(153deg,rgba(255,255,255,.024),transparent 70%),var(--surface);
}
.home-mode-card::before {
  content:"";position:absolute;top:0;left:0;right:0;height:3px;
  background:var(--mode-accent,#00a2ff);opacity:.82;
}
.home-mode-card::after {
  content:"";position:absolute;pointer-events:none;z-index:-1;
  width:130px;height:130px;right:-50px;top:-57px;border-radius:50%;
  background:radial-gradient(circle,color-mix(in srgb,var(--mode-accent,#00a2ff) 20%,transparent),transparent 69%);
}
.home-mode-card:nth-child(1){--mode-accent:#00a2ff}
.home-mode-card:nth-child(2){--mode-accent:#63cdb2}
.home-mode-card:nth-child(3){--mode-accent:#bb87ec}
.home-mode-card:nth-child(4){--mode-accent:#e9b967}
.home-mode-card:nth-child(5){--mode-accent:#79a4ff}
.home-mode-card>span { font-size:10px;letter-spacing:.1em; }
.home-mode-card strong { font-size:20px;letter-spacing:-.03em;margin-top:13px; }
.home-mode-card p { font-size:12px;line-height:1.5;margin-top:8px; }
.home-mode-card b { font-size:12px;letter-spacing:0; }
.home-mode-card:hover {
  transform:translateY(-3px);border-color:var(--mode-accent);
  box-shadow:0 14px 30px rgba(0,0,0,.15);
}
.home-mode-card:active { transform:translateY(-1px); }

/* The rest of the home dashboard should be legible, not microtext. */
.home-progress-line { font-size:12px; }
.metric-row-3 span,.home-wallet small { font-size:10px; }
.metric-row-3 strong { font-size:17px; }
.metric-row-3 div,.home-wallet div { border-radius:10px; }
.home-feature-link p { font-size:12px; }
.feature-icon { border-radius:11px; }

/* Game-mode selection and discoverability. */
.mode-card-grid { gap:13px; }
.mode-tile {
  min-width:0;border-radius:13px;overflow:hidden;
  background:linear-gradient(125deg,rgba(0,162,255,.035),transparent 56%),var(--surface);
}
.mode-tile:hover {
  transform:translateY(-2px);
  border-color:color-mix(in srgb,var(--blue) 45%,var(--border));
  box-shadow:0 12px 26px rgba(0,0,0,.12);
}
.mode-number { font-size:11px; }
.mode-tile small,.special-mode-strip span { font-size:10px; }
.mode-tile p { font-size:13px; }
.mode-tile>b { font-size:12px; }
.special-mode-strip a:hover { background:var(--surface-2); }
.special-mode-strip small { font-size:11px;line-height:1.45; }
.social-metrics span,.lab-metrics span,.leaderboard-self span { font-size:10px; }
.mechanic-demo-flow small { font-size:10px; }

/* Lists, community, shop and tournament surfaces feel part of one product. */
.explore-links a { border-radius:9px; }
.explore-links a:hover { transform:translateX(2px); }
:where(.shop-item-card,.tournament-card,.crate-card,.collection-card,
        .achievement-card,.inventory-item) { border-radius:12px; }
:where(.shop-item-card,.tournament-card,.crate-card,.collection-card):hover {
  border-color:color-mix(in srgb,var(--border) 70%,var(--blue) 30%);
}
:where(.leaderboard-row,.list-row,.friend-row) { transition:background-color .16s ease; }
:where(.leaderboard-row,.list-row,.friend-row):hover { background:rgba(139,174,202,.045); }

/* Consistent finish across account, settings, help, and site footer. */
.account-benefits span { font-size:12px; }
.settings-index a { font-size:11px; }
.footer {
  margin-top:42px;padding:27px 0 35px;
  font-size:12px;color:var(--muted);
}
.footer-inner { align-items:center;flex-wrap:wrap; }
.footer strong { color:var(--text); }
.footer-links a { text-decoration:none;transition:color .16s ease; }
.footer-links a:hover { color:var(--text);text-decoration:underline;text-underline-offset:3px; }
.friends-beta-banner { border-radius:9px; }

/* Light themes remain light; user-selected images and solid backgrounds remain theirs. */
body.theme-light .home-command-shelf {
  background:radial-gradient(ellipse at 95% 2%,rgba(0,135,225,.07),transparent 73%),
    color-mix(in srgb,var(--surface) 96%,transparent);
}
body.theme-light .home-command-shelf::before { border-color:rgba(0,125,200,.1); }
body.theme-light .home-mode-card {
  background:linear-gradient(153deg,rgba(255,255,255,.55),transparent 70%),var(--surface);
}
body.theme-light .preview-learn-link { color:#006da9; }
body.theme-light .preview-learn-link:hover { color:#00466d; }
body.theme-light .footer strong { color:var(--text); }
body.theme-light .home-mode-card:hover { box-shadow:0 11px 25px rgba(27,42,58,.09); }

@media(max-width:1080px) {
  .home-mode-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .home-command-shelf { gap:26px;padding:42px 30px; }
}
@media(max-width:760px) {
  .home-mode-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .home-mode-card { min-height:156px;padding:16px; }
  .home-command-shelf::before { opacity:.6; }
  .home-game-preview { box-shadow:0 10px 22px rgba(0,0,0,.12); }
  .page,.platform-home { padding-top:26px; }
}
@media(max-width:520px) {
  .home-command-shelf { padding:23px 17px;border-radius:14px; }
  .home-mode-grid { gap:9px; }
  .home-mode-card { min-height:160px;padding:14px; }
  .home-mode-card strong { font-size:19px; }
  .home-mode-card p { font-size:11px; }
  .home-preview-keys { gap:6px;font-size:9px; }
  .preview-learn-link { flex-basis:100%;margin:5px 0 0; }
  .platform-section { padding:16px; }
  .home-mini-stats div { min-width:0;flex:1;padding-right:10px; }
  .home-mini-stats div+div { padding-left:10px; }
  .footer-inner { gap:12px; }
}
@media(max-width:355px) {
  .home-mode-grid { grid-template-columns:1fr; }
  .home-mode-card { min-height:138px; }
}
@media(hover:none) {
  .home-mode-card:hover,.mode-tile:hover,.button:hover:not(:disabled),.explore-links a:hover {
    transform:none;
  }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  .button,.home-mode-card,.mode-tile,.explore-links a,.platform-section-head>a,
  .footer-links a,.account-button { transition:none!important; }
  .home-mode-card:hover,.mode-tile:hover,.button:hover:not(:disabled),.explore-links a:hover {
    transform:none;
  }
}
body.animations-off .button,
body.animations-off .home-mode-card,
body.animations-off .mode-tile,
body.animations-off .explore-links a { transition:none!important;transform:none!important; }

/* About, privacy and contact pages */
.information-page{max-width:1130px}
.information-layout{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(250px,.8fr);gap:16px;align-items:start}
.information-story,.information-side{padding:25px}
.information-page h2{margin:0 0 12px;font-size:clamp(17px,2vw,23px);letter-spacing:-.025em}
.information-page p{font-size:14px;line-height:1.7;color:var(--muted);margin:0 0 15px}
.information-page p:last-child{margin-bottom:0}
.information-page .platform-page-heading p{max-width:70ch;font-size:15px}
.information-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:23px}
.information-section{margin-top:16px}
.information-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.information-feature-grid a{display:grid;gap:7px;padding:16px;border:1px solid var(--border);border-radius:11px;background:var(--surface-2)}
.information-feature-grid a:hover{border-color:var(--blue)}
.information-feature-grid strong{font-size:14px}
.information-feature-grid span,.information-date{color:var(--muted);font-size:12px}
.information-date{display:inline-block;margin-top:12px}
.policy-copy section+section{padding-top:23px;margin-top:23px;border-top:1px solid var(--border-soft)}
.policy-copy a:not(.button){color:#82cdff;text-decoration:underline;text-underline-offset:3px}
.information-side{position:sticky;top:88px}
.information-aside-links{display:grid;gap:0}
.information-aside-links a{padding:12px 0;border-top:1px solid var(--border-soft);font-size:13px}
.information-aside-links a:hover{color:#8bd3ff}
.information-contact-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.information-contact-grid>.platform-section{display:flex;flex-direction:column;align-items:flex-start;min-height:258px}
.information-contact-grid p{flex:1}
.information-contact-grid .information-fineprint,.information-fineprint{font-size:11px;color:var(--muted);line-height:1.5}
.information-contact-grid .button{margin-top:auto}
body.theme-light .policy-copy a:not(.button),body.theme-light .information-aside-links a:hover{color:#066998}
.footer-links{display:flex;align-items:center;flex-wrap:wrap;gap:13px}
.footer-links a{white-space:nowrap}
/* Inactive ad slots are invisible on real pages until approved.
   ?ad-preview=1 reveals layout-only placeholders, without ad tags or tracking. */
.autotype-ad-slot[hidden]{display:none!important}
.autotype-ad-slot{display:grid;gap:7px;place-content:center;text-align:center;min-height:126px;margin:18px 0;
 border:1px dashed color-mix(in srgb,var(--border) 78%,var(--blue) 22%);
 border-radius:12px;background:color-mix(in srgb,var(--surface) 92%,transparent);color:var(--muted);
 padding:20px;pointer-events:none}
.autotype-ad-slot strong{display:block;font-size:14px;letter-spacing:-.01em;color:var(--text)}
.autotype-ad-slot span{font-size:10px;font-weight:800;letter-spacing:.12em}
.autotype-ad-slot small{font-size:11px;line-height:1.5}
@media(max-width:850px){.information-layout{grid-template-columns:1fr}.information-side{position:static}.information-contact-grid{grid-template-columns:1fr}.information-contact-grid>.platform-section{min-height:0}}
@media(max-width:560px){.information-story,.information-side{padding:17px}.information-feature-grid{grid-template-columns:1fr}.information-page p{font-size:13px}.autotype-ad-slot{margin:15px 0;min-height:100px}}

/* AutoType installed app experience. Invisible on ordinary browser visits. */
.pwa-install-page{max-width:1130px}
.pwa-install-feature{display:grid;grid-template-columns:210px minmax(0,1fr);align-items:center;gap:32px;
  padding:32px;background:radial-gradient(ellipse at 9% 20%,rgba(0,162,255,.12),transparent 56%),var(--surface)}
.pwa-install-art{display:grid;justify-items:center;gap:13px;padding:10px}
.pwa-install-art img{width:144px;height:144px;border-radius:30px;box-shadow:0 24px 48px rgba(0,0,0,.27)}
.pwa-install-art>span{font-size:9px;font-weight:850;letter-spacing:.16em;color:var(--muted)}
.pwa-install-copy h2{margin:7px 0 11px;font-size:clamp(22px,3vw,32px);letter-spacing:-.045em}
.pwa-install-copy p{margin:0 0 16px;color:var(--muted);font-size:13px;max-width:60ch;line-height:1.7}
.pwa-install-copy .pwa-install-status{margin:14px 0 0;font-size:12px}
.pwa-install-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:16px 0}
.pwa-install-guide{padding:23px}
.pwa-install-guide-label{display:flex;gap:11px;align-items:center;margin:0 0 12px}
.pwa-device-icon{width:37px;height:37px;display:grid;place-items:center;border-radius:10px;
  border:1px solid rgba(0,162,255,.24);background:rgba(0,162,255,.09);font-size:21px}
.pwa-install-guide h2,.pwa-install-faq h2{font-size:20px;letter-spacing:-.025em;margin:0 0 13px}
.pwa-install-guide ol{padding-left:21px;display:grid;gap:12px;margin:0 0 16px;color:var(--text)}
.pwa-install-guide li{padding-left:3px;font-size:13px;line-height:1.55}
.pwa-install-guide strong{color:var(--text)}
.pwa-install-guide .pwa-guide-note{font-size:12px;color:var(--muted);line-height:1.65;margin:0}
.pwa-install-faq{padding:24px}
.pwa-install-faq p{max-width:74ch;font-size:13px;line-height:1.7;color:var(--muted)}
.home-install-hint{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:14px 0 5px;font-size:12px;color:var(--muted)}
.home-install-hint .home-install-mark{display:grid;place-items:center;width:24px;height:24px;border-radius:6px;background:#141b24;color:#fff;border:1px solid #275c7e;font-weight:850;letter-spacing:-.09em}
.home-install-hint .home-install-mark em{font-style:normal;color:#00a2ff}
.home-install-hint a{color:#89d4ff;font-weight:800;text-decoration:underline;text-underline-offset:3px}
body.theme-light .home-install-hint a{color:#086996}
.pwa-app-dock{display:none}
@media(max-width:820px){
  .pwa-install-feature{grid-template-columns:1fr;text-align:center;gap:9px;padding:22px}
  .pwa-install-art img{width:110px;height:110px;border-radius:25px}
  .pwa-install-copy p{margin-left:auto;margin-right:auto}
  .pwa-install-guide-grid{grid-template-columns:1fr}
  .pwa-install-guide{padding:18px}
  body.pwa-has-dock{padding-bottom:calc(79px + env(safe-area-inset-bottom,0px))}
  body.pwa-has-dock .pwa-app-dock{display:grid;position:fixed;grid-template-columns:repeat(4,minmax(0,1fr));
    left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom,0px));z-index:58;
    min-height:61px;padding:6px;gap:3px;border:1px solid color-mix(in srgb,var(--border) 60%,var(--blue) 40%);
    border-radius:17px;background:color-mix(in srgb,var(--surface) 96%,transparent);
    box-shadow:0 13px 38px rgba(0,0,0,.3);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
  .pwa-dock-link{display:grid;place-content:center;justify-items:center;gap:2px;border-radius:11px;
    min-height:48px;color:var(--muted);font-size:10px;font-weight:750;text-decoration:none}
  .pwa-dock-link span:first-child{font-size:19px;line-height:1}
  .pwa-dock-link.is-current{color:var(--text);background:rgba(0,162,255,.14)}
  .pwa-dock-link.is-current span:first-child{color:var(--blue)}
  body.pwa-has-dock.mobile-keyboard-active .pwa-app-dock{display:none}
  body.pwa-has-dock:has(input:focus,textarea:focus,select:focus,[contenteditable]:focus) .pwa-app-dock{display:none}
  body.pwa-has-dock .toast{bottom:calc(88px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:500px){.pwa-install-copy h2{font-size:24px}.pwa-install-faq{padding:17px}.pwa-install-guide li{font-size:12px}}

/* PWA v2: full-route dock without interrupting play, sign-in or native text entry. */
@media(display-mode:standalone){
 .home-install-hint,.footer-links a[href="install.html"],.pwa-install-guide-grid{display:none!important}
}
body.pwa-standalone .home-install-hint,
body.pwa-standalone .footer-links a[href="install.html"],
body.pwa-standalone .pwa-install-guide-grid{display:none!important}
@media(max-width:820px){
 body.pwa-has-dock[data-page="play"]:has(#gameArea:not([hidden])) .pwa-app-dock{display:none}
 body.pwa-has-dock[data-page="play"]:has(#gameArea:not([hidden])){padding-bottom:0}
 body.pwa-has-dock:has(input:focus,textarea:focus,select:focus,[contenteditable]:focus) .pwa-app-dock{display:none}
 .pwa-install-page{padding-top:16px}
 .pwa-install-feature{padding:21px 16px;gap:4px;border-radius:16px}
 .pwa-install-art{padding:3px 8px 12px}
 .pwa-install-art img{width:100px;height:100px;border-radius:20px;box-shadow:0 10px 28px rgba(0,0,0,.15)}
 .pwa-install-copy h2{font-size:clamp(22px,6vw,27px);line-height:1.15;overflow-wrap:break-word}
 .pwa-install-copy .button{max-width:100%;white-space:normal;min-height:44px}
 .pwa-install-guide-grid{gap:10px;margin:12px 0}
 .pwa-install-guide ol{overflow-wrap:break-word}
 .pwa-install-faq .information-actions{display:flex;flex-wrap:wrap}
 .pwa-install-faq .button{flex:1 1 135px;text-align:center}
 .home-install-hint{align-items:flex-start;line-height:1.45;gap:7px 8px}
 .home-install-hint .home-install-mark{flex:0 0 24px}
}

/* Original AutoType wordmark stays legible in the compact install hint. */
.home-install-hint .home-install-mark{width:47px;height:28px;flex:0 0 47px;background:transparent;border:0}
.home-install-hint .home-install-mark img{display:block;width:100%;max-width:100%;height:28px;object-fit:contain}
@media(max-width:820px){
 .home-install-hint .home-install-mark{flex:0 0 47px}
 .home-install-hint{font-size:12px;margin-top:16px}
 .home-install-hint strong{font-size:12px}
 .home-install-hint a{display:inline-block;min-height:24px}
}

/* PWA v3: protect the original logo and isolate the mobile installation UI.
   The source logo contains transparent margins; present its complete wordmark
   in a white framed crop on dark and light backgrounds alike. */
.brand-logo{
  position:relative;width:58px;height:34px;flex:0 0 58px;overflow:hidden;
  padding:0;background:#fff!important;border:1px solid rgba(23,42,58,.18);
  border-radius:8px;
}
.brand-logo img[src="assets/logo.png"]{
  position:absolute;display:block;width:85px!important;height:54px!important;
  max-width:none!important;left:-14px;top:-10px;object-fit:fill;
}
.home-install-hint .home-install-mark{
  position:relative;display:block;flex:0 0 74px;width:74px;height:42px;
  padding:0;overflow:hidden;border-radius:9px;background:#fff!important;
  border:1px solid rgba(27,51,70,.22);
  box-shadow:0 3px 10px rgba(0,0,0,.12);
}
.home-install-hint .home-install-mark img[src="assets/logo.png"]{
  position:absolute;display:block;width:110px!important;height:70px!important;
  max-width:none!important;left:-18px;top:-13px;object-fit:fill;
}
/* Desktop pages never advertise Home Screen installation. */
.home-install-hint,.footer-links a[href="install.html"]{display:none!important}
html.pwa-mobile-browser body:not(.pwa-standalone) .home-install-hint{display:flex!important}
html.pwa-mobile-browser body:not(.pwa-standalone) .footer-links a[href="install.html"]{display:inline-block!important}
html.pwa-desktop-browser .pwa-install-guide-grid,
html.pwa-desktop-browser .pwa-install-copy .section-kicker{display:none!important}
html.pwa-desktop-browser .pwa-install-faq{margin-top:16px}
html.pwa-installed .home-install-hint,
html.pwa-installed .footer-links a[href="install.html"],
html.pwa-installed .pwa-install-guide-grid{display:none!important}
@media(max-width:520px){
  html.pwa-mobile-browser .home-install-hint{gap:9px;align-items:center}
  .home-install-hint .home-install-mark{flex:0 0 74px!important}
  .home-install-hint strong{min-width:0}
  .brand-logo{width:53px;flex-basis:53px}
  .brand-logo img[src="assets/logo.png"]{left:-16px}
}


/* Match both legacy and extensionless installer links. These rules are essential:
   DOM link normalization must never reveal installation prompts on desktop/PWA. */
.footer-links a[href="install"]{display:none!important}
@media(display-mode:standalone){
  .footer-links a[href="install"]{display:none!important}
}
body.pwa-standalone .footer-links a[href="install"],
html.pwa-installed .footer-links a[href="install"]{display:none!important}
html.pwa-mobile-browser body:not(.pwa-standalone) .footer-links a[href="install"]{
  display:inline-block!important
}
