﻿:root {
  color-scheme: dark;
  --brand-purple: #5b21b6;
  --brand-purple-dim: #4c1d95;
  --ink-deep: #0f172a;
  --accent-gold: #facc15;
  --gold-dim: rgba(250, 204, 21, 0.18);
  --cta-red: #ef4444;
  --cta-red-hover: #f87171;
  --bg-from: #14002e;
  --bg-to: #090014;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-elevated: rgba(15, 23, 42, 0.72);
  --line: rgba(250, 204, 21, 0.22);
  --line-purple: rgba(91, 33, 182, 0.55);
  --glow-purple: 0 0 32px rgba(91, 33, 182, 0.45);
  --glow-gold: 0 0 24px rgba(250, 204, 21, 0.25);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --gold-100: rgba(250, 204, 21, 0.14);
  --gold-500: var(--accent-gold);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg-to);
  color: var(--text-primary);
}

html.drawer-open,
html.drawer-open body {
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text-primary);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(91, 33, 182, 0.35), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(239, 68, 68, 0.06), transparent 45%),
    linear-gradient(180deg, var(--bg-from) 0%, var(--bg-to) 100%);
}

body.has-floating-download main {
  padding-bottom: 0;
  transition: padding-bottom 0.25s ease;
}

body.has-floating-download.floating-download-revealed main {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

main {
  overflow-x: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 0, 20, 0.85);
  padding: 10px 14px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--glow-purple);
}

.brand strong,
.brand small {
  display: block;
  overflow-x: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  font-size: 0.98rem;
  color: var(--text-primary);
}

.brand small {
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.top-nav {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  overflow-x: auto;
  font-size: 0.82rem;
  font-weight: 800;
}

.top-nav a {
  border-radius: 8px;
  padding: 8px 9px;
  white-space: nowrap;
  color: var(--text-secondary);
}

.top-nav a:hover {
  background: var(--gold-100);
  color: var(--accent-gold);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-gold);
}

.desktop-nav {
  display: none;
}

.drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(9, 0, 20, 0.72);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(82vw, 320px);
  height: 100%;
  background: linear-gradient(180deg, #1a0a2e 0%, var(--ink-deep) 100%);
  padding: 18px 16px 24px;
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.55);
  border-left: 1px solid var(--line);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.drawer-head strong,
.drawer-head small {
  display: block;
}

.drawer-head small {
  color: var(--accent-gold);
  font-size: 0.76rem;
  font-weight: 700;
}

.drawer-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--glow-purple);
}

.drawer-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.drawer-body {
  display: grid;
  gap: 18px;
  overflow-y: auto;
}

.drawer-block {
  display: grid;
  gap: 10px;
}

.drawer-label {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-nav {
  display: grid;
  gap: 8px;
}

.drawer-nav a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 900;
  background: var(--surface);
  color: var(--text-primary);
}

.drawer-nav-secondary a {
  background: rgba(91, 33, 182, 0.2);
}

.drawer-note {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--gold-100);
  padding: 12px 14px;
}

.drawer-note strong {
  color: var(--accent-gold);
  font-size: 0.82rem;
}

.drawer-note p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.55;
}

.drawer-actions {
  margin-top: auto;
  padding-top: 4px;
}

.drawer-actions .button {
  width: 100%;
}

.section {
  padding: 22px 14px;
}

.wrap {
  margin: 0 auto;
  max-width: 1100px;
}

.hero {
  background:
    radial-gradient(circle at 85% 0%, rgba(250, 204, 21, 0.12), transparent 40%),
    radial-gradient(circle at 10% 30%, rgba(91, 33, 182, 0.35), transparent 45%),
    linear-gradient(180deg, rgba(20, 0, 46, 0.5) 0%, transparent 100%);
}

.hero-copy {
  padding: 18px 0 12px;
}

.eyebrow {
  margin: 0;
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 10px 0 0;
  max-width: 14em;
  font-size: clamp(2.15rem, 10vw, 4.8rem);
  line-height: 0.96;
  text-shadow: 0 0 40px rgba(91, 33, 182, 0.5);
}

