﻿: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;
}

body.has-floating-download.floating-download-revealed main {
  padding-bottom: 0;
}

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 {
  width: 100%;
  margin-top: 8px;
  flex-shrink: 0;
}

.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;
  }
}

/* Brand reset: all-3patti-bonus.com */
:root {
  color-scheme: light;
  --brand-purple: #e53935;
  --brand-purple-dim: #c62828;
  --ink-deep: #2b1d1a;
  --accent-gold: #f4b400;
  --gold-dim: rgba(244, 180, 0, 0.16);
  --cta-red: #e53935;
  --cta-red-hover: #c62828;
  --bg-from: #fff8f4;
  --bg-to: #fff3d6;
  --text-primary: #2b1d1a;
  --text-secondary: #5f4a45;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --line: #ffd7c9;
  --line-purple: #ffd7c9;
  --glow-purple: 0 10px 24px rgba(229, 57, 53, 0.12);
  --glow-gold: 0 10px 24px rgba(244, 180, 0, 0.16);
  --gold-100: rgba(255, 243, 214, 0.9);
  --gold-500: var(--accent-gold);
  --search-results-bg: #fff;
  --theme-surface-card: #ffffff;
}

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

body {
  color: var(--text-primary);
  background:
    radial-gradient(circle at top right, rgba(244, 180, 0, 0.2), transparent 28%),
    radial-gradient(circle at top left, rgba(229, 57, 53, 0.12), transparent 30%),
    linear-gradient(180deg, #fffefc 0%, var(--bg-from) 28%, var(--bg-to) 100%);
}

body.has-floating-download.floating-download-revealed main {
  padding-bottom: 0;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 248, 244, 0.94);
  box-shadow: 0 10px 30px rgba(90, 55, 48, 0.08);
}

.brand-logo,
.drawer-logo,
.footer-logo {
  border-radius: 8px;
  box-shadow: none;
}

.brand strong,
.drawer-head strong,
.site-footer strong,
.contact-modal h2,
.hero h1,
.page-hero h1,
.section h2,
.section h3,
.podium-card h3,
.blog-card h2,
.blog-card h3,
.app-main h3 a {
  color: var(--text-primary);
}

.brand small,
.drawer-head small,
.eyebrow,
.fact span,
.search-label {
  color: var(--cta-red);
}

.top-nav a,
.site-footer,
.site-footer p,
.site-footer nav a,
.prose p,
.prose li,
.soft-panel p,
.blog-card p,
.legal-card p,
.floating-download-text span,
.cta-mail p,
.app-card-copy,
.app-card-cat,
.section-copy,
.lead {
  color: var(--text-secondary);
}

.top-nav a:hover,
.site-footer nav a:hover,
.prose a {
  color: var(--cta-red);
}

.nav-toggle,
.drawer-close,
.modal-close {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.nav-toggle span {
  background: var(--cta-red);
}

.drawer-backdrop {
  background: rgba(43, 29, 26, 0.34);
}

.drawer-panel,
.contact-modal,
.floating-download-bar,
.site-footer {
  background: #fffaf7;
}

.drawer-panel,
.contact-modal {
  border-left-color: var(--line);
  box-shadow: -12px 0 30px rgba(90, 55, 48, 0.12);
}

.button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  box-shadow: none;
}

.button:hover {
  border-color: #f0b6a7;
  box-shadow: 0 8px 18px rgba(90, 55, 48, 0.08);
}

.button.primary {
  border-color: #cf3b38;
  background: linear-gradient(180deg, #ef5350 0%, var(--cta-red) 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(229, 57, 53, 0.2);
}

.button.gold {
  border-color: #f0cb4c;
  background: linear-gradient(180deg, #ffd86a 0%, var(--accent-gold) 100%);
  color: #5b3c00;
}

.hero,
.page-hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 243, 214, 0.45) 0%, rgba(255, 248, 244, 0) 100%);
}

.home-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
}

.hero-copy-premium {
  padding-top: 12px;
}

.hero-copy-premium h1,
.page-hero h1,
.simple-hero h1 {
  margin: 0;
  max-width: none;
  text-shadow: none;
  overflow-wrap: normal;
  word-break: normal;
  font-size: clamp(2rem, 8vw, 3.6rem);
  line-height: 1.02;
}

.hero-copy-premium .lead,
.page-hero .lead {
  max-width: 64ch;
}

