:root {
  color-scheme: dark;
  --page: #0d1420;
  --page-glow: #121d2c;
  --surface: #141f2e;
  --surface-raised: #192638;
  --surface-soft: #1c2b3e;
  --surface-hover: #22344a;
  --text: #edf3fb;
  --text-strong: #f8fbff;
  --muted: #a0afc1;
  --subtle: #75869b;
  --line: rgba(169, 190, 215, .13);
  --line-strong: rgba(169, 190, 215, .22);
  --accent: #79a9ff;
  --accent-strong: #4d86f5;
  --accent-soft: rgba(99, 153, 255, .13);
  --accent-ink: #f7fbff;
  --success: #55d6a0;
  --warning: #e8bc72;
  --danger: #ff7d8e;
  --shadow: 0 18px 52px rgba(0, 0, 0, .26);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 25px;
  --content: 1120px;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f4f7fb;
  --page-glow: #edf3fb;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f2f6fb;
  --surface-hover: #eaf1fa;
  --text: #263449;
  --text-strong: #152238;
  --muted: #617186;
  --subtle: #8593a5;
  --line: rgba(37, 59, 88, .10);
  --line-strong: rgba(37, 59, 88, .18);
  --accent: #2867d9;
  --accent-strong: #1d57c5;
  --accent-soft: rgba(40, 103, 217, .09);
  --accent-ink: #ffffff;
  --success: #14865c;
  --warning: #946116;
  --danger: #bd4053;
  --shadow: 0 18px 50px rgba(37, 59, 88, .10);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse at 50% -18%, var(--page-glow), transparent 50%), var(--page); color: var(--text); }
body, button, input, select { font-family: "DM Sans", system-ui, sans-serif; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 72%, transparent); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; padding: 12px 16px; border-radius: 10px; background: var(--accent-strong); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.topbar { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--page) 88%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); padding-top: env(safe-area-inset-top); }
.topbar-inner { width: min(var(--content), calc(100% - 56px)); min-height: 74px; margin: 0 auto; display: flex; align-items: center; gap: 42px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 10px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; overflow: hidden; background: linear-gradient(145deg, #8bb9ff, #536fe7); box-shadow: 0 5px 16px rgba(75, 119, 229, .24); }
.brand-mark img { display: block; width: 27px; height: 27px; }
.brand-name { font: 800 19px/1 "Manrope", "DM Sans", sans-serif; letter-spacing: -.7px; color: var(--text-strong); white-space: nowrap; }
.brand-name span { color: var(--accent); }
.top-nav { display: flex; align-items: center; gap: 8px; height: 74px; }
.nav-link { position: relative; display: inline-flex; align-items: center; height: 100%; padding: 0 14px; color: var(--muted); font-size: 13px; font-weight: 700; transition: color .18s ease; }
.nav-link:hover, .nav-link.active { color: var(--text-strong); }
.nav-link.active::after { position: absolute; content: ""; height: 2px; bottom: 0; left: 14px; right: 14px; border-radius: 2px 2px 0 0; background: var(--accent); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-button { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted); cursor: pointer; transition: .18s ease; }
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-hover); color: var(--text-strong); }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.moon-icon { display: none; }
:root[data-theme="light"] .sun-icon { display: none; }
:root[data-theme="light"] .moon-icon { display: block; }
#account-area { display: flex; align-items: center; }
.button { min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 0 17px; border: 1px solid transparent; border-radius: 12px; font-size: 13px; font-weight: 800; line-height: 1; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.button-small { min-height: 40px; padding-inline: 14px; border-radius: 11px; }
.button-google { border-color: var(--line-strong); background: var(--surface); color: var(--text-strong); }
.button-google:hover { background: var(--surface-hover); border-color: var(--line-strong); }
.button-google svg { width: 17px; height: 17px; flex: 0 0 auto; }
.account-menu { display: flex; align-items: center; gap: 9px; min-width: 0; }
.account-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface-soft); }
.account-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 700; }
.button-quiet { border-color: var(--line); background: transparent; color: var(--muted); }
.button-quiet:hover { background: var(--surface-hover); color: var(--text-strong); }