.lead {
  margin: 14px 0 0;
  max-width: 42rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.search-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-elevated);
  padding: 14px;
  box-shadow: var(--glow-purple), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.search-panel-hero {
  margin-top: 16px;
}

.search-field {
  display: grid;
  gap: 8px;
}

.search-label {
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.search-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-purple);
  border-radius: 10px;
  background: rgba(9, 0, 20, 0.6);
  padding: 0 14px;
  color: var(--text-primary);
  font: inherit;
}

.search-input::placeholder {
  color: rgba(203, 213, 225, 0.55);
}

.search-input:focus {
  outline: 2px solid rgba(91, 33, 182, 0.5);
  border-color: var(--brand-purple);
}

.search-actions {
  display: flex;
  gap: 8px;
}

.search-status {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 800;
}

.search-results-head {
  margin-top: 12px;
}

.search-query {
  display: inline-flex;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--gold-100);
  padding: 7px 12px;
  color: var(--accent-gold);
  font-size: 0.82rem;
  font-weight: 900;
}

.search-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px 16px;
  text-align: center;
}

.search-empty h3 {
  margin: 0;
  color: var(--text-primary);
}

.search-empty p {
  margin: 8px 0 0;
  color: var(--text-secondary);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px;
}

.stat strong {
  display: block;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.stat span {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
}

.banner-carousel {
  margin-top: 8px;
}

.banner-viewport {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--glow-gold), 0 12px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
}

.banner-track {
  display: flex;
  transition: transform 260ms ease;
  touch-action: pan-y;
  will-change: transform;
}

.banner-track.is-dragging {
  transition: none;
}

.banner {
  position: relative;
  flex: 0 0 100%;
  overflow: hidden;
  border-radius: 12px;
  background: var(--brand-purple-dim);
  color: #fff;
  aspect-ratio: 16 / 9;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.banner-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.28);
  padding: 0;
  cursor: pointer;
}

.banner-dot.is-active {
  width: 24px;
  background: var(--accent-gold);
  box-shadow: var(--glow-gold);
}

.podium {
  margin-top: 18px;
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.podium-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-elevated);
  padding: 12px 10px 12px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(91, 33, 182, 0.35), 0 16px 48px rgba(0, 0, 0, 0.35);
}

.podium-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  color: inherit;
}

.podium-card.place-1 {
  background: linear-gradient(180deg, rgba(91, 33, 182, 0.35) 0%, var(--surface-elevated) 100%);
  border-color: rgba(250, 204, 21, 0.35);
}

.podium-rank {
  display: inline-grid;
  min-width: 42px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--accent-gold);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
  border: 1px solid var(--line);
}

.podium-icon {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--glow-purple);
}

.podium-card h2 {
  margin: 0;
  width: 100%;
  min-height: calc(1.15em * 2);
  font-size: 0.98rem;
  line-height: 1.15;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.podium-bonus {
  margin: 0;
  flex-shrink: 0;
  color: var(--accent-gold);
  font-size: 0.82rem;
  font-weight: 900;
}

.podium-meta {
  display: grid;
  gap: 4px;
  margin-top: auto;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 800;
}

.podium-card .button {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin-top: 8px;
  padding: 5px 6px;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 5px 0 0;
  font-size: 1.55rem;
  line-height: 1.05;
  color: var(--text-primary);
}

.app-grid {
  display: grid;
  gap: 10px;
}

.app-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line-purple);
  border-radius: 12px;
  background: var(--surface-elevated);
  padding: 10px 12px;
  box-shadow: 0 0 0 1px rgba(91, 33, 182, 0.22), 0 8px 24px -12px rgba(0, 0, 0, 0.45);
}

.app-card > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.app-card-primary {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.rank {
  display: grid;
  min-width: 28px;
  height: 28px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(250, 204, 21, 0.25), rgba(250, 204, 21, 0.08));
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 900;
  border: 1px solid var(--line);
  box-shadow: var(--glow-gold);
}

.app-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--glow-purple);
}

.app-icon-lg {
  width: 44px;
  height: 44px;
}

.app-main {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
}

.app-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.app-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 4px;
}

.app-card-cat {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bonus-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.14), rgba(91, 33, 182, 0.15));
  padding: 3px 10px;
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.app-card h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--text-primary);
  min-width: 0;
  flex: 1 1 auto;
}

