/* Application card (0010, 0046). All selectors are scoped to .app-page; loaded only there. */
.app-page { display: block; min-width: 0; margin-top: -16px; }
.app-page .head { display: flex; align-items: flex-start; gap: 24px; min-width: 0; }
.app-page .icon {
  flex: 0 0 96px; width: 96px; height: 96px; border-radius: 22px; object-fit: contain;
  background: var(--md-sys-color-surface-variant);
}
.app-page .icon.placeholder {
  display: grid; place-items: center; color: var(--md-sys-color-primary); font-size: 40px; font-weight: 500;
}
.app-page .titles { min-width: 0; flex: 1; }
.app-page h1 {
  margin: 0; font-size: clamp(24px, 6vw, 32px); font-weight: 500; line-height: 1.25; overflow-wrap: anywhere;
}
.app-page .developer { margin: 12px 0 0; color: var(--md-sys-color-on-surface-variant); font-size: 16px; overflow-wrap: anywhere; }
/* 0046 minimal card: identity, availability block, description and tags. */
.app-page .classification {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 8px 0 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 480px) {
  .app-page .head { gap: 16px; }
  .app-page .icon { flex-basis: 64px; width: 64px; height: 64px; border-radius: 16px; }
}

.app-page .classification a {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-block: 5px;
}
.app-page .meta-separator {
  width: 1px;
  height: 14px;
  background: var(--md-sys-color-outline);
}

/* Availability block follows the supplied shell reference. */
.app-page .download-variants { max-width: 720px; margin-top: 28px; }
.app-page .download-card {
  position: relative;
  box-sizing: border-box;
  padding: 28px;
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 16px;
  overflow-wrap: anywhere;
}
.app-page .download-card::before,
.app-page .download-card::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.app-page .download-card::before {
  top: -2px; left: -2px;
  border-top: 3px solid var(--md-sys-color-primary);
  border-left: 3px solid var(--md-sys-color-primary);
}
.app-page .download-card::after {
  bottom: -2px; right: -2px;
  border-bottom: 3px solid var(--md-sys-color-primary);
  border-right: 3px solid var(--md-sys-color-primary);
}
.app-page .download-scope {
  margin: 0 0 10px;
  color: var(--md-sys-color-primary);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.app-page .download-card.stopped .download-scope { color: var(--apk-coral); }
.app-page .download-card h2 { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 500; }
.app-page .download-copy { margin: 14px 0 22px; color: var(--md-sys-color-on-surface-variant); font-size: 16px; line-height: 1.5; }
.app-page .download-button { display: flex; gap: 10px; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 8px; font-size: 16px; line-height: 1.5; }
.app-page .download-button.outlined { background: var(--md-sys-color-surface); }
.app-page .download-button:hover { filter: brightness(.94); }
/* 0087 stage 2 (docs/design-reference/0087-xapk-download.html): button → disclaimer → "How to install" → limit. */
.app-page .download-note { margin: 20px 0 0; color: var(--md-sys-color-on-surface-variant); font-size: 14px; line-height: 1.5; }
.app-page .install-help { margin: 24px 0 0; }
.app-page .install-help summary { cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 0; box-sizing: border-box; list-style: none; color: var(--md-sys-color-on-surface); font-size: 16px; }
.app-page .install-help summary::-webkit-details-marker { display: none; }
.app-page .install-help summary::before { content: "▸"; color: var(--md-sys-color-on-surface-variant); }
.app-page .install-help[open] summary::before { content: "▾"; }
.app-page .install-help p { margin: 8px 0 12px; color: var(--md-sys-color-on-surface-variant); font-size: 14px; line-height: 1.5; }
.app-page .install-steps { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: step; }
.app-page .install-steps li { position: relative; padding: 10px 0 10px 44px; border-top: 1px solid var(--md-sys-color-surface-variant); font-size: 15px; line-height: 1.5; counter-increment: step; }
.app-page .install-steps li::before { content: counter(step); position: absolute; left: 0; top: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--md-sys-color-surface-variant); color: var(--md-sys-color-primary); font-size: 14px; font-weight: 500; }
.app-page .install-steps small { display: block; color: var(--md-sys-color-on-surface-variant); font-size: 13px; }
.app-page .install-steps a { color: var(--md-sys-color-primary); }
.app-page .download-limit { margin: 20px 0 0; padding: 12px 16px; border-left: 3px solid var(--apk-coral); background: color-mix(in srgb, var(--apk-coral) 5%, var(--md-sys-color-surface)); color: var(--md-sys-color-on-surface-variant); font-size: 14px; line-height: 1.5; }
.app-page .download-limit strong { color: var(--md-sys-color-on-surface); font-weight: 500; }
@media (max-width: 600px) {
  .app-page .download-card { padding: 20px 16px; }
  .app-page .download-card h2 { font-size: 20px; }
  .app-page .download-copy { font-size: 15px; }
  .app-page .download-note, .app-page .download-limit { font-size: 13px; }
}