.search-panel,
.cta-mail,
.soft-panel,
.blog-card,
.legal-card,
.fact,
.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(90, 55, 48, 0.06);
}

.search-panel-premium {
  background: linear-gradient(180deg, #fffdf8 0%, #fff7ef 100%);
}

.search-input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
}

.search-input::placeholder {
  color: #8a6f69;
}

.banner {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 32px rgba(90, 55, 48, 0.08);
}

.banner-dot {
  background: #f8d6c8;
}

.banner-dot.is-active {
  background: var(--cta-red);
}

.section-head {
  align-items: end;
}

.section-copy {
  margin: 0;
  max-width: 48ch;
  font-size: 0.95rem;
}

.podium-card,
.app-card-ranking {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 243, 214, 0.95) 0%, rgba(255, 255, 255, 1) 36%),
    #fff;
  box-shadow: 0 14px 34px rgba(90, 55, 48, 0.08);
}

.podium-card {
  padding: 16px;
}

.podium-rank,
.rank-chip {
  display: inline-flex;
  min-width: 46px;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  background: var(--cta-red);
  color: #fff;
  padding: 6px 12px;
  font-weight: 900;
}

.podium-icon,
.app-icon-xl,
.detail-icon,
.floating-download-icon {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.podium-bonus,
.app-card-highlight strong {
  color: var(--cta-red);
  font-weight: 900;
}

.podium-meta span,
.rating {
  color: #8f5e00;
  font-weight: 800;
}

.podium-grid {
  gap: 10px;
}

@media (max-width: 719px) {
  .podium-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-inline: auto;
  }

  .podium-card {
    min-height: 0;
  }
}

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

.app-card-ranking {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.app-card-topline,
.app-card-hero,
.app-card-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-card-hero {
  justify-content: start;
}

.app-icon-xl {
  width: 46px;
  height: 46px;
}

.app-main {
  min-width: 0;
}

.app-main h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.app-card-cat {
  margin: 2px 0 0;
  font-size: 0.8rem;
}

.app-card-highlight {
  align-items: baseline;
  padding: 8px 10px;
  border: 1px solid #ffe2aa;
  border-radius: 8px;
  background: #fffaf0;
}

.app-card-highlight strong {
  font-size: 0.95rem;
}

.app-card-highlight span {
  color: #7a5a00;
  font-size: 0.8rem;
  font-weight: 700;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff8f4;
  color: var(--text-secondary);
  padding: 4px 8px;
  font-size: 0.76rem;
  line-height: 1.2;
}

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

.card-actions > * {
  flex: 1 1 128px;
}

.app-card-ranking .button {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.8rem;
}

.detail-hero {
  gap: 18px;
}

.facts {
  gap: 10px;
}

.faq summary,
.fact strong {
  color: var(--text-primary);
}

.floating-download-bar {
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(90, 55, 48, 0.12);
}

.floating-download-bar .button.primary {
  min-width: 140px;
}

.scroll-top-fab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--cta-red);
  box-shadow: 0 10px 24px rgba(90, 55, 48, 0.12);
}

.info-band {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 243, 214, 0.38) 0%, rgba(255, 248, 244, 0.7) 100%);
}

.blog-card-featured {
  display: grid;
  gap: 10px;
}

@media (min-width: 720px) {
  .search-panel-premium,
  .podium-premium,
  .cta-mail,
  .blog-card-featured {
    grid-column: 1 / -1;
  }

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

/* Layout redesign v2 */
.hero-grid-v2,
.catalog-hero-grid,
.search-hero-grid {
  display: grid;
  gap: 16px;
}

.hero-brand-band,
.catalog-summary-card,
.leader-spotlight,
.challenger-card,
.blog-promo-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(90, 55, 48, 0.08);
}

.hero-brand-band {
  padding: 18px;
}

.hero-brand-band h1 {
  margin: 0;
  line-height: 1.02;
  font-size: clamp(2.1rem, 8vw, 4.2rem);
}

.hero-side-stack {
  display: grid;
  gap: 12px;
}

.board-search {
  padding: 12px;
}

.board-banner {
  margin: 0;
}

.board-shell {
  display: grid;
  gap: 12px;
}