.app-card h3 a {
  overflow-wrap: break-word;
}

.app-card h3 a:hover {
  color: var(--accent-gold);
}

.bonus-strip {
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.18), rgba(91, 33, 182, 0.2));
  padding: 8px 12px;
  color: var(--accent-gold);
  font-size: 0.84rem;
  font-weight: 900;
}

.app-excerpt {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

.rating {
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-top: 8px;
}

.app-card .meta .pill {
  padding: 3px 8px;
  font-size: 0.68rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 0, 20, 0.5);
  color: var(--text-secondary);
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 800;
}

.pill.gold {
  border-color: rgba(250, 204, 21, 0.45);
  background: var(--gold-100);
  color: var(--accent-gold);
}

.app-card .card-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.app-card .card-actions .button.app-card-btn,
.app-card .card-actions .button.primary {
  width: 6.25rem;
  min-width: 6.25rem;
  max-width: 6.25rem;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 0 6px;
  box-sizing: border-box;
  flex: 0 0 auto;
  font-size: 0.72rem;
  align-items: center;
  justify-content: center;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.card-actions .button {
  flex: 1;
  min-width: 120px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-purple);
  border-radius: 10px;
  background: rgba(91, 33, 182, 0.25);
  padding: 10px 13px;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  border-color: var(--brand-purple);
  box-shadow: var(--glow-purple);
}

.button.primary {
  border-color: rgba(239, 68, 68, 0.6);
  background: linear-gradient(180deg, var(--cta-red-hover) 0%, var(--cta-red) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35);
}

.button.primary:hover {
  filter: brightness(1.05);
}

.button.gold {
  border-color: var(--accent-gold);
  background: linear-gradient(180deg, #fde047, var(--accent-gold));
  color: #422006;
}

.info-band {
  border-block: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.4);
}

.info-grid,
.blog-grid,
.legal-grid {
  display: grid;
  gap: 12px;
}

.soft-panel,
.blog-card,
.legal-card {
  border: 1px solid var(--line-purple);
  border-radius: 14px;
  background: var(--surface-elevated);
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.soft-panel h3,
.blog-card h3,
.legal-card h2 {
  margin: 0;
  color: var(--text-primary);
}

.soft-panel p,
.blog-card p,
.legal-card p,
.prose p,
.prose li {
  color: var(--text-secondary);
  line-height: 1.75;
}

.prose code {
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(91, 33, 182, 0.35);
  font-size: 0.88em;
}

.prose a {
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(91, 33, 182, 0.22) 0%, transparent 100%);
}

.detail-hero {
  display: grid;
  gap: 16px;
}

.detail-icon {
  width: 112px;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: cover;
  box-shadow: var(--glow-purple);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.fact {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px;
}

.fact span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fact strong {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.prose {
  max-width: 760px;
  margin-inline: auto;
}

.compact-prose {
  max-width: 860px;
}

.prose h2 {
  margin-top: 28px;
  color: var(--accent-gold);
}

.faq {
  max-width: 760px;
  margin-inline: auto;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-elevated);
  padding: 14px;
}

.faq details + details {
  margin-top: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--text-primary);
}

.floating-download-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--line);
  background: rgba(9, 0, 20, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(100%);
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease,
    transform 0.28s ease;
}

.floating-download-bar.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.floating-download-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.floating-download-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
  box-shadow: var(--glow-purple);
}

.floating-download-text {
  min-width: 0;
}

.floating-download-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.floating-download-text span {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.floating-download-bar .button.primary {
  flex-shrink: 0;
  min-height: 46px;
  padding-inline: 18px;
}

.scroll-top-fab {
  position: fixed;
  right: 14px;
  left: auto;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 25;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--brand-purple), var(--brand-purple-dim));
  color: var(--accent-gold);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: var(--glow-purple), 0 8px 24px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

.scroll-top-fab.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.scroll-top-fab:hover {
  filter: brightness(1.08);
}

body.has-floating-download .scroll-top-fab.is-visible {
  bottom: calc(88px + env(safe-area-inset-bottom));
}

.cta-mail {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-elevated);
  padding: 20px;
  text-align: center;
}

