/* Home page (site/index.html): the app presented like a store listing, with the real app screens and
   game tiles. Tokens and header/footer from /styles.css; everything here is prefixed hx- so the other
   pages stay untouched. The small app cards use the app's own dark theme (src/theme.ts darkColors and
   its accent tints). Status and emphasis use colour, full borders and backgrounds only: no accent
   stripes on one side. Logical properties only, so Arabic mirrors. */

.home-page {
  --hx-gutter: 24px;
  --hx-radius: 22px;
  --hx-focus: #ffd166;
  /* Spacing scale. */
  --hx-1: 4px;
  --hx-2: 8px;
  --hx-3: 12px;
  --hx-4: 16px;
  --hx-5: 24px;
  --hx-6: 32px;
  --hx-7: 48px;
  --hx-8: 64px;
  --hx-9: 96px;
  /* App theme (src/theme.ts darkColors). */
  --app-surface: #0f1826;
  --app-card: #131a24;
  --app-border: rgba(255, 255, 255, 0.09);
  --app-text: #f4f7fb;
  --app-muted: #a9b4c4;
  --app-cyan: #5be6fb;
  --app-green: #43f0b6;
  --app-amber: #fbc768;
  --app-gold: #ffc94d;
  --app-play: #34d399;
}

.home-page a:focus-visible,
.home-page select:focus-visible,
.home-page button:focus-visible,
.home-page summary:focus-visible,
.hx-shot-strip:focus-visible {
  outline: 3px solid var(--hx-focus);
  outline-offset: 3px;
  border-radius: 10px;
}

.home-page [hidden] {
  display: none !important;
}

.hx-inner {
  margin: 0 auto;
  max-width: var(--max);
  padding: 0 var(--hx-gutter);
  width: 100%;
}

/* Shared type. */
.hx-kicker {
  color: #ffd9a8;
  display: block;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
  margin: 0;
}

.home-page :is(h1, h2, h3),
.hx-kicker {
  text-wrap: balance;
}

.hx-section h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 950;
  line-height: 1.08;
  margin: 0 0 var(--hx-4);
}

.hx-body-lg {
  color: var(--text);
  font-size: 19px;
  line-height: 1.6;
  margin: 0 0 var(--hx-4);
}

.hx-body {
  color: var(--muted);
  display: block;
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}

.hx-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.3;
  margin: 0;
  text-transform: uppercase;
}

.hx-label-cyan {
  color: var(--app-cyan);
}

.hx-label-amber {
  color: var(--app-amber);
}

[dir="rtl"] .hx-arrow {
  transform: scaleX(-1);
}

/* Phone frame around a real app screen (600 × 1304, the iPhone 6.9" ratio). */
.hx-phone {
  background: #05070b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15% / 7%;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 30px 60px rgba(0, 0, 0, 0.45);
  padding: 3.4%;
  position: relative;
}

.hx-phone::after {
  background: #000;
  border-radius: 999px;
  content: "";
  height: 2.6%;
  inset-inline-start: 36%;
  position: absolute;
  top: 2.8%;
  width: 28%;
}

.hx-screen {
  aspect-ratio: 600 / 1304;
  background: var(--app-surface);
  border-radius: 12% / 5.6%;
  display: block;
  height: auto;
  width: 100%;
}

/* The hero's HTML copy of the home screen, for locales without their own captures (class from the boot
   script in index.html). Same card, same words as the app, so no visitor sees an English screen first. */
.hx-mock {
  display: none;
}

.hx-no-screens .hx-hero-art .hx-screen {
  display: none;
}

.hx-no-screens .hx-mock {
  aspect-ratio: 600 / 1304;
  background: #0a0e15;
  border-radius: 12% / 5.6%;
  color: var(--app-text);
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
  padding: 10px 9px;
  text-align: start;
}

.hx-mock p {
  margin: 0;
}

