/* YONO Rummy 888 — paper-and-ink surface, condensed scoreboard type, ruby accent.
 * Mobile-first; tested at 320, 347, 390, 430 + desktop 1024, 1280, 1440, 1920. */

@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/spectral-600.subset.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/spectral-700.subset.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/worksans-400.subset.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/worksans-600.subset.woff2") format("woff2");
}

:root {
  --paper:        #FAF7F2;
  --paper-deep:   #F2EEE6;
  --surface:      #FFFFFF;
  --surface-2:    #F7F4EE;
  --ink:          #1A1418;
  --ink-2:        #4A3F45;
  --ink-3:        #6B6066;
  --line:         #E3DCCF;
  --line-2:       #D7CFBE;
  --silver:       #A9B0BA;
  --silver-deep:  #6E7682;
  --silver-faint: #DDE2E8;
  --ruby:         #C8245C;
  --ruby-deep:    #8C0F3F;
  --ruby-soft:    rgba(200, 36, 92, 0.10);
  --ruby-border:  rgba(200, 36, 92, 0.25);
  --gold-faint:   rgba(200, 167, 99, 0.20);

  --r-card: 14px;
  --r-rail: 16px;
  --r-pill: 999px;

  --shadow-1: 0 1px 0 rgba(26, 20, 24, 0.04);
  --shadow-2: 0 4px 14px rgba(26, 20, 24, 0.06);
  --shadow-3: 0 12px 32px rgba(26, 20, 24, 0.08);

  --font-display: "Spectral", Georgia, "Times New Roman", serif;
  --font-body:    "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --header-h: 64px;
  --cta-bar-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
img { color: transparent; }

a {
  color: var(--ruby-deep);
  text-decoration: none;
  text-underline-offset: 2px;
}
a:hover { text-decoration: underline; }

p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); margin: 0 0 .5em; line-height: 1.18; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
h2 { font-size: clamp(22px, 2.4vw, 30px); }
h3 { font-size: clamp(18px, 1.6vw, 22px); }
h4 { font-size: 17px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }

ul, ol { padding-left: 1.2em; margin: 0 0 1em; }

button { font: inherit; cursor: pointer; }

/* ===========================
 * HEADER
 * =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  max-width: 1280px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  flex: 0 0 auto;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 0.01em; white-space: nowrap; }
.brand-tag  { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }

.primary-nav {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 22px;
}
.primary-nav a {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.primary-nav a:hover { color: var(--ruby-deep); text-decoration: none; }
.header-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--ruby);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid var(--ruby-deep);
}
.header-cta:hover { background: var(--ruby-deep); text-decoration: none; }

.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin-left: auto;
  position: relative;
  z-index: 300;
  padding: 0 11px;
  flex: 0 0 auto;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-drawer {
  position: fixed;
  top: var(--header-h, 64px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: rgba(20, 14, 18, 0.45);
  display: none;
  pointer-events: none;
}
.mobile-drawer[data-open="true"] { display: block; pointer-events: auto; }
.mobile-drawer-inner {
  position: absolute;
  top: 0; right: 0;
  width: min(86vw, 360px);
  height: 100%;
  max-height: 100dvh;
  background: var(--surface);
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-3);
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
}
.mobile-drawer[data-open="true"] .mobile-drawer-inner { transform: translateX(0); }
.drawer-close {
  align-self: flex-end;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: -4px -8px 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.drawer-close:hover,
.drawer-close:focus-visible {
  background: var(--surface-2);
  outline: 2px solid var(--ruby);
  outline-offset: 2px;
}
.mobile-drawer nav { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.mobile-drawer nav a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.mobile-drawer .drawer-cta {
  margin-top: 18px;
  display: block;
  text-align: center;
  padding: 14px 18px;
  background: var(--ruby);
  color: #fff;
  border-radius: var(--r-pill);
  font-weight: 600;
}
.mobile-drawer .drawer-foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 13px;
  color: var(--ink-3);
}
.mobile-drawer .drawer-foot a { color: var(--ink-3); border: 0; padding: 0; }

/* ===========================
 * LAYOUT CONTAINERS
 * =========================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.section { padding: 56px 0; }
.section-tight { padding: 36px 0; }
.section-deep { background: var(--paper-deep); }
.section-band { background: var(--surface-2); }
.section-ruled { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ruby-deep);
  font-weight: 600;
  margin-bottom: 12px;
}

.lead { font-size: clamp(16px, 1.4vw, 18px); color: var(--ink-2); line-height: 1.55; max-width: 64ch; }
.muted { color: var(--ink-3); }

.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ===========================
 * BRAND APP PROFILE
 * =========================== */