.main-content { width: min(var(--content), calc(100% - 56px)); margin: 0 auto; flex: 1 0 auto; }
.hero { position: relative; isolation: isolate; min-height: 260px; margin: 28px 0 34px; padding: 42px 50px; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(115deg, var(--surface) 0%, var(--surface) 56%, color-mix(in srgb, var(--accent) 10%, var(--surface)) 100%); }
.hero::before { position: absolute; z-index: -1; content: ""; width: 370px; height: 370px; right: 13%; top: -245px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 17%, transparent); box-shadow: 0 0 0 42px color-mix(in srgb, var(--accent) 3%, transparent), 0 0 0 86px color-mix(in srgb, var(--accent) 2%, transparent); }
.hero-copy { position: relative; z-index: 2; max-width: 620px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 1.45px; text-transform: uppercase; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 13%, transparent); }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { margin: 16px 0 12px; color: var(--text-strong); font: 800 clamp(34px, 4.4vw, 52px)/1.08 "Manrope", "DM Sans", sans-serif; letter-spacing: -2px; }
.hero h1 span { color: var(--accent); }
.hero-description { max-width: 490px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.hero-highlights { display: flex; flex-wrap: wrap; gap: 17px; margin-top: 24px; color: var(--muted); font-size: 11px; font-weight: 700; }
.hero-highlights span { display: inline-flex; align-items: center; gap: 7px; }
.highlight-check { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success); font-size: 10px; font-style: normal; }
.hero-side { position: relative; width: 252px; height: 190px; flex: 0 0 252px; margin-right: 14px; }
.hero-orbit { position: absolute; inset: 2px 10px; border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 50%; transform: rotate(-24deg); }
.orbit-b { inset: 25px -7px; transform: rotate(25deg); border-color: color-mix(in srgb, #a18bff 20%, transparent); }
.hero-center-icon { position: absolute; top: 49px; left: 89px; width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 24px; background: linear-gradient(145deg, #8bb9ff, #536fe7); box-shadow: 0 17px 38px rgba(63, 106, 211, .28); transform: rotate(-7deg); }
.hero-center-icon img { width: 53px; height: 53px; }
.hero-app-card { position: absolute; z-index: 2; width: 115px; height: 51px; display: grid; grid-template-columns: 32px 1fr; grid-template-rows: 22px 13px; align-items: center; column-gap: 8px; padding: 7px; border: 1px solid var(--line-strong); border-radius: 13px; background: color-mix(in srgb, var(--surface-raised) 93%, transparent); box-shadow: var(--shadow); }
.hero-app-card b { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--text-strong); font-size: 10px; }
.hero-mini-icon { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: white; font: 800 14px "Manrope", sans-serif; }
.mini-blue { background: linear-gradient(145deg, #54a3ff, #3262cb); }
.mini-violet { background: linear-gradient(145deg, #b18aff, #7350d8); }
.hero-mini-lines { display: none; }
.hero-app-one { top: 15px; left: 1px; transform: rotate(-8deg); }
.hero-app-two { right: -8px; bottom: 11px; transform: rotate(7deg); }

.catalog-section { padding-bottom: 30px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-eyebrow { font-size: 9px; letter-spacing: 1.4px; }
.section-heading h2 { margin: 8px 0 5px; color: var(--text-strong); font: 800 26px/1.2 "Manrope", "DM Sans", sans-serif; letter-spacing: -.85px; }
.section-subtitle { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.catalog-count { display: inline-flex; align-items: baseline; gap: 7px; flex: 0 0 auto; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 11px; }
.catalog-count strong { color: var(--text-strong); font: 800 17px "Manrope", sans-serif; }
.search-panel { display: flex; align-items: center; gap: 10px; }
.search-box { width: 100%; min-width: 0; min-height: 58px; display: flex; align-items: center; gap: 13px; padding: 0 17px; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--surface); box-shadow: 0 4px 16px rgba(0, 0, 0, .04); transition: border-color .18s ease, box-shadow .18s ease; }
.search-box:focus-within { border-color: color-mix(in srgb, var(--accent) 65%, var(--line)); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-box > svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: var(--subtle); stroke-width: 1.8; stroke-linecap: round; }
.search-box input { width: 100%; min-width: 0; height: 54px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text-strong); font-size: 14px; }
.search-box input::placeholder { color: var(--subtle); opacity: 1; }
.search-box input:focus-visible { outline: 0; }
.search-box kbd { flex: 0 0 auto; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); color: var(--subtle); font: 600 10px "DM Sans", sans-serif; white-space: nowrap; }
.clear-search { min-height: 44px; }
.browse-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: 22px; }
.category-area { flex: 1 1 auto; min-width: 0; }
.toolbar-label { margin-bottom: 10px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .75px; text-transform: uppercase; }
.category-list { display: flex; align-items: center; gap: 8px; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; padding: 1px 1px 6px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.category-chip { min-height: 36px; flex: 0 0 auto; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: .17s ease; }
.category-chip:hover { background: var(--surface-hover); color: var(--text-strong); }
.category-chip.selected { border-color: color-mix(in srgb, var(--accent) 48%, transparent); background: var(--accent-soft); color: var(--accent); }
.sort-control { position: relative; display: flex; align-items: center; gap: 9px; flex: 0 0 auto; min-height: 38px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 700; }
.sort-control select { max-width: 145px; min-height: 36px; padding: 0 20px 0 0; appearance: none; border: 0; outline: 0; background: transparent; color: var(--text-strong); font-size: 11px; font-weight: 700; cursor: pointer; }
.sort-control select option { background: var(--surface); color: var(--text); }
.sort-control > svg { position: absolute; right: 9px; width: 13px; height: 13px; pointer-events: none; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 1px 10px; }
.list-heading > div { min-width: 0; display: flex; align-items: baseline; gap: 11px; flex-wrap: wrap; }
.list-heading-title { color: var(--text-strong); font-size: 13px; font-weight: 800; }
.list-heading-subtitle { color: var(--subtle); font-size: 11px; }
.list-heading-type { color: var(--subtle); font-size: 9px; font-weight: 800; letter-spacing: 1px; white-space: nowrap; }
.list-heading-type span { color: var(--accent); padding: 0 3px; }
.app-list { display: flex; flex-direction: column; gap: 9px; }
.app-row { min-width: 0; min-height: 112px; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 17px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.app-row:hover { border-color: var(--line-strong); background: var(--surface-raised); }
.app-icon { width: 62px; height: 62px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); color: var(--accent); font: 800 25px "Manrope", sans-serif; }
.app-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.app-icon.icon-fallback { background: linear-gradient(145deg, var(--accent-soft), var(--surface-soft)); }
.app-info { min-width: 0; align-self: center; }
.app-title-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.app-title-line h3 { min-width: 0; overflow: hidden; margin: 0; color: var(--text-strong); font: 800 14px/1.35 "Manrope", "DM Sans", sans-serif; letter-spacing: -.25px; text-overflow: ellipsis; white-space: nowrap; }
.app-description { display: -webkit-box; overflow: hidden; margin: 5px 0 8px; color: var(--muted); font-size: 11px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.app-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--subtle); font-size: 9px; font-weight: 600; }
.app-meta span { position: relative; }
.app-meta span + span::before { position: absolute; top: 50%; left: -7px; width: 3px; height: 3px; content: ""; border-radius: 50%; background: var(--subtle); transform: translateY(-50%); }
.app-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: 0 0 auto; }
.details-link { min-height: 42px; padding: 0 9px; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.details-link:hover { color: var(--accent); }
.button-download { min-width: 112px; min-height: 52px; justify-content: space-between; gap: 8px; padding: 6px 11px; border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: var(--accent-soft); color: var(--accent); text-align: left; }
.button-download:not(:disabled):hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 19%, var(--surface)); box-shadow: 0 5px 17px color-mix(in srgb, var(--accent) 12%, transparent); }
.download-button-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.download-button-copy strong { font-size: 11px; font-weight: 800; white-space: nowrap; }
.download-button-copy small { color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.download-arrow { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; background: color-mix(in srgb, var(--accent) 13%, transparent); font-size: 17px; font-weight: 700; }
.loading-row { min-height: 100px; display: flex; align-items: center; justify-content: center; gap: 11px; border: 1px dashed var(--line-strong); border-radius: 15px; color: var(--muted); font-size: 12px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { padding: 44px 20px; border: 1px dashed var(--line-strong); border-radius: 17px; background: var(--surface); text-align: center; }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 17px; background: var(--accent-soft); color: var(--accent); }
.empty-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.empty-state h3 { margin: 0 0 7px; color: var(--text-strong); font: 800 18px "Manrope", sans-serif; }
.empty-state p { max-width: 370px; margin: 0 auto 17px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.button-secondary { border-color: var(--line-strong); background: var(--surface-raised); color: var(--text-strong); }
.button-secondary:hover { background: var(--surface-hover); }
.button-primary { background: var(--accent-strong); color: white; box-shadow: 0 7px 18px color-mix(in srgb, var(--accent-strong) 25%, transparent); }
.button-primary:hover { filter: brightness(1.08); }
.trust-strip { display: flex; align-items: center; gap: 13px; margin: 10px 0 36px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--surface) 76%, transparent); }
.trust-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: color-mix(in srgb, var(--success) 11%, transparent); color: var(--success); }
.trust-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.trust-strip > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.trust-strip strong { color: var(--text-strong); font-size: 11px; }
.trust-strip span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.back-to-top { margin-left: auto; flex: 0 0 auto; color: var(--accent); font-size: 11px; font-weight: 800; }
.back-to-top span { margin-left: 4px; font-size: 15px; }
.footer { width: min(var(--content), calc(100% - 56px)); min-height: 72px; display: flex; align-items: center; gap: 16px; margin: auto auto 0; padding: 15px 0 calc(15px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer-brand .brand-mark { width: 28px; height: 28px; border-radius: 9px; }
.footer-brand .brand-mark img { width: 20px; height: 20px; }
.footer-brand .brand-name { font-size: 14px; }
.footer p { margin: 0; color: var(--subtle); font-size: 10px; }
.footer-copy { margin-left: auto; color: var(--subtle); font-size: 10px; }
.mobile-bottom-nav { display: none; }

/* App details, sign-in and download dialogs */
dialog { color: var(--text); }
dialog::backdrop { background: rgba(4, 9, 16, .70); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.app-dialog, .login-dialog, .download-dialog { position: fixed; width: min(620px, calc(100% - 32px)); max-width: none; max-height: min(84dvh, 820px); overflow: auto; overscroll-behavior: contain; margin: auto; padding: 30px; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.dialog-close { position: sticky; z-index: 3; float: right; top: 0; width: 36px; height: 36px; display: grid; place-items: center; margin: -12px -12px 5px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); color: var(--muted); font-size: 23px; line-height: 1; cursor: pointer; }
.dialog-close:hover { background: var(--surface-hover); color: var(--text-strong); }
.detail-header { display: flex; align-items: center; gap: 17px; margin: 4px 0 25px; }
.app-icon-large { width: 76px; height: 76px; border-radius: 20px; font-size: 30px; }
.detail-heading { min-width: 0; }
.detail-category { display: inline-block; margin-bottom: 6px; color: var(--accent); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
.detail-heading h2 { margin: 0 0 4px; color: var(--text-strong); font: 800 22px "Manrope", sans-serif; overflow-wrap: anywhere; }
.detail-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.detail-section { margin: 20px 0; }
.detail-section h3 { margin: 0 0 9px; color: var(--text-strong); font: 800 13px "Manrope", sans-serif; }
.detail-section p, .detail-section li { color: var(--muted); font-size: 12px; line-height: 1.7; }
.detail-section ul { padding-left: 19px; }
.detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.detail-fact { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.detail-fact span { color: var(--subtle); font-size: 9px; }
.detail-fact strong { color: var(--text-strong); font-size: 11px; overflow-wrap: anywhere; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.detail-tags span { padding: 6px 9px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 700; }
.screenshot-strip { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 5px; }
.screenshot-strip img { height: 210px; width: auto; max-width: 46%; border: 1px solid var(--line); border-radius: 12px; object-fit: cover; }
.detail-footer { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--line); }
.detail-footer p { flex: 1; margin: 0; color: var(--subtle); font-size: 10px; line-height: 1.5; }
.detail-download { flex: 0 0 auto; }
.login-dialog, .download-dialog { width: min(430px, calc(100% - 32px)); padding: 32px; text-align: center; }
.login-emblem, .download-emblem { width: 58px; height: 58px; display: grid; place-items: center; margin: 5px auto 17px; border-radius: 19px; background: linear-gradient(145deg, #8bb9ff, #536fe7); box-shadow: 0 10px 26px rgba(63, 106, 211, .24); }
.login-emblem img { width: 42px; height: 42px; }
.login-dialog .eyebrow, .download-dialog .eyebrow { justify-content: center; }
.login-dialog h2, .download-dialog h2 { margin: 10px 0 9px; color: var(--text-strong); font: 800 22px/1.2 "Manrope", sans-serif; letter-spacing: -.5px; }
.login-description { margin: 0 auto 19px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.google-signin-button { min-height: 45px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.google-signin-button iframe { max-width: 100%; }
.login-message { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.login-message[data-type="error"] { color: var(--danger); }
.login-message[data-type="warning"] { color: var(--warning); }
.privacy-note { margin: 16px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 9px; line-height: 1.6; }
.download-emblem { color: white; }
.download-emblem svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.download-file-name { margin: 0 0 20px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), #81b5ff); transition: width .15s linear; }
.progress-fill.indeterminate { width: 35%; animation: progress-flow 1.2s ease-in-out infinite alternate; }
@keyframes progress-flow { from { transform: translateX(0); } to { transform: translateX(180%); } }
.progress-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.progress-meta strong { color: var(--accent); font: 800 13px "Manrope", sans-serif; }
.progress-meta span { color: var(--muted); font-size: 10px; }
.download-status { min-height: 35px; margin: 15px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.download-status[data-state="success"] { color: var(--success); }
.download-status[data-state="error"] { color: var(--danger); }
.download-status[data-state="warning"] { color: var(--warning); }
.download-actions { display: flex; justify-content: center; gap: 9px; }
.toast-region { position: fixed; z-index: 100; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast { max-width: min(380px, calc(100vw - 32px)); padding: 12px 15px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(8px); transition: .2s ease; }
.toast-visible { opacity: 1; transform: translateY(0); }
.toast-success { border-color: color-mix(in srgb, var(--success) 40%, var(--line)); }
.toast-error { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.noscript-message { position: fixed; z-index: 200; inset: 0 0 auto; padding: 14px; background: var(--danger); color: white; text-align: center; font-size: 13px; }

/* Tablet and compact laptop */
@media (max-width: 900px) {
  .topbar-inner, .main-content, .footer { width: min(100% - 40px, 760px); }
  .topbar-inner { min-height: 68px; gap: 24px; }
  .hero { min-height: 235px; padding: 34px 34px; }
  .hero-side { transform: scale(.88); transform-origin: right center; margin-right: -7px; }
  .hero-highlights { gap: 11px; }
  .app-row { gap: 13px; }
}

/* Mobile portrait: keep the app name/details in the centre and the APK size + download action on the right. */
@media (max-width: 680px) and (orientation: portrait) {
  html { scroll-padding-top: 66px; }
  .topbar-inner, .main-content, .footer { width: calc(100% - 28px); }
  .topbar-inner { min-height: 60px; gap: 12px; }
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .brand-mark img { width: 24px; height: 24px; }
  .brand-name { font-size: 17px; }
  .top-nav { display: none; }
  .header-actions { gap: 7px; }
  .icon-button { width: 39px; height: 39px; border-radius: 12px; }
  .button-small { min-height: 38px; padding-inline: 11px; font-size: 11px; }
  .button-google svg { width: 15px; height: 15px; }
  .account-menu { gap: 6px; }
  .account-avatar { width: 31px; height: 31px; }
  .account-name { display: none; }
  .account-menu .button { min-height: 36px; padding-inline: 9px; font-size: 10px; }
  .hero { min-height: 0; margin: 14px 0 25px; padding: 26px 21px 23px; border-radius: 20px; }
  .hero-copy { max-width: 100%; }
  .hero .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .hero h1 { margin: 12px 0 8px; font-size: clamp(31px, 8vw, 40px); letter-spacing: -1.45px; }
  .desktop-break { display: none; }
  .hero-description { max-width: 440px; font-size: 12px; line-height: 1.6; }
  .hero-highlights { gap: 8px 13px; margin-top: 16px; font-size: 9px; }
  .highlight-check { width: 15px; height: 15px; font-size: 9px; }
  .hero-side { display: none; }
  .section-heading { align-items: center; gap: 8px; margin-bottom: 15px; }
  .section-heading h2 { margin: 6px 0 3px; font-size: 21px; letter-spacing: -.65px; }
  .section-subtitle { font-size: 11px; }
  .section-eyebrow { font-size: 8px; }
  .catalog-count { flex-direction: column; align-items: center; gap: 1px; padding: 7px 10px; border-radius: 10px; font-size: 8px; white-space: nowrap; }
  .catalog-count strong { font-size: 16px; }
  .search-box { min-height: 51px; gap: 10px; padding: 0 13px; border-radius: 13px; }
  .search-box > svg { width: 18px; height: 18px; }
  .search-box input { height: 49px; font-size: 12px; }
  .search-box kbd { display: none; }
  .clear-search { min-height: 40px; padding-inline: 10px; font-size: 11px; }
  .browse-toolbar { display: block; margin-top: 17px; }
  .toolbar-label { margin-bottom: 8px; font-size: 9px; }
  .category-list { gap: 7px; margin-right: -14px; padding-right: 14px; scroll-snap-type: x proximity; }
  .category-chip { min-height: 34px; padding-inline: 12px; border-radius: 9px; font-size: 10px; scroll-snap-align: start; }
  .sort-control { width: 100%; min-height: 39px; justify-content: space-between; margin-top: 8px; padding-left: 11px; }
  .sort-control select { max-width: none; flex: 1; text-align: right; }
  .sort-control > svg { right: 10px; }
  .list-heading { margin: 19px 1px 9px; }
  .list-heading > div { display: block; }
  .list-heading-title { display: block; font-size: 12px; }
  .list-heading-subtitle { display: block; margin-top: 2px; font-size: 9px; }
  .list-heading-type { font-size: 8px; }
  .app-list { gap: 8px; }
  .app-row { min-height: 101px; grid-template-columns: 52px minmax(0, 1fr) 88px; gap: 10px; padding: 11px; border-radius: 14px; }
  .app-icon { width: 52px; height: 52px; border-radius: 14px; font-size: 21px; }
  .app-title-line { gap: 5px; }
  .app-title-line h3 { font-size: 12px; }
  
  .app-description { margin: 4px 0 6px; font-size: 9px; line-height: 1.4; -webkit-line-clamp: 2; }
  .app-meta { gap: 4px 9px; font-size: 8px; line-height: 1.3; }
  .app-meta span:nth-child(3) { display: none; }
  .app-actions { flex-direction: column-reverse; align-items: stretch; gap: 1px; }
  .details-link { min-height: 27px; padding: 0; font-size: 9px; }
  .button-download { width: 88px; min-width: 0; min-height: 47px; gap: 4px; padding: 5px 6px; border-radius: 10px; }
  .download-button-copy { gap: 3px; }
  .download-button-copy strong { font-size: 9px; }
  .download-button-copy small { font-size: 8px; }
  .download-arrow { width: 20px; height: 20px; border-radius: 6px; font-size: 13px; }
  .trust-strip { gap: 9px; margin: 5px 0 24px; padding: 12px; border-radius: 13px; }
  .trust-icon { width: 32px; height: 32px; border-radius: 10px; }
  .trust-icon svg { width: 17px; height: 17px; }
  .trust-strip strong { font-size: 10px; }
  .trust-strip span { font-size: 9px; }
  .back-to-top { display: none; }
  .footer { min-height: 58px; gap: 9px; padding: 11px 0 74px; }
  .footer-brand .brand-mark { width: 25px; height: 25px; }
  .footer-brand .brand-mark img { width: 18px; height: 18px; }
  .footer-brand .brand-name { font-size: 12px; }
  .footer p { display: none; }
  .footer-copy { font-size: 9px; }
  .mobile-bottom-nav { position: fixed; z-index: 29; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px 22px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  .mobile-nav-item { min-height: 43px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; color: var(--muted); font-size: 10px; font-weight: 800; }
  .mobile-nav-item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-nav-item.active { background: var(--accent-soft); color: var(--accent); }
  .app-dialog, .login-dialog, .download-dialog { width: 100%; max-width: none; max-height: min(88dvh, 760px); margin: auto 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; border-bottom: 0; }
  .app-dialog { max-height: 90dvh; }
  .login-dialog, .download-dialog { text-align: center; }
  .detail-header { gap: 12px; margin-top: 2px; }
  .app-icon-large { width: 64px; height: 64px; border-radius: 17px; }
  .detail-heading h2 { font-size: 19px; }
  .detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-footer { align-items: stretch; flex-direction: column; }
  .detail-download { width: 100%; }
  .screenshot-strip img { height: 175px; }
  .toast-region { right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); left: 12px; align-items: stretch; }
  .toast { max-width: none; }
}

/* Very narrow devices: retain a usable right-hand size/download column. */
@media (max-width: 370px) and (orientation: portrait) {
  .topbar-inner, .main-content, .footer { width: calc(100% - 22px); }
  .hero { padding-inline: 16px; }
  .hero h1 { font-size: 30px; }
  .hero-highlights { gap: 7px 10px; font-size: 8px; }
  .app-row { grid-template-columns: 46px minmax(0, 1fr) 80px; gap: 8px; padding: 9px; }
  .app-icon { width: 46px; height: 46px; border-radius: 12px; }
  .button-download { width: 80px; padding-inline: 5px; }
  .download-arrow { width: 18px; height: 18px; }
  .app-meta { font-size: 7px; }
  .brand-name { font-size: 15px; }
}

/* Mobile landscape and short-height viewports: compact the masthead and hero so the catalogue stays immediately visible. */
@media (max-height: 560px) and (orientation: landscape) {
  html { scroll-padding-top: 52px; }
  .topbar-inner { width: calc(100% - 36px); min-height: 49px; gap: 20px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .brand-mark img { width: 21px; height: 21px; }
  .brand-name { font-size: 15px; }
  .top-nav { height: 49px; }
  .nav-link { padding-inline: 10px; font-size: 11px; }
  .nav-link.active::after { left: 10px; right: 10px; }
  .icon-button { width: 34px; height: 34px; }
  .button-small { min-height: 34px; }
  .main-content, .footer { width: calc(100% - 36px); max-width: 980px; }
  .hero { min-height: 0; margin: 10px 0 17px; padding: 17px 22px; border-radius: 15px; }
  .hero .eyebrow { font-size: 8px; }
  .hero h1 { margin: 7px 0 5px; font-size: 28px; letter-spacing: -1px; }
  .hero-description { max-width: 620px; font-size: 10px; }
  .hero-highlights { gap: 11px; margin-top: 9px; font-size: 8px; }
  .highlight-check { width: 13px; height: 13px; font-size: 8px; }
  .hero-side { display: none; }
  .section-heading { margin-bottom: 10px; }
  .section-heading h2 { margin: 4px 0 2px; font-size: 19px; }
  .section-subtitle { font-size: 10px; }
  .search-box { min-height: 43px; border-radius: 11px; }
  .search-box input { height: 41px; font-size: 12px; }
  .browse-toolbar { margin-top: 11px; }
  .toolbar-label { margin-bottom: 5px; font-size: 8px; }
  .category-chip { min-height: 30px; font-size: 9px; }
  .sort-control { min-height: 33px; }
  .sort-control select { min-height: 31px; }
  .list-heading { margin: 12px 1px 6px; }
  .app-list { gap: 6px; }
  .app-row { min-height: 78px; grid-template-columns: 44px minmax(0, 1fr) 94px; gap: 10px; padding: 7px 10px; border-radius: 11px; }
  .app-icon { width: 44px; height: 44px; border-radius: 11px; font-size: 18px; }
  .app-title-line h3 { font-size: 11px; }
  .app-description { margin: 3px 0 4px; font-size: 8px; -webkit-line-clamp: 1; }
  .app-meta { gap: 8px; font-size: 7px; }
  .app-meta span:nth-child(3) { display: none; }
  .app-actions { flex-direction: row; gap: 3px; align-items: center; }
  .details-link { min-height: 34px; padding: 0 4px; font-size: 8px; }
  .button-download { width: 76px; min-width: 76px; min-height: 39px; padding: 4px 5px; border-radius: 8px; }
  .download-button-copy strong { font-size: 8px; }
  .download-button-copy small { font-size: 7px; }
  .download-arrow { width: 17px; height: 17px; font-size: 11px; }
  .trust-strip { margin: 10px 0 15px; padding: 9px; }
  .footer { min-height: 42px; padding-block: 7px; }
  .mobile-bottom-nav { display: none !important; }
  .app-dialog, .login-dialog, .download-dialog { width: min(520px, calc(100% - 28px)); max-height: 88dvh; margin: auto; padding: 20px; border-radius: 18px; }
}

/* Wider landscape phones and small tablets still use touch-sized controls. */
@media (min-width: 681px) and (max-width: 980px) and (orientation: landscape) {
  .hero { min-height: 205px; padding: 25px 30px; }
  .hero-side { transform: scale(.75); transform-origin: right center; margin-right: -25px; }
  .app-row { min-height: 94px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