.hx-mock-bar {
  align-items: center;
  display: flex;
  font-size: 10px;
  font-weight: 800;
  justify-content: space-between;
  padding: 2px 10px 6px;
}

.hx-mock-signal {
  background: var(--app-play);
  border-radius: 3px;
  height: 8px;
  width: 17px;
}

.hx-mock-head {
  align-items: center;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
}

.hx-mock-head img {
  height: 20px;
  width: 20px;
}

.hx-mock-head span span {
  color: var(--app-green);
}

.hx-mock-card,
.hx-mock-rival,
.hx-mock-streak {
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 12px;
}

.hx-mock-card {
  align-items: center;
  display: flex;
  flex-direction: column;
  padding: 9px 8px 10px;
  text-align: center;
}

.hx-mock-card .hx-label {
  align-self: stretch;
  font-size: 9px;
  text-align: start;
}

.hx-mock-tile {
  border-radius: 22%;
  height: 76px;
  margin: 4px 0 6px;
  width: 76px;
}

.hx-mock-game {
  font-size: 16px;
  font-weight: 950;
  line-height: 1.15;
}

.hx-mock .hx-mock-twist {
  font-size: 10px;
  font-weight: 800;
  margin-top: 3px;
}

.hx-mock .hx-mock-note,
.hx-mock .hx-mock-small {
  color: var(--app-muted);
  font-size: 9px;
  line-height: 1.3;
  margin-top: 3px;
}

.hx-mock-play {
  align-items: center;
  background: var(--app-play);
  border-radius: 9px;
  color: #04140e;
  display: flex;
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
  justify-content: center;
  min-height: 28px;
}

[dir="rtl"] .hx-mock-play svg {
  transform: scaleX(-1);
}

.hx-mock-rival,
.hx-mock-streak {
  align-items: center;
  display: flex;
  gap: 8px;
  padding: 8px;
}

.hx-mock-rival .hx-avatar {
  height: 30px;
  width: 30px;
}

.hx-mock .hx-label {
  font-size: 8px;
}

.hx-mock-name {
  font-size: 12px;
  font-weight: 900;
}

.hx-mock-streak-value {
  color: var(--app-amber);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.1;
}

/* Hero: velvet red to magenta to arcade night, with the real home screen and game tiles. */
.hx-hero {
  background:
    radial-gradient(60% 70% at 80% 40%, rgba(255, 111, 181, 0.3), transparent 70%),
    radial-gradient(60% 70% at 10% 0%, rgba(255, 214, 170, 0.18), transparent 70%),
    linear-gradient(140deg, #5c0a1f 0%, #8a1450 40%, #2a145e 74%, #0b0a24 100%);
  overflow: hidden;
  padding: 112px 0 0;
  position: relative;
}

.hx-hero::after {
  background: linear-gradient(180deg, transparent, var(--background));
  bottom: 0;
  content: "";
  height: 120px;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  z-index: 2;
}

.hx-hero-grid {
  align-items: start;
  display: grid;
  gap: var(--hx-7);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  position: relative;
  z-index: 1;
}

.hx-hero-copy {
  padding: var(--hx-6) 0 var(--hx-9);
}

.hx-hero h1 {
  font-size: clamp(44px, 6.4vw, 80px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.98;
  margin: var(--hx-3) 0 var(--hx-3);
}

.hx-subtitle {
  color: #fff;
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 850;
  line-height: 1.25;
  margin: 0 0 var(--hx-4);
}

.hx-lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  max-width: 34em;
}

.hx-stores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hx-3);
  margin-top: var(--hx-6);
}

.hx-store {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  gap: 10px;
  min-height: 56px;
  padding: 0 22px;
  transition: transform 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}

.hx-store:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  .hx-store:hover {
    transform: translateY(-2px);
  }
}

.hx-store-ios {
  background: #fff;
  color: var(--ink);
}

.hx-store-play {
  background: var(--green);
  color: var(--on-accent);
}