/* Description and tags match the supplied reference, without source links. */
.app-page .description-block { max-width: 720px; margin-top: 28px; }
.app-page .description-block h2 { margin: 0 0 10px; font-size: 22px; line-height: 1.28; font-weight: 500; }
.app-page .description-block p { margin: 0 0 12px; color: var(--md-sys-color-on-surface-variant); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.app-page .description-block p:last-child { margin-bottom: 0; }
.app-page .shots { display: flex; gap: 8px; margin: 0 0 16px; padding-bottom: 8px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.app-page .shots a { flex: none; scroll-snap-align: start; display: block; border-radius: 12px; overflow: hidden; background: var(--md-sys-color-surface-variant); outline-offset: 2px; }
.app-page .shots img { display: block; height: 220px; width: auto; max-width: none; }
@media (max-width: 480px) { .app-page .shots img { height: 180px; } }
.shots-dialog { box-sizing: border-box; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden; }
.shots-dialog[open] { animation: shots-in .15s; }
.shots-dialog::backdrop { background: rgb(0 0 0 / .85); backdrop-filter: blur(2px); }
@keyframes shots-in { from { opacity: 0; } }
.shots-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.shots-track::-webkit-scrollbar { display: none; }
.shots-slide { flex: 0 0 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 24px 24px 56px; scroll-snap-align: center; }
.shots-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 32px rgb(0 0 0 / .5); }
.shots-dialog button { position: absolute; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / .15); color: #fff; font-size: 28px; line-height: 44px; cursor: pointer; }
.shots-dialog button:hover { background: rgb(255 255 255 / .3); }
.shots-close { top: 12px; right: 12px; }
.shots-prev, .shots-next { top: 50%; margin-top: -22px; }
.shots-prev { left: 12px; }
.shots-next { right: 12px; }
.shots-count { position: absolute; left: 0; right: 0; bottom: 16px; margin: 0; text-align: center; color: rgb(255 255 255 / .75); font-size: 14px; }
@media (max-width: 600px) { .shots-prev, .shots-next { display: none; } }
.app-page .app-tags { display: flex; flex-wrap: wrap; gap: 7px; max-width: 720px; margin-top: 10px; }
.app-page .app-tags a { display: inline-flex; box-sizing: border-box; min-height: 44px; padding: 6px 9px; align-items: center; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 6px; color: var(--md-sys-color-on-surface-variant); font-size: 14px; line-height: 1.43; text-decoration: none; }
.app-page .app-tags a:hover { background: var(--md-sys-color-surface-variant); }

.app-page .tags-heading { margin: 24px 0 0; color: var(--md-sys-color-on-surface); font-size: 16px; font-weight: 500; line-height: 1.5; }
.app-page .download-card h2 + form { margin-top: 22px; }

/* 0071 stage 3: one "APK check" card in the style of the download block (no JS; details are <details>). */
.app-page .file-card { max-width: 720px; margin-top: 28px; box-sizing: border-box; background: var(--md-sys-color-surface); border: 1px solid var(--md-sys-color-outline-variant); border-radius: 16px; overflow: hidden; overflow-wrap: anywhere; scroll-margin-top: 24px; }
.app-page .file-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 24px 16px; }
.app-page .file-head h2 { margin: 0; font-size: 22px; line-height: 1.28; font-weight: 500; }
.app-page .file-head p { margin: 4px 0 0; color: var(--md-sys-color-on-surface-variant); font-size: 14px; line-height: 1.5; }
.app-page .file-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 12px; border-radius: 16px; background: var(--md-sys-color-surface-variant); color: var(--md-sys-color-on-surface); font-size: 14px; font-weight: 500; max-width: 100%; box-sizing: border-box; }
.app-page .file-pill i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--md-sys-color-outline); }
.app-page .file-pill[data-state="ok"] i { background: var(--apk-success); }
.app-page .file-pill[data-state="warn"] i { background: var(--apk-coral); }
.app-page .file-rows { border-top: 1px solid var(--md-sys-color-surface-variant); }
.app-page .file-row { display: grid; grid-template-columns: 40px 1fr; gap: 0 16px; align-items: start; padding: 18px 24px; border-top: 1px solid var(--md-sys-color-surface-variant); }
.app-page .file-row:first-child { border-top: 0; }
.app-page .file-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--md-sys-color-surface-variant); color: var(--md-sys-color-on-surface-variant); }
.app-page [data-state="ok"] > .file-icon { background: var(--apk-success-bg); color: var(--apk-success); }
.app-page [data-state="warn"] > .file-icon { background: var(--apk-error-bg); color: var(--apk-coral); }
.app-page .file-row b { display: block; font-size: 16px; font-weight: 500; line-height: 1.5; }
.app-page .file-row p { margin: 2px 0 0; color: var(--md-sys-color-on-surface-variant); font-size: 15px; line-height: 1.5; }
.app-page .file-row a { color: var(--md-sys-color-primary); }
.app-page .file-warning { color: var(--apk-coral); }
.app-page .file-more summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--md-sys-color-primary); font-size: 14px; cursor: pointer; }
.app-page .file-det { margin: 0 0 4px; padding: 14px 16px; background: var(--md-sys-color-background); border-radius: 10px; color: var(--md-sys-color-on-surface-variant); font-size: 14px; line-height: 1.5; }
.app-page .file-det p { margin: 0 0 8px; font-size: 14px; }
.app-page .file-det p:last-child { margin-bottom: 0; }
.app-page .file-card code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; color: var(--md-sys-color-on-surface); }
.app-page .file-digest { display: block; user-select: all; -webkit-user-select: all; padding: 10px 12px; background: var(--md-sys-color-surface); border: 1px solid var(--md-sys-color-outline-variant); border-radius: 8px; font-size: 13px; word-break: break-all; }
.app-page .file-perm { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.app-page .file-perm span { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 6px; background: var(--md-sys-color-surface); border: 1px solid var(--md-sys-color-outline-variant); font-size: 13px; color: var(--md-sys-color-on-surface); }
.app-page .file-perm span.s { border-color: var(--apk-coral); background: var(--apk-error-bg); color: var(--apk-error); }  /* 0108: coral text was 4.2:1 */
.app-page .file-perm-list { margin: 0 0 8px; padding: 0; list-style: none; }
.app-page .file-perm-list li { padding: 3px 0; }
.app-page .file-perm-list code.s { color: var(--apk-coral); }
.app-page .file-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; margin: 0; padding: 20px 24px 8px; border-top: 1px solid var(--md-sys-color-surface-variant); }
.app-page .file-facts dt { color: var(--md-sys-color-on-surface-variant); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.app-page .file-facts dd { margin: 2px 0 0; font-size: 16px; }
.app-page .file-facts .file-fact-wide { grid-column: 1 / -1; }
.app-page .file-sub { color: var(--md-sys-color-on-surface-variant); font-size: 14px; }
.app-page .file-warning .file-sub { color: inherit; }
.app-page .play-line { display: flex; flex-wrap: wrap; gap: 8px 0; align-items: center; margin: 0; padding: 0 24px 20px; font-size: 15px; }
.app-page .play-line > span + span::before { content: "·"; margin: 0 10px; color: var(--md-sys-color-outline); }
.app-page .play-line b { font-weight: 500; }
.app-page .play-line small { color: var(--md-sys-color-on-surface-variant); font-size: 14px; }
.app-page .play-btn { white-space: nowrap; text-decoration: none; }
.app-page .play-btns { display: none; padding: 0 16px 16px; }
.app-page .play-dev { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--md-sys-color-surface-variant); font-size: 15px; }
.app-page .play-dev span { color: var(--md-sys-color-on-surface-variant); }
.app-page .play-dev a { color: var(--md-sys-color-primary); }
/* 0108: stand-alone links get a target of at least 24 px (WCAG 2.5.8). */
.app-page :is(.play-dev, .file-row p) a { display: inline-block; padding-block: 3px; }
.app-page .file-sha { padding: 0 24px 20px; }
.app-page .file-sha p { margin: 12px 0 4px; color: var(--md-sys-color-on-surface-variant); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.app-page .file-sha .file-digest { background: var(--md-sys-color-background); border-color: transparent; padding: 12px 14px; }
.app-page .file-foot { margin: 0; padding: 16px 24px 20px; border-top: 1px solid var(--md-sys-color-surface-variant); color: var(--md-sys-color-on-surface-variant); font-size: 14px; line-height: 1.5; }
.app-page .file-foot strong { color: var(--md-sys-color-on-surface); font-weight: 500; }
@media (max-width: 600px) {
  .app-page .file-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-page .file-row { grid-template-columns: 36px 1fr; padding: 16px; }
  .app-page .file-icon { width: 36px; height: 36px; }
  .app-page .file-head { padding: 20px 16px 12px; }
  .app-page .file-head .play-btn { display: none; }
  .app-page .play-line { padding: 0 16px 16px; }
  .app-page .play-btns { display: flex; }
  .app-page .play-btns .button { flex: 1 1 100%; }
  .app-page .play-dev { padding: 14px 16px; }
  .app-page .file-facts, .app-page .file-sha, .app-page .file-foot { padding-inline: 16px; }
}

/* 0119: the "Versions" block at the bottom of a card (reference: docs/design-reference/0095-versions.html) */
.app-page .ver-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--apk-success-bg); color: var(--apk-success); font-size: 13px; font-weight: 500; }
.app-page .ver-pill.gone { background: var(--md-sys-color-surface-variant); color: var(--md-sys-color-on-surface-variant); }
.app-page .ver-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 18px 24px; border-top: 1px solid var(--md-sys-color-surface-variant); }
.app-page .ver-row.gone { color: var(--md-sys-color-on-surface-variant); }
.app-page .ver-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 17px; font-weight: 500; line-height: 1.4; }
.app-page .ver-name time { font-weight: 400; color: var(--md-sys-color-on-surface-variant); font-size: 14px; }
.app-page .ver-facts { margin: 4px 0 0; color: var(--md-sys-color-on-surface-variant); font-size: 14px; line-height: 1.5; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.app-page .ver-facts .ok { color: var(--apk-success); }
.app-page .ver-facts i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--md-sys-color-outline); margin-right: 6px; vertical-align: 1px; }
.app-page .ver-row.gone .ver-facts i { display: none; }
.app-page .ver-row.gone > :first-child { grid-column: 1 / 3; grid-row: auto; }
.app-page .ver-row.gone .ver-gone-note { grid-column: 1 / 3; grid-row: auto; justify-self: start; }
.app-page .ver-facts .ok i { background: currentColor; }
.app-page .ver-row > :first-child { grid-column: 1; grid-row: 1 / 3; min-width: 0; }
.app-page .ver-row form { grid-column: 2; grid-row: 1 / 3; justify-self: end; margin: 0; }
.app-page .ver-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--md-sys-color-primary); color: var(--md-sys-color-primary); background: var(--md-sys-color-surface); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.app-page .ver-btn.primary { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.app-page .ver-gone-note { grid-column: 2; grid-row: 1 / 3; justify-self: end; color: var(--md-sys-color-on-surface-variant); font-size: 14px; white-space: nowrap; }
.app-page .ver-old { grid-column: 1 / 3; margin: 10px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--apk-error-bg); color: var(--md-sys-color-on-surface); font-size: 14px; line-height: 1.5; }
.app-page .ver-det { grid-column: 1 / 3; margin: 8px 0 0; background: color-mix(in srgb, var(--md-sys-color-surface-variant) 45%, var(--md-sys-color-surface)); border-radius: 10px; color: var(--md-sys-color-on-surface-variant); font-size: 14px; line-height: 1.5; }
.app-page .ver-det summary { cursor: pointer; list-style: none; padding: 12px 16px; color: var(--md-sys-color-primary); font-weight: 500; display: flex; align-items: center; gap: 8px; min-height: 44px; box-sizing: border-box; }
.app-page .ver-det summary::-webkit-details-marker { display: none; }
.app-page .ver-det[open] summary { border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.app-page .ver-det-in { padding: 12px 16px 14px; }
.app-page .ver-det-in p { margin: 0 0 8px; }
.app-page .ver-det-in p:last-child { margin: 0; }
.app-page .ver-chg { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.app-page .ver-chg span { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 6px; background: var(--md-sys-color-surface); border: 1px solid var(--md-sys-color-outline-variant); font-size: 13px; color: var(--md-sys-color-on-surface); overflow-wrap: anywhere; }
.app-page .ver-chg .plus { border-color: var(--apk-coral); background: var(--apk-error-bg); }
.app-page .ver-chg .minus { border-color: var(--apk-success); background: var(--apk-success-bg); }
.app-page .ver-foot a { color: var(--md-sys-color-primary); }
.app-page .ver-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 16px 24px 20px; border-top: 1px solid var(--md-sys-color-surface-variant); color: var(--md-sys-color-on-surface-variant); font-size: 14px; line-height: 1.5; }
@media (max-width: 600px) {
  .app-page .ver-row { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; }
  .app-page .ver-row form { justify-self: stretch; }
  .app-page .ver-btn { width: 100%; justify-content: center; }
  .app-page .ver-name time { width: 100%; }
  .app-page .ver-gone-note { white-space: normal; }
}