.brand-profile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-top: 36px;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}
.brand-identity {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
}
.brand-identity > div { min-width: 0; flex: 1 1 auto; }
.brand-identity .brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex: 0 0 auto;
}
.brand-identity h1 {
  font-size: clamp(24px, 6.4vw, 38px);
  margin: 4px 0 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.brand-identity .lead {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.brand-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--ink-3);
  min-width: 0;
  max-width: 100%;
}
.brand-meta span { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.brand-meta .dot { width: 4px; height: 4px; background: var(--silver); border-radius: 999px; flex: 0 0 auto; }

.facts-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
}
.fact-cell {
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.fact-cell .label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.fact-cell .value { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.install-action {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
  min-height: 48px;
}
.btn-primary {
  background: var(--ruby);
  color: #fff;
  border-color: var(--ruby-deep);
}
.btn-primary:hover { background: var(--ruby-deep); text-decoration: none; }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink-3); text-decoration: none; }
.btn-block { width: 100%; }

.install-action small { color: var(--ink-3); font-size: 12px; }

/* Screenshot rail */
.screenshot-rail {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-rail);
  padding: 18px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  max-width: 100%;
  min-width: 0;
  width: 100%;
  overscroll-behavior-x: contain;
}
.screenshot-rail::-webkit-scrollbar { display: none; }
.screenshot-rail .rail-track {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
  max-width: none;
}
.shot-card {
  flex: 0 0 auto;
  width: min(148px, 42vw);
  aspect-ratio: 9 / 16;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}
.shot-card .frame {
  flex: 1;
  background: linear-gradient(160deg, #2a1a2a, #4a2a40 70%, #c8245c);
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.shot-card .frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: 100%;
}
.shot-card .frame::before {
  content: "";
  position: absolute;
  inset: 12px 12px auto 12px;
  height: 28px;
  background: rgba(255,255,255,0.16);
  border-radius: 8px;
}
.shot-card .frame::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 32px;
  transform: translateX(-50%);
  width: 60%;
  height: 56%;
  background: radial-gradient(circle, rgba(255,215,0,0.45), rgba(255,255,255,0.06) 60%, transparent 70%);
}
.shot-card .caption {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
  border-top: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Overview + features */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px;
}
.feature-card .icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ruby-soft);
  color: var(--ruby-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-weight: 700;
  font-family: var(--font-display);
}
.feature-card h3 { font-size: 16px; margin: 0 0 6px; }
.feature-card p { font-size: 14px; color: var(--ink-2); margin: 0; }