.hx-rankings-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 16px;
  font-weight: 850;
  gap: var(--hx-2);
  margin-top: var(--hx-4);
  min-height: 48px;
  padding: 0 20px;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.hx-rankings-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
}

.hx-hero-art {
  height: 600px;
  justify-self: center;
  max-width: 460px;
  position: relative;
  width: 100%;
}

.hx-hero-art > .hx-phone {
  inset-inline-start: 50%;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 272px;
  z-index: 1;
}

[dir="rtl"] .hx-hero-art > .hx-phone {
  transform: translateX(50%);
}

.hx-hero-tiles {
  inset: 0;
  position: absolute;
}

.hx-hero-tiles::before {
  background: radial-gradient(circle, rgba(39, 216, 239, 0.28), transparent 64%);
  border-radius: 50%;
  content: "";
  height: 420px;
  inset-inline-start: calc(50% - 210px);
  position: absolute;
  top: 60px;
  width: 420px;
}

.hx-float {
  border-radius: 22%;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
  height: auto;
  position: absolute;
  width: 132px;
}

.hx-float-a {
  inset-inline-start: 0;
  top: 56px;
  transform: rotate(-10deg);
}

.hx-float-b {
  inset-inline-end: 0;
  top: 24px;
  transform: rotate(9deg);
  width: 120px;
}

.hx-float-c {
  inset-inline-start: 18px;
  top: 300px;
  transform: rotate(7deg);
  width: 112px;
}

.hx-float-d {
  /* Behind the phone like the others; only its outer half shows next to the bezel. */
  inset-inline-end: -18px;
  top: 300px;
  transform: rotate(-8deg);
}

@media (prefers-reduced-motion: no-preference) {
  .hx-float {
    animation: hx-float 7s ease-in-out infinite;
  }

  .hx-float-b {
    animation-delay: -1.8s;
  }

  .hx-float-c {
    animation-delay: -3.6s;
  }

  .hx-float-d {
    animation-delay: -5.2s;
  }
}

@keyframes hx-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

/* Screen strip: the composed store screenshots (headline in the image), five per row; scrolls sideways. */
.hx-shots {
  padding: var(--hx-7) 0 var(--hx-8);
}

.hx-shots-head {
  align-items: center;
  display: flex;
  gap: var(--hx-4);
  justify-content: space-between;
  margin-bottom: var(--hx-5);
}

.hx-section-kicker {
  color: var(--text);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 950;
  line-height: 1.15;
  margin: 0;
}

.hx-strip-nav {
  display: flex;
  flex: 0 0 auto;
  gap: var(--hx-2);
}

.hx-strip-button {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  transition: background-color 160ms ease, opacity 160ms ease;
  width: 44px;
}

.hx-strip-button:hover:not(:disabled) {
  background: var(--surface-high);
}

.hx-strip-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.hx-shot-strip {
  --hx-edge: max(var(--hx-gutter), calc((100vw - var(--max)) / 2 + var(--hx-gutter)));
  --hx-gap: 20px;
  display: flex;
  gap: var(--hx-gap);
  list-style: none;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 4px var(--hx-edge) var(--hx-4);
  scroll-padding: 0 var(--hx-edge);
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--surface-high) transparent;
  scrollbar-width: thin;
}

.hx-shot {
  /* Five per row inside the content width (the strip and its heading fit a laptop screen), at least 200px wide. */
  flex: 0 0 max(200px, calc((min(100vw, var(--max)) - 2 * var(--hx-gutter) - 4 * var(--hx-gap)) / 5));
  scroll-snap-align: start;
}

.hx-store-shot {
  aspect-ratio: 600 / 1304;
  background: var(--surface-soft);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--hx-radius);
  display: block;
  height: auto;
  width: 100%;
}

/* Sections from the store description. */
.hx-section {
  padding: var(--hx-8) 0;
}