.cta-mail p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink-deep);
  color: var(--text-secondary);
  padding: 28px 14px calc(28px + env(safe-area-inset-bottom));
}

.site-footer > * {
  margin: 0 auto;
  max-width: 1100px;
}

.footer-brand {
  display: grid;
  gap: 10px;
}

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--glow-purple);
}

.site-footer strong {
  color: var(--text-primary);
}

.site-footer p {
  color: var(--text-secondary);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  font-weight: 800;
}

.site-footer nav a:hover {
  color: var(--accent-gold);
}

.fine-print {
  margin-top: 16px;
  font-size: 0.82rem;
  line-height: 1.65;
}

.contact-modal {
  width: min(92vw, 430px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  color: var(--text-primary);
  background: linear-gradient(180deg, #1a0a2e, var(--ink-deep));
}

.contact-modal::backdrop {
  background: rgba(9, 0, 20, 0.75);
}

.contact-modal h2 {
  margin: 8px 0 0;
  color: var(--text-primary);
}

.contact-modal p {
  color: var(--text-secondary);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
}

@media (min-width: 720px) {
  .site-header {
    padding-inline: 28px;
  }

  .nav-toggle,
  .drawer-shell {
    display: none;
  }

  .desktop-nav {
    display: flex;
  }

  .section {
    padding: 42px 28px;
  }

  .hero-copy {
    padding: 34px 0 24px;
  }

  .search-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .search-panel .search-status {
    grid-column: 1 / -1;
  }

  .podium {
    margin-top: 24px;
  }

  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-grid,
  .blog-grid,
  .legal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-hero {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .scroll-top-fab {
    right: 28px;
  }

  .floating-download-bar {
    padding-inline: 28px;
  }
}


/* site-settings theme overrides */
:root {
  --theme-primary: #5B21B6;
  --theme-primary-light: #5B21B61a;
  --theme-primary-dark: #065a28;
  --theme-accent: #ffc107;
  --theme-accent-hover: #e6a800;
  --theme-surface: #131823;
  --theme-surface-muted: #1a2332;
  --theme-surface-card: #1e293b;
  --theme-text-primary: #e8edf3;
  --theme-text-muted: #8899aa;
  --theme-border: rgba(255, 255, 255, 0.08);
  --brand-primary: #5B21B6;
}

/* CMS extensions */
/* CMS extension modules — shared across migration themes */

.global-top-ad {
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  background: var(--surface, #fff);
}

.global-top-ad__inner {
  padding-block: 8px;
}

.global-top-ad__media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
}

.global-top-ad__link img {
  display: block;
  width: 100%;
  height: auto;
}

.global-top-ad__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  background: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
}

.home-notice-bar {
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  background: var(--gold-100, rgba(250, 204, 21, 0.14));
  padding: 10px 14px;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.floating-image-links {
  position: fixed;
  z-index: 35;
  right: calc(14px + env(safe-area-inset-right, 0px));
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
  pointer-events: none;
}

html.vacant-modal-open .floating-image-links,
html.drawer-open .floating-image-links {
  display: none;
}

.floating-image-links__item {
  display: block;
  width: 48px;
  height: 48px;
  max-width: 48px;
  max-height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface, #fff);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

.floating-image-links__item img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.back-to-top-btn {
  position: fixed;
  z-index: 34;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 44px;
  height: 44px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  background: var(--surface, #fff);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

body.has-download-dock-page .back-to-top-btn {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

.contact-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 16px;
  border: none;
  background: transparent;
  overflow: hidden;
  box-sizing: border-box;
}

.contact-modal:not([open]) {
  display: none;
}

.contact-modal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-modal::backdrop {
  background: rgba(0, 0, 0, 0.56);
}

.contact-modal__panel {
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  padding: 22px;
  padding-top: 48px;
  background: var(--surface, #fff);
  box-sizing: border-box;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.contact-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.contact-modal__actions .button {
  width: 100%;
  box-sizing: border-box;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  z-index: 1;
  margin: 0;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.search-typeahead {
  position: relative;
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  max-height: min(320px, 50dvh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line, var(--color-brand-border, rgba(255, 255, 255, 0.12)));
  border-radius: 8px;
  background-color: var(
    --search-results-bg,
    var(--theme-surface-card, var(--color-brand-panel-elevated, var(--color-brand-card, var(--ink-deep, #fff))))
  );
  color: var(--ink, var(--text-primary, var(--color-brand-text, #132018)));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.search-results__item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line, var(--color-brand-border, rgba(255, 255, 255, 0.12)));
  color: inherit;
  text-decoration: none;
}

.search-results__item:last-child {
  border-bottom: 0;
}

.search-results__item:hover,
.search-results__item:focus {
  background: var(--gold-100, var(--color-brand-accent-muted, rgba(255, 255, 255, 0.08)));
}

.search-results__item strong {
  display: block;
  font-size: 0.92rem;
}

.search-results__meta {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(
    --muted,
    var(--text-secondary, var(--color-brand-text-muted, var(--color-brand-muted, inherit)))
  );
}

.search-results__empty {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.86rem;
  color: var(
    --muted,
    var(--text-secondary, var(--color-brand-text-muted, var(--color-brand-muted, inherit)))
  );
}

.apps-directory {
  display: grid;
  gap: 28px;
}

.apps-directory__tabs {
  display: grid;
  gap: 14px;
}

.apps-directory__tabs-head {
  display: grid;
  gap: 4px;
}

.apps-directory__tabs-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.app-tabs {
  display: grid;
  gap: 16px;
}

.app-tabs__bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.app-tabs__btn {
  flex: 0 0 auto;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--ink, var(--text-primary, #132018));
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.app-tabs__btn.is-active {
  background: var(--brand-primary, var(--green-800, var(--green-700, #086b38)));
  border-color: var(--brand-primary, var(--green-800, var(--green-700, #086b38)));
  color: #fff;
}

.app-tabs__panel {
  display: none;
}

.app-tabs__panel.is-active {
  display: block;
}

.download-dock {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  background: var(--surface-elevated, var(--surface, rgba(9, 0, 20, 0.92)));
  backdrop-filter: blur(12px);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.download-dock__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 14px;
}

.download-dock__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  object-fit: cover;
}

.download-dock__meta {
  flex: 1;
  min-width: 0;
}

.download-dock__name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--ink, var(--text-primary, #132018));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.download-dock__rating {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted, var(--text-secondary, #617068));
}

.download-dock__cta {
  flex-shrink: 0;
  min-height: 42px;
  padding-inline: 16px;
}

body.has-download-dock-page {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

main {
  overflow-x: clip;
}

.page-wrap--narrow {
  max-width: 460px;
}

.prose,
.compact-prose,
.faq {
  margin-inline: auto;
}

.blog-cover {
  display: block;
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 20px;
  border-radius: 8px;
}

/* Shared app-card layout — matches partials/app-card.njk */
.app-card {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto;
}

.app-card > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.app-card .meta {
  grid-column: unset;
  grid-row: unset;
  margin-top: 8px;
}

.app-card .card-actions {
  grid-column: unset;
  grid-row: unset;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-self: stretch;
  justify-content: flex-start;
  align-items: center;
  margin-top: 12px;
}

@media (min-width: 720px) {
  .app-card {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.soft-panel__head {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid var(--color-brand-border, var(--line));
}

.soft-panel__block {
  padding: 12px;
  border-bottom: 1px solid var(--color-brand-border, var(--line));
}

.soft-panel__block:last-child {
  border-bottom: 0;
}

.home-tab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.home-tab-grid__btn {
  border: 1px solid var(--color-brand-border, var(--line));
  border-radius: 8px;
  padding: 10px 8px;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.home-tab-grid__btn.is-active {
  background: var(--color-brand-cta, var(--brand-primary));
  color: #fff;
  border-color: transparent;
}


/* friend links (contract upgrade) */
.footer-friend-links { display: grid; gap: 8px; margin-top: 16px; }
.footer-friend-links__title { margin: 0; opacity: 0.7; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-friend-links a { margin-right: 12px; }

.site-footer nav { display: grid; gap: 8px; margin-top: 16px; }
.footer-column__title { display: block; margin: 0 0 4px; opacity: 0.7; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }
.site-footer nav a { margin-right: 12px; }