/* Install steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 18px 18px 64px;
  counter-increment: step;
  min-width: 0;
}
.step::before {
  content: counter(step);
  position: absolute;
  left: 16px; top: 18px;
  width: 36px; height: 36px;
  background: var(--ruby);
  color: #fff;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}
.step h3 { font-size: 16px; margin: 0 0 6px; }
.step p { font-size: 14px; color: var(--ink-2); margin: 0; }

.troubleshoot {
  margin-top: 18px;
  background: var(--surface);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-card);
  padding: 18px;
}
.troubleshoot h3 { font-size: 16px; }
.troubleshoot ul { padding-left: 1.1em; margin: 0; }
.troubleshoot li { margin-bottom: 6px; font-size: 14px; color: var(--ink-2); }

/* HOT shelf */
.hot-shelf {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 8px;
}
.hot-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.hot-card:hover { border-color: var(--ruby-border); text-decoration: none; }
.hot-card .art {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(160deg, #2a1a2a, #c8245c);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.hot-card[data-hot-category="fantasy"] .art { background: linear-gradient(160deg, #0d2e4f, #4ea3ff); }
.hot-card[data-hot-category="rummy"]   .art { background: linear-gradient(160deg, #4a0f3f, #c8245c); }
.hot-card[data-hot-category="sports"]  .art { background: linear-gradient(160deg, #133b1f, #46a05a); }
.hot-card[data-hot-category="games"]   .art { background: linear-gradient(160deg, #2a1a2a, #c8245c); }
.hot-card .art .ball { width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #f8f8f8, #d8d8d8 40%, #a8a8a8 80%); box-shadow: 0 6px 14px rgba(0,0,0,0.25); }
.hot-card .label { font-size: 14px; font-weight: 700; color: var(--ink); }
.hot-card .desc  { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.hot-card .action { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--ruby-deep); white-space: nowrap; }

/* App row (used in /app/ and homepage mixed directory preview) */
.app-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.app-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  min-width: 0;
}
.app-row .icon {
  width: 56px; height: 56px; border-radius: 12px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--ink-2);
}
.app-row .icon img { width: 100%; height: 100%; object-fit: cover; }
/* .info is a <span>: it must be block-level for min-width:0 and the child
   ellipsis rules below to apply, otherwise long provider strings paint past
   the row edge and push document scrollWidth beyond the viewport. */
.app-row .info { display: block; min-width: 0; max-width: 100%; }
.app-row .info .name { display: block; max-width: 100%; font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-row .info .meta { display: block; max-width: 100%; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-row .row-cta {
  padding: 8px 14px; font-size: 13px; font-weight: 600;
  background: var(--ruby); color: #fff; border-radius: var(--r-pill); border: 1px solid var(--ruby-deep);
  text-decoration: none; white-space: nowrap;
}
.app-row .row-cta:hover { background: var(--ruby-deep); text-decoration: none; }
.app-row a.detail-link { color: var(--ink-2); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }

/* App directory controls */
.directory-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.directory-controls .search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.directory-controls .search input {
  border: 0; outline: 0; background: transparent;
  font: inherit; color: var(--ink); flex: 1 1 auto; min-width: 0;
}
.directory-controls .filter {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.directory-controls .filter button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500;
}
.directory-controls .filter button[aria-pressed="true"] {
  background: var(--ruby); color: #fff; border-color: var(--ruby-deep);
}
.result-count { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }

/* Promos/VIP/Code strip */
.strip-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.strip-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.strip-card h3 { font-size: 16px; margin: 0; }
.strip-card p { font-size: 13px; color: var(--ink-2); margin: 0; }
.strip-card a { margin-top: 6px; font-size: 13px; font-weight: 600; }

/* News card grid */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.news-card .thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(160deg, #1a1418, #4a2a40 70%, #c8245c);
  position: relative;
}
.news-card .thumb::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 70% 35%, rgba(255,215,0,0.35), transparent 45%),
    radial-gradient(circle at 25% 70%, rgba(255,255,255,0.18), transparent 50%);
}
.news-card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.news-card time { font-size: 12px; color: var(--ink-3); }
.news-card h3 { font-size: 16px; margin: 0; line-height: 1.3; }
.news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h3 a:hover { color: var(--ruby-deep); text-decoration: none; }
.news-card p { font-size: 13px; color: var(--ink-2); margin: 0; }

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 0;
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  position: relative;
  padding-right: 48px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 20px; font-weight: 400; color: var(--ruby-deep);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .answer {
  padding: 0 18px 18px;
  font-size: 14px;
  color: var(--ink-2);
}

/* Legal links strip */
.legal-strip {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  font-size: 13px; color: var(--ink-3);
}
.legal-strip a { color: var(--ink-2); padding: 4px 2px; min-height: 24px; display: inline-flex; align-items: center; }

.footer-bottom a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }

/* Inline prose links must not rely on color alone — WCAG 1.4.1 */
section p > a,
section li > a:not(.btn):not(.row-cta):not(.drawer-cta):not(.strip-card a),
section .lead > a,
.troubleshoot a,
.steps a,
.feature-card a,
.strip-card a,
.faq-grid a { text-decoration: underline; text-underline-offset: 2px; }
.legal-strip .cookie-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
}

/* ===========================
 * STICKY MOBILE BOTTOM CTA
 * =========================== */
.sticky-cta {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(140%) blur(6px);
  border-top: 1px solid var(--line);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
.sticky-cta .btn-primary {
  width: 100%;
  padding: 14px 22px;
  font-size: 15px;
}

/* ===========================
 * FOOTER
 * =========================== */
.site-footer {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  padding: 40px 0 96px;
  margin-top: 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.site-footer h4 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer ul a { color: var(--ink-2); font-size: 14px; }
.site-footer .footer-meta { font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
.site-footer .footer-bottom {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 12px; color: var(--ink-3);
}

/* ===========================
 * COOKIE BANNER
 * =========================== */
.cookie-panel {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--cta-bar-h, 0px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px 16px;
  z-index: 75;
  display: none;
  box-shadow: var(--shadow-3);
}
.cookie-panel[data-open="true"] { display: block; }
.cookie-panel h4 { font-size: 14px; margin: 0 0 6px; }
.cookie-panel p  { font-size: 12px; color: var(--ink-2); margin: 0 0 10px; }
.cookie-panel .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-panel button { padding: 8px 14px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.cookie-panel .accept { background: var(--ruby); color: #fff; border-color: var(--ruby-deep); }
.cookie-panel .accept:hover { background: var(--ruby-deep); }

/* ===========================
 * PROSE PAGES (legal, faq, etc.)
 * =========================== */
.prose-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 16px 80px;
}
.prose-page h1 { font-size: clamp(26px, 3.6vw, 34px); margin-bottom: 14px; }
.prose-page h2 { font-size: clamp(20px, 2.2vw, 26px); margin-top: 28px; }
.prose-page p, .prose-page li { font-size: 15px; color: var(--ink-2); }
.prose-page .updated { font-size: 12px; color: var(--ink-3); margin-bottom: 18px; }
.prose-page .crumb {
  display: inline-block; font-size: 12px; color: var(--ink-3); margin-bottom: 14px;
}

/* Game detail page */
.game-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-top: 28px;
}
.game-art {
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-rail);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.game-art img { width: 100%; height: 100%; object-fit: cover; }
.game-meta-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px;
}
.game-meta-card .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.game-meta-card .row:last-child { border-bottom: 0; }
.game-meta-card .row .k { color: var(--ink-3); }
.game-meta-card .row .v { color: var(--ink); font-weight: 600; }

/* ===========================
 * RESPONSIVE BREAKS
 * =========================== */
@media (min-width: 600px) {
  .hot-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .directory-controls { grid-template-columns: 1fr auto; align-items: center; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .overview-grid { grid-template-columns: 2fr 1fr; }
  .game-detail-grid { grid-template-columns: 1.2fr 1fr; }
}

@media (min-width: 900px) {
  .hot-shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brand-profile { grid-template-columns: 1.4fr 1fr; gap: 36px; padding-top: 48px; align-items: start; }
  .brand-profile .screenshot-rail { grid-column: 1 / -1; margin-top: 8px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  .primary-nav { display: inline-flex; }
  .hamburger { display: none; }
  .header-cta { margin-left: 0; }
  .brand-profile { padding-top: 56px; }
}

@media (max-width: 1023px) {
  .sticky-cta { display: block; }
  /* give body padding so footer + sticky cta don't overlap */
  body { padding-bottom: var(--cta-bar-h); }
}

/* utility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -40px; left: 8px;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px;
  font-size: 13px; z-index: 100;
}
.skip-link:focus { top: 8px; }
.no-wrap { white-space: nowrap; }
.text-center { text-align: center; }
.row-gap-sm > * + * { margin-top: 8px; }
.row-gap-md > * + * { margin-top: 16px; }
.flex-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hidden { display: none !important; }

/* ensure no horizontal overflow on small screens */
.container, .section, .header-row, .brand-profile, .hot-shelf, .news-grid, .strip-3,
.overview-grid, .feature-grid, .app-list, .facts-strip, .main, main, .prose-page {
  min-width: 0;
  max-width: 100%;
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
img, svg, video, iframe {
  max-width: 100%;
  height: auto;
}

/* page chrome scroll-margin for sticky header */
section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* Mobile overflow hard-cap (320–430px viewports) */
@media (max-width: 430px) {
  .brand-identity {
    flex-wrap: wrap;
    gap: 12px;
  }
  .brand-identity .brand-mark {
    width: 64px;
    height: 64px;
  }
  .brand-identity h1 {
    font-size: clamp(22px, 7vw, 28px);
    line-height: 1.15;
  }
  .brand-identity .lead {
    font-size: 15px;
  }
  .shot-card {
    width: min(132px, 40vw);
  }
  .screenshot-rail {
    padding: 14px 12px;
  }
  .header-row {
    padding: 0 12px;
    gap: 10px;
  }
  .container {
    padding: 0 12px;
  }
  .app-row .info .name,
  .app-row .info .meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 600px) {
  .shot-card {
    width: min(180px, 28vw);
  }
}
@media (min-width: 900px) {
  .shot-card {
    width: clamp(180px, 22vw, 240px);
  }
  .brand-identity .brand-mark {
    width: 96px;
    height: 96px;
    border-radius: 18px;
  }
}