/* Daily section: one hue, amber to deep brown (palette of screenshot 4), with a daily game and its twist. */
.hx-daily {
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(255, 209, 102, 0.2), transparent 70%),
    linear-gradient(160deg, #5a3208 0%, #4a2a0a 45%, #241407 100%);
}

.hx-daily-grid {
  align-items: center;
  display: grid;
  gap: var(--hx-7);
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
}

.hx-daily .hx-body {
  color: rgba(255, 255, 255, 0.88);
}

.hx-day {
  background: rgba(7, 11, 18, 0.42);
  border: 1px solid rgba(255, 214, 140, 0.32);
  border-radius: 18px;
  margin-top: var(--hx-5);
  padding: var(--hx-5);
}

.hx-day h3 {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 var(--hx-4);
}

.hx-steps {
  display: grid;
  gap: var(--hx-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.hx-steps li {
  align-items: start;
  color: var(--text);
  display: flex;
  font-size: 15px;
  gap: var(--hx-3);
  line-height: 1.45;
}

.hx-step-icon {
  align-items: center;
  background: #241b07;
  border: 1px solid #4d3a10;
  border-radius: 11px;
  color: var(--app-amber);
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.hx-daily-visual {
  display: flex;
  justify-content: center;
}

.hx-app-card {
  align-items: center;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  max-width: 320px;
  padding: var(--hx-5);
  text-align: center;
  width: 100%;
}

.hx-app-card .hx-label {
  align-self: stretch;
  text-align: start;
}

.hx-app-tile {
  border-radius: 22%;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5);
  height: auto;
  margin: var(--hx-4) 0 var(--hx-5);
  width: 156px;
}

.hx-app-game {
  color: var(--app-text);
  font-size: 26px;
  font-weight: 950;
  line-height: 1.15;
  margin: 0;
}

.hx-app-intro {
  align-items: start;
  background: #1c1a12;
  border: 1px solid #3d3518;
  border-radius: 12px;
  color: var(--app-text);
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  line-height: 1.4;
  margin: var(--hx-4) 0 0;
  padding: 10px 12px;
  text-align: start;
}

.hx-app-intro svg {
  color: var(--app-gold);
  flex: 0 0 auto;
  margin-top: 1px;
}

.hx-app-note {
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.4;
  margin: var(--hx-3) 0 0;
}

.hx-games {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  gap: var(--hx-6);
  grid-template-columns: auto minmax(0, 1fr);
  margin-top: var(--hx-7);
  padding-top: var(--hx-6);
}

.hx-games-tiles {
  display: flex;
  gap: 10px;
}

.hx-game-tile {
  border-radius: 22%;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  height: 76px;
  width: 76px;
}

.hx-games-line {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

/* Feature cards: a tone, a visual stage with an app card or real tiles, then the text. */
.hx-features {
  background: linear-gradient(180deg, #120f2e, var(--background));
}

.hx-feature-grid {
  /* Cards keep their own height: opening "More" grows one card, not the whole row. */
  align-items: start;
  display: grid;
  gap: var(--hx-5);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hx-card {
  --tone: var(--green);
  --tone-bg: linear-gradient(160deg, #0b6655, #0a4a44);
  --tone-line: rgba(39, 231, 164, 0.45);
  background: var(--tone-bg);
  border: 1px solid var(--tone-line);
  border-radius: var(--hx-radius);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hx-stage {
  align-items: center;
  background: radial-gradient(90% 90% at 50% 20%, rgba(255, 255, 255, 0.14), transparent 70%);
  display: flex;
  height: 240px;
  justify-content: center;
  padding: var(--hx-5);
}

.hx-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 var(--hx-5) var(--hx-5);
}

.hx-card h3 {
  font-size: 21px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 var(--hx-2);
}

.hx-card-body p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.hx-more {
  margin-top: var(--hx-2);
}

.hx-more summary {
  align-items: center;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 850;
  gap: 6px;
  list-style: none;
  min-height: 40px;
}

.hx-more summary::-webkit-details-marker {
  display: none;
}

.hx-more summary:hover {
  text-decoration: underline;
}

.hx-chevron {
  transition: transform 160ms ease;
}

.hx-more[open] .hx-chevron {
  transform: rotate(180deg);
}

.hx-more[open] .hx-more-open,
.hx-more:not([open]) .hx-more-close {
  display: none;
}

.hx-more p {
  margin-top: var(--hx-2);
}

.hx-tone-sky {
  --tone: #7cc8f5;
  --tone-bg: linear-gradient(160deg, #0f5a96, #12355c);
  --tone-line: rgba(79, 182, 239, 0.5);
}

.hx-tone-sunset {
  --tone: #ff9a7a;
  --tone-bg: linear-gradient(160deg, #9a3324, #5e1f3f);
  --tone-line: rgba(255, 122, 89, 0.5);
}

.hx-tone-rose {
  --tone: #ffa3d2;
  --tone-bg: linear-gradient(160deg, #8c2a64, #4e1f52);
  --tone-line: rgba(255, 143, 199, 0.5);
}

.hx-tone-mint {
  --tone: #4fe0b8;
  --tone-bg: linear-gradient(160deg, #0b6e5b, #0a4844);
  --tone-line: rgba(47, 211, 166, 0.5);
}

.hx-tone-arcade {
  --tone: #b4a1ff;
  --tone-bg: linear-gradient(160deg, #3d2c94, #1c1650);
  --tone-line: rgba(159, 134, 255, 0.55);
}

.hx-tone-reef {
  --tone: #4fdde0;
  --tone-bg: linear-gradient(160deg, #086a80, #0a3f55);
  --tone-line: rgba(25, 195, 200, 0.5);
}

/* The app cards inside the stages (darkColors.surfaceCard, full thin border). */
.hx-widget {
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  max-width: 300px;
  padding: var(--hx-4) var(--hx-5);
  width: 100%;
}

.hx-widget :where(p) {
  color: var(--app-text);
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

.hx-result {
  text-align: center;
}

.hx-result-rank {
  color: var(--app-gold);
  font-size: 28px;
  font-weight: 950;
  line-height: 1.1;
}

.hx-result-score {
  color: var(--app-muted);
  font-size: 14px;
  margin-top: var(--hx-1);
}

.hx-meter {
  background: #1e2a3b;
  border-radius: 999px;
  display: block;
  height: 8px;
  margin: var(--hx-4) 0 var(--hx-2);
  overflow: hidden;
}

.hx-meter span {
  background: linear-gradient(90deg, #16a877, var(--app-green));
  border-radius: inherit;
  display: block;
  height: 100%;
  width: 78%;
}

.hx-result-better {
  color: var(--app-green);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.hx-avatar {
  border-radius: 50%;
  flex: 0 0 auto;
  height: 48px;
  width: 48px;
}

.hx-avatar-sm {
  height: 30px;
  width: 30px;
}

.hx-rival-head {
  align-items: center;
  display: flex;
  gap: var(--hx-3);
}

.hx-rival-name {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  margin: 2px 0;
}

.hx-rival-rank,
.hx-versus,
.hx-streak-caption {
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.4;
}

.hx-trend {
  align-items: center;
  color: var(--app-green);
  display: flex;
  font-size: 14px;
  font-weight: 850;
  gap: 6px;
  line-height: 1.35;
  margin-top: var(--hx-3);
}

[dir="rtl"] .hx-trend svg {
  transform: scaleX(-1);
}

.hx-trend svg,
.hx-win-title svg {
  flex: 0 0 auto;
}

.hx-versus {
  margin-top: 2px;
}

.hx-streak-row {
  align-items: center;
  display: flex;
  gap: var(--hx-3);
}

.hx-flame {
  display: inline-flex;
  filter: drop-shadow(0 6px 14px rgba(255, 140, 60, 0.45));
}

.hx-streak-value {
  color: var(--app-amber);
  font-size: 28px;
  font-weight: 950;
  line-height: 1.1;
}

.hx-week {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none;
  margin: var(--hx-4) 0 0;
  padding: 0;
}

.hx-week li {
  border-radius: 6px;
  height: 10px;
}

.hx-week .is-done {
  background: #c68c24;
}

.hx-week .is-today {
  background: var(--app-amber);
  box-shadow: 0 0 0 2px rgba(251, 199, 104, 0.35);
}

.hx-win-title {
  align-items: center;
  color: var(--app-green);
  display: flex;
  font-size: 22px;
  font-weight: 950;
  gap: var(--hx-2);
  line-height: 1.2;
}

/* Friends: the app's friend-challenge screen in small: who challenged you, the result, the player list. */
.hx-widget .hx-invite {
  align-items: center;
  color: var(--app-muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  margin-bottom: var(--hx-2);
}

.hx-board {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: var(--hx-3) 0 0;
  padding: 0;
}

.hx-board li {
  align-items: center;
  background: #0f1520;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  color: var(--app-text);
  display: grid;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  padding: 6px 10px;
}

.hx-board li.is-me {
  background: #0c2730;
  border-color: var(--app-cyan);
}

.hx-board-place {
  color: var(--app-muted);
  font-variant-numeric: tabular-nums;
}

.hx-board-score {
  font-variant-numeric: tabular-nums;
}

.hx-avatar-xs {
  height: 24px;
  width: 24px;
}

/* Fair: the same round on two phones in two countries. */
.hx-same {
  align-items: center;
  display: flex;
  gap: var(--hx-3);
}

.hx-same-card {
  align-items: center;
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 10px 12px;
  position: relative;
  width: 116px;
}

.hx-same-card p {
  color: #c3b0fc;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
  margin: 0;
  text-align: center;
}

.hx-same-tile {
  border-radius: 22%;
  height: 72px;
  width: 72px;
}

.hx-same-equals {
  color: #fff;
  font-size: 30px;
  font-weight: 950;
}

.hx-flag {
  border: 2px solid var(--app-card);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  height: 26px;
  inset-inline-end: -8px;
  position: absolute;
  top: -8px;
  width: 26px;
}

.hx-flag-jp {
  background: radial-gradient(circle, #bc002d 0 34%, #fff 36%);
}

.hx-flag-de {
  background: linear-gradient(#000 0 33.3%, #dd0000 33.3% 66.6%, #ffce00 66.6%);
}

.hx-tile-grid {
  display: grid;
  gap: var(--hx-3);
  grid-template-columns: repeat(3, 72px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.hx-grid-tile {
  border-radius: 22%;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
  height: 72px;
  width: 72px;
}

.hx-checks {
  display: grid;
  gap: var(--hx-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.hx-checks li {
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.5;
  padding-inline-start: 26px;
  position: relative;
}

.hx-checks li::before {
  background: var(--app-cyan);
  content: "";
  height: 16px;
  inset-inline-start: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  position: absolute;
  top: 0.18em;
  width: 16px;
}

/* Teaser for /rankings. */
.hx-teaser-section {
  padding-top: var(--hx-4);
}

.hx-teaser {
  align-items: center;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(39, 216, 239, 0.25), transparent 60%),
    linear-gradient(135deg, #12304a, #1d1a4f 60%, #2a145e);
  border: 1px solid rgba(79, 182, 239, 0.4);
  border-radius: var(--hx-radius);
  display: flex;
  gap: var(--hx-6);
  justify-content: space-between;
  padding: var(--hx-6);
}

.hx-teaser-copy {
  display: block;
  max-width: 640px;
}

.hx-teaser .hx-kicker {
  color: #8fdcff;
  font-size: 15px;
}

.hx-teaser .hx-teaser-title {
  display: block;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 950;
  line-height: 1.1;
  margin: var(--hx-2) 0 var(--hx-3);
}

.hx-teaser .hx-body {
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.hx-next-game {
  color: #ffd9a8;
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  margin: var(--hx-3) 0 0;
}

.hx-next-game:empty {
  display: none;
}

.hx-teaser-cta {
  align-items: center;
  background: #fff;
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 900;
  gap: var(--hx-2);
  min-height: 52px;
  padding: 0 22px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hx-teaser-cta:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  .hx-teaser-cta:hover {
    transform: translateY(-2px);
  }
}

/* Closing call to action with a fan of real tiles. */
.hx-cta {
  padding-bottom: 88px;
}

.hx-cta-inner {
  align-items: center;
  background:
    radial-gradient(60% 90% at 50% 0%, rgba(255, 214, 170, 0.22), transparent 70%),
    linear-gradient(140deg, #5c0a1f 0%, #8a1450 45%, #2a145e 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  max-width: calc(var(--max) - 2 * var(--hx-gutter));
  padding: var(--hx-7) var(--hx-5);
  text-align: center;
  width: calc(100% - 2 * var(--hx-gutter));
}

.hx-cta-tiles {
  display: flex;
  justify-content: center;
}

.hx-cta-tile {
  border-radius: 22%;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
  height: 72px;
  width: 72px;
}

.hx-cta-tile + .hx-cta-tile {
  margin-inline-start: -10px;
}

.hx-cta-tile:nth-child(1) {
  transform: rotate(-12deg) translateY(10px);
}

.hx-cta-tile:nth-child(2) {
  transform: rotate(-6deg) translateY(2px);
}

.hx-cta-tile:nth-child(3) {
  height: 88px;
  position: relative;
  width: 88px;
  z-index: 1;
}

.hx-cta-tile:nth-child(4) {
  transform: rotate(6deg) translateY(2px);
}

.hx-cta-tile:nth-child(5) {
  transform: rotate(12deg) translateY(10px);
}

.hx-cta h2 {
  margin: var(--hx-5) 0 0;
}

.hx-cta .hx-stores {
  justify-content: center;
}

.hx-languages {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.6;
  margin: var(--hx-5) 0 0;
  max-width: 46em;
}

/* Footer language picker. */
.hx-language {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  gap: 10px;
}

.hx-language select {
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  min-height: 44px;
  padding: 0 12px;
}

@media (max-width: 1040px) {
  /* styles.css hides the nav here; the home page keeps a compact Rankings link. */
  .home-page .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .home-page .nav {
    display: flex;
    justify-content: flex-end;
  }

  .home-page .nav #nav-support {
    display: none;
  }

  .home-page .nav a {
    align-items: center;
    display: inline-flex;
    min-height: 44px;
  }

  .home-page .store-nav {
    grid-column: auto;
  }

  .hx-hero-grid {
    gap: var(--hx-5);
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  }

  .hx-hero-art > .hx-phone {
    width: 236px;
  }

  .hx-float {
    width: 104px;
  }

  .hx-float-b {
    width: 96px;
  }

  .hx-float-c {
    width: 92px;
  }

  .hx-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hx-daily-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
    gap: var(--hx-6);
  }

  .hx-steps {
    grid-template-columns: 1fr;
  }

  .hx-games {
    grid-template-columns: 1fr;
    gap: var(--hx-4);
  }
}

@media (max-width: 760px) {
  .home-page {
    --hx-gutter: 16px;
  }

  /* The hero's own store buttons sit right below; the header keeps the name and both links instead. */
  .home-page .store-nav {
    display: none;
  }

  .home-page .brand > span {
    display: inline;
  }

  .home-page .nav #nav-support {
    display: inline-flex;
  }

  .home-page .nav {
    gap: 14px;
  }

  .hx-hero {
    padding-top: 76px;
  }

  .hx-hero-grid {
    gap: 0;
    grid-template-columns: 1fr;
  }

  .hx-hero-copy {
    padding: var(--hx-3) 0 var(--hx-5);
  }

  .hx-hero h1 {
    margin: var(--hx-2) 0;
  }

  .hx-subtitle {
    margin-bottom: var(--hx-3);
  }

  .hx-lead {
    line-height: 1.5;
  }

  .hx-rankings-button {
    margin-top: var(--hx-3);
  }

  .hx-hero-art {
    height: 400px;
    max-width: 360px;
  }

  .hx-hero-art > .hx-phone {
    width: 210px;
  }

  .hx-hero-tiles::before {
    height: 320px;
    inset-inline-start: calc(50% - 160px);
    top: 40px;
    width: 320px;
  }

  .hx-float {
    width: 88px;
  }

  .hx-float-a {
    top: 40px;
  }

  .hx-float-b {
    top: 16px;
    width: 80px;
  }

  .hx-float-c {
    inset-inline-start: 4px;
    top: 220px;
    width: 76px;
  }

  .hx-float-d {
    inset-inline-end: 0;
    top: 200px;
  }

  .hx-kicker {
    font-size: 16px;
  }

  .hx-lead {
    font-size: 17px;
  }

  .hx-stores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: var(--hx-5);
  }

  .hx-store {
    justify-content: center;
    padding: 0 12px;
  }

  .hx-shots {
    padding: var(--hx-6) 0 var(--hx-7);
  }

  .hx-shot-strip {
    --hx-gap: 14px;
  }

  .hx-shot {
    flex-basis: min(66vw, 280px);
  }

  .hx-app-card {
    max-width: 290px;
  }

  .hx-section {
    padding: var(--hx-7) 0;
  }

  .hx-body-lg {
    font-size: 18px;
  }

  .hx-daily-grid {
    gap: var(--hx-6);
    grid-template-columns: 1fr;
  }

  .hx-day {
    padding: var(--hx-4);
  }

  .hx-games-tiles {
    justify-content: center;
  }

  .hx-games-tiles {
    gap: 8px;
  }

  .hx-game-tile {
    height: 48px;
    width: 48px;
  }

  .hx-feature-grid {
    grid-template-columns: 1fr;
    gap: var(--hx-4);
  }

  .hx-stage {
    height: 232px;
    padding: var(--hx-4);
  }

  .hx-card-body {
    padding: 0 var(--hx-4) var(--hx-5);
  }

  .hx-teaser {
    align-items: stretch;
    flex-direction: column;
    gap: var(--hx-5);
    padding: var(--hx-5);
  }

  .hx-teaser-cta {
    justify-content: center;
  }

  .hx-cta-inner {
    border-radius: var(--hx-radius);
    padding: var(--hx-6) var(--hx-4);
  }

  .hx-cta-tile {
    height: 56px;
    width: 56px;
  }

  .hx-cta-tile:nth-child(3) {
    height: 68px;
    width: 68px;
  }
}

@media (max-width: 420px) {
  .hx-store {
    font-size: 15px;
    gap: 8px;
    padding: 0 8px;
  }

  .home-page .nav a {
    font-size: 13px;
  }
}

@media (max-width: 359px) {
  .home-page .nav {
    display: none;
  }

  .home-page .brand > span {
    display: none;
  }

  .home-page .site-header {
    grid-template-columns: auto 1fr;
  }
}

@media (max-width: 340px) {
  .hx-stores {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion: no smooth page scrolling (styles.css sets it for all pages) and no moving hover states. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hx-chevron,
  .hx-store,
  .hx-teaser-cta {
    transition: none;
  }
}

/* Arabic script needs a little more size than Latin at small, heavy weights. */
.home-page:lang(ar) .hx-label {
  font-size: 13px;
  letter-spacing: 0;
}

.home-page:lang(ar) .hx-more summary,
.home-page:lang(ar) .nav a {
  font-size: 15px;
}

.home-page:lang(ar) .hx-mock .hx-label {
  font-size: 10px;
}