.leader-spotlight {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.leader-copy h2 {
  margin: 0;
  font-size: 1.5rem;
}

.leader-bonus {
  margin: 8px 0 0;
  color: var(--cta-red);
  font-size: 1.3rem;
  font-weight: 900;
}

.leader-metrics,
.leader-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.leader-metrics span,
.leader-notes span,
.board-category,
.challenger-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.leader-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.inline-link {
  color: var(--cta-red);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.leader-icon {
  width: 112px;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.challenger-rail {
  display: grid;
  gap: 10px;
}

.challenger-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.challenger-topline,
.challenger-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.challenger-main {
  justify-content: flex-start;
}

.challenger-main h3 {
  margin: 0;
  font-size: 0.98rem;
}

.challenger-main p {
  margin: 3px 0 0;
}

.ranked-stack {
  display: grid;
  gap: 10px;
}

.app-card-board {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(90, 55, 48, 0.06);
}

.board-rank,
.board-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.board-main {
  justify-content: flex-start;
}

.board-rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--cta-red);
  color: #fff;
  font-weight: 900;
}

.board-title-group {
  min-width: 0;
}

.board-title-group h3 {
  margin: 0;
  font-size: 1rem;
}

.board-scoreline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.board-bonus {
  color: var(--cta-red);
  font-weight: 900;
}

.board-rating {
  color: #8f5e00;
  font-weight: 800;
}

.board-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.board-kpi {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #ffe2aa;
  border-radius: 8px;
  background: #fffaf0;
}

.board-kpi strong {
  color: var(--text-primary);
  font-size: 0.88rem;
}

.board-kpi small {
  color: #7a5a00;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.app-card-board .button.primary,
.challenger-card .button.primary {
  width: 100%;
}

.catalog-summary-card {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.catalog-summary-card strong {
  font-size: 1.6rem;
  color: var(--text-primary);
}

.catalog-summary-card span {
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.board-context-band {
  padding-top: 0;
}

.board-context-grid {
  display: grid;
  gap: 12px;
}

.blog-promo-band {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.ranked-stack-catalog .app-card-board {
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .hero-grid-v2,
  .catalog-hero-grid,
  .search-hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  .board-shell {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .leader-spotlight {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

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

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

  .board-context-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Layout redesign v3 */
.simple-hero {
  display: block;
}

.catalog-hero-grid,
.search-hero-grid {
  display: grid;
  gap: 16px;
}

.simple-hero > .wrap {
  width: 100%;
}

.simple-hero .search-panel,
.simple-hero .banner-carousel,
.hero-search-slot,
.hero-banner-slot {
  width: 100%;
  min-width: 0;
}

.simple-hero .search-panel {
  background: linear-gradient(180deg, #fffdf8 0%, #fff7ef 100%);
}

.simple-hero .banner-viewport,
.simple-hero .banner {
  width: 100%;
}

.simple-hero .banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.simple-hero-copy,
.hero-utility-stack,
.catalog-summary-card,
.blog-promo-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(90, 55, 48, 0.06);
}

.simple-hero-copy {
  padding: 18px;
}

.simple-hero-copy h1 {
  margin: 0;
  line-height: 1.04;
  font-size: clamp(2rem, 8vw, 3.6rem);
}

.hero-utility-stack {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.compact-banner {
  margin: 0;
}

.podium-strip {
  display: block;
  width: 100%;
}

.podium-strip .podium,
.podium-strip .podium-grid {
  width: 100%;
}

.podium-tile {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 18px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-shadow: 0 12px 24px rgba(90, 55, 48, 0.06);
}

.podium-badge {
  position: absolute;
  top: -14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(90, 55, 48, 0.14);
}

.podium-badge.place-1 { background: #c62828; }
.podium-badge.place-2 { background: #2762c6; }
.podium-badge.place-3 { background: #1f8b49; }

.podium-app-icon {
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.podium-tile h3 {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 0.84rem;
  line-height: 1.15;
}

.podium-tile p {
  margin: 0;
  color: var(--cta-red);
  font-size: 0.82rem;
  font-weight: 800;
}

.podium-security {
  color: #1f8b49;
  font-size: 0.66rem;
  font-weight: 800;
}

.podium-tile .button.primary {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  font-size: 0.74rem;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(90, 55, 48, 0.06);
}

.ranking-main {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 10px;
}

.ranking-icon-wrap {
  position: relative;
  width: 54px;
  height: 54px;
}

.ranking-icon-wrap .app-icon {
  width: 50px;
  height: 50px;
  margin: 4px 0 0 4px;
}

.ranking-icon-wrap .rank-chip {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 28px;
  padding: 3px 7px;
  font-size: 0.72rem;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(229, 57, 53, 0.24);
}

.ranking-app {
  display: block;
  min-width: 0;
}

.ranking-copy {
  min-width: 0;
}

.ranking-copy h3 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.2;
}

.ranking-info-line {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 4px;
}

.ranking-info-line span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.ranking-info-line strong {
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 900;
}

.ranking-info-line small {
  color: var(--text-secondary);
  font-size: 0.62rem;
  font-weight: 700;
}

.ranking-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.ranking-actions .button {
  width: 100%;
  min-height: 32px;
  padding: 7px 8px;
  font-size: 0.72rem;
}

.ranking-rating {
  color: #8f5e00;
  font-size: 0.9rem;
  font-weight: 800;
}

.related-apps-section {
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}

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

.related-app-card {
  box-shadow: 0 8px 18px rgba(90, 55, 48, 0.05);
}

.detail-page-hero {
  background:
    linear-gradient(180deg, rgba(255, 243, 214, 0.7) 0%, rgba(255, 248, 244, 0.18) 100%);
}

.detail-hero-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 14px 28px rgba(90, 55, 48, 0.08);
}

.detail-icon-shell {
  width: 96px;
  height: 96px;
  border: 1px solid #ffd7c9;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf0 0%, #fff 100%);
  padding: 8px;
}

.detail-icon-shell .detail-icon {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}

.detail-copy {
  min-width: 0;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(1.8rem, 7vw, 3rem);
  line-height: 1.05;
}

.detail-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: #8f5e00;
  font-weight: 900;
}

.detail-score-row span {
  display: inline-flex;
  align-items: center;
}

.detail-score-row .detail-bonus {
  color: var(--cta-red);
}

.detail-summary {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--text-secondary);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.detail-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}

.detail-quick-stats span {
  display: grid;
  gap: 2px;
}

.detail-quick-stats strong {
  color: var(--text-primary);
  font-size: 0.92rem;
}

.detail-quick-stats small {
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 800;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.detail-actions > * {
  flex: 1 1 150px;
}

@media (min-width: 720px) {
  .catalog-hero-grid,
  .search-hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }

  .podium-tile.place-1 { transform: translateY(-16px); }
  .podium-tile.place-2 { transform: translateY(8px); }
  .podium-tile.place-3 { transform: translateY(8px); }

  .ranking-main {
    grid-template-columns: 58px minmax(0, 1fr) 118px;
    gap: 12px;
  }

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

  .detail-hero-card {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    padding: 18px;
  }

  .detail-icon-shell {
    width: 112px;
    height: 112px;
  }
}

@media (max-width: 719px) {
  .ranking-main {
    grid-template-columns: 52px minmax(0, 1fr) 100px;
    gap: 8px;
    align-items: center;
  }

  .ranking-icon-wrap {
    width: 52px;
    height: 52px;
  }

  .ranking-icon-wrap .app-icon {
    width: 48px;
    height: 48px;
  }

  .ranking-actions {
    gap: 6px;
  }

  .ranking-actions .button {
    min-height: 30px;
    padding: 6px 7px;
    font-size: 0.68rem;
  }

  .ranking-copy h3 {
    font-size: 0.88rem;
  }

  .ranking-info-line {
    gap: 2px 7px;
  }

  .ranking-info-line strong {
    font-size: 0.72rem;
  }

  .ranking-info-line small {
    font-size: 0.58rem;
  }

  .ranking-info-line span:nth-child(4) {
    display: none;
  }
}


/* site-settings theme overrides */
:root {
  --theme-primary: #E53935;
  --theme-primary-light: #E539351a;
  --theme-primary-dark: #c62828;
  --theme-accent: #f4b400;
  --theme-accent-hover: #d9a000;
  --theme-surface: #fff8f4;
  --theme-surface-muted: #fff3d6;
  --theme-surface-card: #ffffff;
  --theme-text-primary: #2b1d1a;
  --theme-text-muted: #5f4a45;
  --theme-border: #ffd7c9;
  --brand-primary: #E53935;
  --search-results-bg: #fff;
}

/* 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; }
