/* latin-ext */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/bricolage-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/bricolage-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Playmoxi site styles. Tokens come from docs/DESIGN.md. fonts.css is joined in front of this file by build.py. */

:root {
  --night: #0F0D1C;
  --deck: #1A1730;
  --deck-2: #242040;
  --line: #2E2A4D;
  --line-strong: #3A3560;
  --lime: #C8F547;
  --lime-hover: #E2FF8A;
  --violet: #8B6CFF;
  --chalk: #F5F3FF;
  --text-2: #D6D1EC;
  --muted: #B4AECF;
  --on-lime: #0F0D1C;
  --tabbar: #14122A;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;

  --r-pill: 999px;
  --r-card: 18px;
  --r-card-lg: 24px;
  --r-input: 12px;
  --r-thumb: 10px;

  --page-max: 1280px;
  --gutter: 32px;
  --section-gap: 56px;
}

@media (max-width: 767px) {
  :root { --gutter: 16px; --section-gap: 28px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--lime); text-decoration: none; }
a:hover { color: var(--lime-hover); }

img, svg { display: block; }
button, input, select { font: inherit; color: inherit; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; }

:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }

[hidden] { display: none !important; }

/* Parts that exist in only one layout (desktop / phone swap at 768px) */
@media (max-width: 767px) { .only-desktop { display: none !important; } }
@media (min-width: 768px) { .only-phone { display: none !important; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--chalk); }
.logo:hover { color: var(--chalk); }
.wordmark { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.wordmark span { color: var(--lime); }
.logo-header .wordmark { font-size: 26px; }
.logo-phone { gap: 8px; }
.logo-phone .wordmark { font-size: 22px; }
.logo-footer .wordmark { font-size: 20px; }

/* ---------- Header ---------- */
.hd { border-bottom: 1px solid var(--line); background: var(--night); }
.hd-desktop { padding-top: 16px; padding-bottom: 16px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hd-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.hd-nav a { color: var(--muted); font-weight: 500; padding: 8px 14px; border-radius: var(--r-pill); }
.hd-nav a:hover { color: var(--chalk); }
.hd-nav a[aria-current="page"] { color: var(--chalk); font-weight: 600; background: var(--deck-2); }
.hd-tools { flex: 1 1 240px; display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.search-pill {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; flex: 0 1 320px;
  background: var(--deck); border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--muted);
}
.search-pill:focus-within { border-color: var(--lime); }
.search-pill input { background: transparent; border: 0; outline: none; color: var(--chalk); width: 100%; min-width: 0; }
.search-pill input::placeholder { color: var(--muted); }
.hd-app {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; white-space: nowrap;
  border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--chalk); font-weight: 600;
}
.hd-app:hover { color: var(--chalk); border-color: var(--line-strong); background: var(--deck); }
.hd-phone { display: none; align-items: center; justify-content: space-between; padding: 14px 16px; }
.btn-round {
  width: 44px; height: 44px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--deck);
  display: grid; place-items: center; color: var(--chalk);
}
.btn-round:hover { color: var(--chalk); border-color: var(--line-strong); }
.hd.is-demo .hd-phone { display: flex; }
@media (max-width: 767px) {
  .hd-desktop { display: none; }
  .hd-phone { display: flex; }
}

/* ---------- Main and footer ---------- */
.main { padding-top: 32px; display: flex; flex-direction: column; gap: var(--section-gap); }
@media (max-width: 767px) { .main { padding-top: 16px; } }
.ft { margin-top: 64px; border-top: 1px solid var(--line); }
.ft-inner { padding-top: 32px; padding-bottom: 32px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.ft-brand { display: flex; align-items: center; gap: 10px; }
.ft-tag { color: var(--muted); font-size: 14px; margin-left: 8px; }
.ft-nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.ft-nav a { color: var(--text-2); }
.ft-nav a:hover { color: var(--lime-hover); }
.ft-copy { color: var(--muted); font-size: 13px; }
@media (max-width: 767px) {
  .ft { margin-top: 40px; }
  .ft-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ft-nav { row-gap: 0; }
  .ft-nav a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- Phone tab bar ---------- */
.tabbar {
  display: none; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line); background: var(--tabbar);
  padding: 6px 4px calc(10px + env(safe-area-inset-bottom));
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; min-height: 44px;
  color: var(--muted); font-size: 12px;
}
.tabbar a[aria-current="page"] { color: var(--lime); font-weight: 600; }
.tabbar.is-demo { display: grid; }
@media (max-width: 767px) {
  .tabbar { display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; }
  .tabbar.is-demo { position: static; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px;
  border-radius: var(--r-pill); cursor: pointer; white-space: nowrap;
}
.btn-primary { padding: 0 26px; border: 0; background: var(--lime); color: var(--on-lime); font-weight: 800; font-size: 17px; }
.btn-primary:hover { background: var(--lime-hover); color: var(--on-lime); }
.btn-secondary { padding: 0 22px; border: 1px solid var(--line-strong); background: var(--deck-2); color: var(--chalk); font-weight: 600; }
.btn-secondary:hover { color: var(--chalk); border-color: var(--muted); }
.btn-icon, .btn-tool {
  height: 44px; border-radius: var(--r-input); border: 1px solid var(--line); background: var(--deck-2);
  color: var(--chalk); cursor: pointer;
}
.btn-icon { width: 44px; display: grid; place-items: center; }
.btn-tool { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; font-weight: 600; }
.btn-icon:hover, .btn-tool:hover { border-color: var(--line-strong); }

/* ---------- Tags and chips ---------- */
.tag {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; line-height: 1.5;
  padding: 3px 9px; border-radius: var(--r-pill); color: var(--on-lime);
}
.tag-3d { background: var(--chalk); }
.tag-new, .tag-draft { background: var(--violet); }
.tag-featured { background: var(--lime); text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 10px; }
.tag-featured.tag-new { background: var(--violet); }  /* banner: "New for you", "Game of the day" */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 44px; padding: 0 18px; border-radius: var(--r-pill); cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); background: var(--deck); color: var(--chalk); font-weight: 500;
}
.chip:hover { border-color: var(--line-strong); }
a.chip { display: inline-flex; align-items: center; color: var(--chalk); }
a.chip:hover { color: var(--chalk); }
.chip[aria-pressed="true"] { border-color: var(--lime); background: var(--lime); color: var(--on-lime); font-weight: 700; }
@media (max-width: 767px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chip { height: 40px; padding: 0 16px; }
}

/* ---------- Game card ---------- */
.card { display: flex; flex-direction: column; gap: 10px; color: var(--chalk); }
.card:hover { color: var(--chalk); }
.card:focus-visible { outline: none; }
.card-thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-card); overflow: hidden;
  background: var(--deck); border: 1px solid var(--line);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.card-play {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: var(--r-pill); background: var(--lime); color: var(--on-lime);
  display: grid; place-items: center; opacity: 0; transform: scale(0.85); transition: opacity .15s, transform .15s;
}
.card:hover .card-thumb, .card:focus-visible .card-thumb { outline: 3px solid var(--lime); outline-offset: 2px; }
/* the play triangle (PLAY_PATH in site/src/parts.py), drawn here once instead of in each of the many cards */
.card-play::before {
  content: ""; width: 20px; height: 20px; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4l13 8-13 8z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; transform: none; }
.card-name { font-weight: 600; font-size: 17px; line-height: 1.4; margin-bottom: -10px; }
.card-meta { color: var(--muted); font-size: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
@media (max-width: 767px) {
  .card { gap: 6px; }
  .card-thumb { border-radius: 14px; border: 0; }
  .card-name { font-size: 14px; margin-bottom: -6px; }
  .card-meta { font-size: 12px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
}
@media (prefers-reduced-motion: reduce) { .card-play { transition: none; } }

/* ---------- Ad slot (test placeholder) ---------- */
.ad { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ad-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ad-box {
  width: 100%; border-radius: var(--r-thumb); background: var(--deck); border: 1px dashed var(--line-strong);
  display: grid; place-items: center; color: var(--muted); font-size: 14px; text-align: center;
}
@media (max-width: 767px) {
  .ad { gap: 4px; }
  .ad-box { border-radius: 8px; font-size: 13px; }
}

/* ---------- Loading screen ---------- */
.loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--night); border: 1px solid var(--line); border-radius: 16px; aspect-ratio: 16 / 7; padding: 16px;
}
.loading-logo { display: flex; align-items: center; gap: 12px; }
.loading-logo .wordmark { font-size: 36px; }
.loading-bar { width: min(280px, 80%); height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.loading-bar span { display: block; height: 100%; background: var(--lime); border-radius: var(--r-pill); }
.loading-text { color: var(--muted); font-size: 13px; }

/* ---------- Home (Main.dc.html, MobileHome.dc.html) ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sec-title { font-weight: 700; font-size: 28px; line-height: 1.2; }
.sec-note { color: var(--muted); font-size: 14px; }

.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.feat-main, .feat-tile {
  position: relative; display: block; overflow: hidden; border-radius: var(--r-card-lg);
  background: var(--deck); color: var(--chalk);
}
.feat-main:hover, .feat-tile:hover { color: var(--chalk); }
.feat-tile:hover { outline: 3px solid var(--lime); outline-offset: 2px; }
.feat-main img, .feat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feat-main { grid-column: span 2; min-height: 460px; }
.feat-panel {
  position: absolute; left: 24px; right: 24px; bottom: 24px; max-width: 520px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  background: rgba(15, 13, 28, 0.86); border: 1px solid var(--line); border-radius: 20px;
}
.feat-panel .tag { align-self: flex-start; }
.feat-title { font-weight: 800; font-size: 48px; line-height: 1; letter-spacing: -0.02em; }
.feat-text { margin: 0; color: var(--text-2); font-size: 17px; }
.feat-cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.feat-cta .btn { font-weight: 700; }
.feat-main:hover .btn-primary { background: var(--lime-hover); }
.feat-line { color: var(--muted); font-size: 14px; }
.feat-side { display: flex; flex-direction: column; gap: 20px; }
.feat-tile { flex: 1; min-height: 220px; }
.feat-label {
  position: absolute; left: 16px; bottom: 16px; padding: 10px 14px; border-radius: 14px;
  background: rgba(15, 13, 28, 0.86);
}
.feat-label-name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.1; }
.feat-label-line { display: block; color: var(--muted); font-size: 13px; }
/* Tablet widths: the featured banner fills the row, the two tiles sit side by side under it */
@media (min-width: 768px) and (max-width: 1087px) {
  .feat-side { grid-column: 1 / -1; flex-direction: row; }
}

.cont { display: flex; flex-direction: column; gap: 16px; }
/* 3 per row at most, so names fit on one line (Tayyab, 15 Nov 2026; the design had room for 4) */
.cont-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.cont-item {
  display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r-card);
  background: var(--deck); border: 1px solid var(--line); color: var(--chalk);
}
.cont-item:hover { color: var(--chalk); border-color: var(--lime); }
.cont-item img { width: 112px; height: 63px; object-fit: cover; border-radius: var(--r-thumb); flex: none; }
.cont-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cont-name { font-weight: 600; }
.cont-progress { color: var(--muted); font-size: 13px; }
.cont-play {
  width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--lime); color: var(--on-lime);
  display: grid; place-items: center; flex: none;
}

.soon {
  aspect-ratio: 16 / 9; border-radius: var(--r-card); border: 2px dashed var(--line-strong); padding: 16px;
  display: grid; place-items: center; text-align: center; color: var(--muted); font-weight: 600;
}
.soon svg { margin: 0 auto 4px; }

/* Home rows for many games (Story G2.2): title, See all, arrows on desktop; cards scroll sideways.
   Desktop shows 4 cards at a time (3 on tablets); phones show 2 and a bit, so the next card peeks in. */
.shelf { display: flex; flex-direction: column; gap: 16px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.shelf-head .sec-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.shelf-count { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: var(--muted); white-space: nowrap; }
.shelf-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.see-all { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 6px; font-weight: 600; }
.shelf-arrow {
  width: 44px; height: 44px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--deck);
  display: grid; place-items: center; color: var(--chalk); cursor: pointer;
}
.shelf-arrow:hover { border-color: var(--line-strong); }
.shelf-arrow:disabled { color: var(--line-strong); cursor: default; border-color: var(--line); }
.shelf-track {
  --shelf-gap: 20px;
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--shelf-gap)) / 4); gap: var(--shelf-gap);
  position: relative; /* keeps the hidden "Racing games" text of See all inside the row, not past the page edge */
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  /* room for the lime hover ring, which the scrolling box would otherwise cut off */
  margin: -6px; padding: 6px; scroll-padding: 0 6px;
}
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track > * { scroll-snap-align: start; min-width: 0; }
.shelf-more, .shelf-soon { display: flex; flex-direction: column; color: var(--muted); }
.shelf-more-box, .shelf-soon-box {
  aspect-ratio: 16 / 9; border-radius: var(--r-card); border: 2px dashed var(--line-strong); padding: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; font-weight: 600;
}
.shelf-more-box { border: 1px solid var(--line); background: var(--deck); color: var(--lime); }
.shelf-more:hover .shelf-more-box { outline: 3px solid var(--lime); outline-offset: 2px; color: var(--lime); }
.shelf-soon:hover { color: var(--chalk); }
.shelf-soon:hover .shelf-soon-box { border-color: var(--muted); }
.shelf-soon-box svg { color: var(--lime); }
@media (min-width: 768px) and (max-width: 1087px) {
  .shelf-track { grid-auto-columns: calc((100% - 2 * var(--shelf-gap)) / 3); }
}
@media (prefers-reduced-motion: reduce) { .shelf-track { scroll-behavior: auto; } }

.app-band {
  border-radius: 28px; background: var(--lime); color: var(--on-lime); padding: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.app-copy { max-width: 620px; }
.app-band h2 { margin-bottom: 8px; font-weight: 800; font-size: 36px; line-height: 1.05; }
.app-band p { margin: 0; font-size: 17px; color: #26301A; }
.app-pill {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px;
  border-radius: var(--r-pill); background: var(--night); color: var(--chalk); font-weight: 700;
}

@media (max-width: 767px) {
  .sec-title { font-size: 22px; }

  .feat { display: block; }
  .feat-main { min-height: 0; border: 1px solid var(--line); border-radius: 22px; }
  .feat-main img { position: static; aspect-ratio: 16 / 9; height: auto; }
  .feat-panel {
    position: static; max-width: none; padding: 16px; gap: 8px; background: none; border: 0; border-radius: 0;
  }
  .feat-panel .tag { font-size: 11px; padding: 3px 9px; }
  .feat-title { font-size: 30px; line-height: 1.05; letter-spacing: 0; }
  .feat-text { font-size: 15px; }
  .feat-cta { margin-top: 6px; }
  .feat-cta .btn { width: 100%; font-weight: 800; }

  .cont { gap: 12px; }
  .cont-list {
    display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter);
  }
  .cont-item {
    flex: 0 0 150px; flex-direction: column; align-items: stretch; gap: 6px;
    padding: 0; background: none; border: 0; border-radius: 0;
  }
  .cont-item img { width: 150px; height: 84px; border-radius: 12px; }
  .cont-name { font-size: 14px; }
  .cont-progress { font-size: 12px; margin-top: -2px; }
  .cont-play { display: none; }

  .soon { border-radius: 14px; font-size: 13px; }

  .shelf { gap: 12px; }
  .shelf-head .sec-title { gap: 8px; }
  .shelf-count { font-size: 13px; }
  .see-all { margin-right: -6px; }
  .shelf-track {
    --shelf-gap: 12px; grid-auto-columns: 42%;
    margin: -6px calc(-1 * var(--gutter)); padding: 6px var(--gutter); scroll-padding: 0 var(--gutter);
  }
  .shelf-more-box, .shelf-soon-box { border-radius: 14px; font-size: 13px; padding: 8px; }
  .shelf-more-box svg, .shelf-soon-box svg { width: 24px; height: 24px; }

  .app-band { border-radius: 22px; padding: 22px; flex-direction: column; align-items: stretch; gap: 8px; }
  .app-band h2 { margin: 0; font-size: 24px; line-height: 1.1; }
  .app-band p { font-size: 15px; }
}

/* ---------- Game page (Game.dc.html, MobileGame.dc.html) ---------- */
.main-game { padding-top: 20px; gap: 40px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--lime-hover); }
.crumbs [aria-current] { color: var(--chalk); }

.gp { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.gp-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gp-stage {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-card-lg); overflow: hidden;
  background: var(--deck); border: 1px solid var(--line);
}
.gp-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gp-cover {
  position: absolute; inset: 0; background: rgba(15, 13, 28, 0.62); padding: 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.gp-title { font-weight: 800; font-size: 52px; line-height: 1; letter-spacing: -0.02em; }
.gp-play { height: 64px; padding: 0 36px; gap: 12px; font-size: 20px; }
.gp-note { color: var(--text-2); font-size: 14px; }
.gp-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.gp-stage.is-playing > img, .gp-stage.is-playing .gp-cover { display: none; }

.gp-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--deck); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 12px 10px 18px;
}
.gp-id { display: flex; align-items: center; gap: 12px; }
.gp-id img { width: 44px; height: 44px; border-radius: var(--r-thumb); object-fit: cover; }
.gp-id-name { font-weight: 700; }
.gp-id-meta { color: var(--muted); font-size: 13px; }
.gp-tools { display: flex; gap: 8px; }

.gp-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 8px; }
.gp-box {
  background: var(--deck); border: 1px solid var(--line); border-radius: 20px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.gp-box h2 { font-size: 22px; line-height: 1.3; }
.gp-box p { margin: 0; color: var(--text-2); }
.gp-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.gp-tags span, .gp-tags a { font-size: 13px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--deck-2); color: var(--text-2); }
.gp-tags a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.gp-tags a:hover { color: var(--chalk); text-decoration-color: var(--lime); }
/* The home's one heading: a quiet line above the banner that says what the site is (docs/SEO-PLAN.md §6.4) */
.home-h1 { font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--muted); margin: -8px 0 -16px; }
@media (max-width: 767px) { .home-h1 { font-size: 13px; margin: -4px 0 -10px; } }
.keys-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; margin-top: 2px; }
.keys { display: flex; gap: 6px; flex-wrap: wrap; }
kbd {
  min-width: 32px; height: 32px; padding: 0 8px; display: inline-grid; place-items: center; white-space: nowrap;
  border-radius: 8px; background: var(--chalk); color: var(--on-lime); font: 700 14px var(--font-body);
}
.keys-label { color: var(--text-2); }
.gp-box .gp-touch { color: var(--muted); font-size: 14px; }
/* The guide under the game (docs/SEO-PLAN.md Epic S2): one Deck box on phone and computer */
.gp-guide { gap: 20px; }
.guide-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px 28px; }
.guide-part { display: flex; flex-direction: column; gap: 10px; }
.guide-part h3 { font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--chalk); }
.guide-part ol, .guide-part ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.guide-part li::marker { color: var(--lime); font-weight: 700; }
.faqs { display: flex; flex-direction: column; }
.faq { border-top: 1px solid var(--line); }
.faq:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  min-height: 48px; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; list-style: none; font-weight: 600; color: var(--chalk);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; color: var(--muted); transition: transform 0.2s; }
.faq[open] summary svg { transform: rotate(180deg); }
.faq summary:hover { color: var(--lime-hover); }
.faq p { padding: 0 0 14px; }

.gp-side { flex: 1 1 300px; max-width: 336px; display: flex; flex-direction: column; gap: 20px; }
.gp-side .ad-box { border-radius: 14px; }
.gp-up { display: flex; flex-direction: column; gap: 12px; }
.gp-up h2 { font-size: 20px; line-height: 1.3; }
.gp-next {
  display: flex; gap: 12px; align-items: center; color: var(--chalk); padding: 8px;
  border-radius: 14px; background: var(--deck); border: 1px solid transparent;
}
.gp-next:hover { color: var(--chalk); border-color: var(--lime); }
.gp-next img { width: 96px; height: 54px; border-radius: var(--r-thumb); object-fit: cover; flex: none; }
.gp-next-name { display: block; font-weight: 600; }
.gp-next-meta { display: block; color: var(--muted); font-size: 13px; }

.gp-more { display: flex; flex-direction: column; gap: 16px; }
.gp-stage:fullscreen { border: 0; border-radius: 0; }
[data-sound] .snd-off, [data-sound].is-off .snd-on { display: none; }
[data-sound].is-off .snd-off { display: block; }
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 300;
  padding: 12px 20px; border-radius: var(--r-pill); background: var(--deck-2); border: 1px solid var(--line-strong);
  color: var(--chalk); font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Phone game page (MobileGame.dc.html) and the full-screen player (MobilePlay.dc.html) */
body.is-playing { overflow: hidden; }
@media (max-width: 767px) {
  body.no-tabs { padding-bottom: env(safe-area-inset-bottom); }
  .hd-game { justify-content: flex-start; gap: 8px; padding: 10px 12px; }
  .hd-back, .hd-share {
    width: 44px; height: 44px; border-radius: var(--r-pill); display: grid; place-items: center; flex: none;
    color: var(--chalk); background: transparent; border: 0; cursor: pointer;
  }
  .hd-back:hover { color: var(--chalk); }
  .hd-game-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .main-game { padding-top: 0; gap: 22px; }
  .gp, .gp-main { gap: 22px; }
  .gp-hero { width: calc(100% + 2 * var(--gutter)); max-width: none; margin: 0 calc(-1 * var(--gutter)) -4px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
  .gp-intro { display: flex; flex-direction: column; gap: 10px; }
  .gp-intro .gp-title { font-size: 32px; line-height: 1.05; letter-spacing: 0; }
  .gp-meta { color: var(--muted); font-size: 14px; }
  .gp-intro .gp-play { margin-top: 6px; width: 100%; height: 56px; gap: 10px; font-size: 18px; }
  .gp-hint {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px;
    background: var(--deck); border: 1px solid var(--line); color: var(--lime);
  }
  .gp-hint svg { flex: none; }
  .gp-hint span { color: var(--text-2); font-size: 14px; }
  .gp-psec { display: flex; flex-direction: column; gap: 8px; }
  .gp-psec + .gp-psec { gap: 10px; }
  .gp-psec h2 { font-size: 20px; line-height: 1.3; }
  .gp-psec p { margin: 0; color: var(--text-2); font-size: 15px; }
  .gp-psec .gp-pnote { color: var(--muted); font-size: 13px; }
  .gp-guide { padding: 18px; gap: 16px; border-radius: var(--r-card); }
  .gp-guide h2 { font-size: 20px; }
  .guide-part, .guide-part p { font-size: 15px; }
  .tt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .tt {
    background: var(--deck); border: 1px solid var(--line); border-radius: 14px; padding: 12px;
    display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  }
  .tt-icon { width: 40px; height: 40px; border-radius: var(--r-thumb); display: grid; place-items: center; }
  .tt-round { border-radius: var(--r-pill); }
  .tt-label { font-size: 13px; color: var(--text-2); line-height: 1.35; }

  .gp-more { gap: 12px; }
  .gp-more h2 { font-size: 20px; }
  .gp-more .card:nth-child(n+3) { display: none; }
}
/* The bar has its own strip beside the game, so it never covers the game's buttons (Tayyab, 15 Nov 2026):
   a strip at the top when the phone is upright, a column on the left when it is sideways.
   The padding keeps the game clear of the iPhone notch and home bar. */
.pf {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; background: var(--night);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.pf[hidden] { display: none; }
.pf-stage { flex: 1; position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.pf.is-boxed .gp-frame { transform-origin: 0 0; }
.pf-turn {
  position: absolute; left: 16px; right: 16px; bottom: 24px; margin: 0; text-align: center;
  color: var(--muted); font-size: 14px;
}
.pf-bar { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
@media (orientation: landscape) {
  .pf { flex-direction: row; }
  .pf-bar { flex-direction: column; padding: 8px 6px; border-bottom: 0; border-right: 1px solid var(--line); }
}
.pf-btn {
  width: 44px; height: 44px; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--chalk);
  display: grid; place-items: center; cursor: pointer;
}
.pf-rotate { position: absolute; inset: 0; z-index: 2; background: var(--night); overflow: hidden; }
.pf-rotate > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.25; }
.pf-rotate-inner {
  position: absolute; inset: 0; padding: 32px; text-align: center; font-size: 15px; line-height: 1.45;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
}
.pf-rotate-title { font-weight: 800; font-size: 32px; line-height: 1.1; }
.pf-rotate p { margin: 0; color: var(--text-2); }
.pf-anyway {
  height: 44px; padding: 0 14px; border: 0; background: transparent; cursor: pointer;
  color: var(--lime); font-weight: 600; display: inline-flex; align-items: center;
}
.pf-anyway:hover { color: var(--lime-hover); }

/* Narrow desktop, tablet and phone held sideways: keep the search box usable; "Get the app" shows just its icon.
   Up to 1199px since the header has 5 categories (G2.1) */
@media (min-width: 768px) and (max-width: 1199px) {
  .hd-desktop { gap: 20px; }
  .search-pill { min-width: 150px; }
  .hd-app { width: 44px; padding: 0; justify-content: center; }
  .hd-app-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Phone held sideways (short touch screen): the game picture and Play fit on the first screen */
@media (min-width: 768px) and (max-height: 500px) and (pointer: coarse) {
  .main-game { padding-top: 12px; }
  .main-game .crumbs { display: none; }
  .gp-stage { aspect-ratio: auto; height: calc(100vh - 100px); height: calc(100svh - 100px); min-height: 220px; }
  .gp-cover { gap: 12px; padding: 16px; }
  .gp-title { font-size: 36px; }
  .gp-play { height: 56px; padding: 0 30px; font-size: 18px; }
}


/* Phone held sideways, phone layout (narrower than 768px, e.g. 667x375): the home's Featured picture and its text side
   by side, and the game page's picture shorter, so the name and Play are on the first screen (Tayyab, 22 Nov 2026) */
@media (max-width: 767px) and (orientation: landscape) and (max-height: 500px) {
  .feat-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .feat-main img { height: 100%; aspect-ratio: auto; min-height: 190px; object-fit: cover; }
  .feat-title { font-size: 26px; }
  .feat-text { font-size: 14px; }
  .gp-hero { aspect-ratio: auto; height: calc(100svh - 230px); min-height: 120px; }
  .main-game, .gp, .gp-main { gap: 16px; }
  .gp-intro .gp-title { font-size: 28px; }
  /* the tab bar: icon and word side by side, so it takes less of the short screen */
  .tabbar { padding: 2px 4px calc(2px + env(safe-area-inset-bottom)); }
  .tabbar a { flex-direction: row; justify-content: center; gap: 8px; font-size: 13px; }
  body { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
  .hd-phone { padding-top: 8px; padding-bottom: 8px; }
}

/* Phone held sideways, desktop layout (768px or wider but short, e.g. 812x375): a shorter Featured banner */
@media (min-width: 768px) and (max-height: 500px) and (pointer: coarse) {
  .feat-main { min-height: 300px; }
  .feat-panel { left: 16px; bottom: 16px; padding: 16px 18px; gap: 8px; max-width: 460px; }
  .feat-title { font-size: 34px; }
  .feat-text { font-size: 15px; }
  /* the shorter phone words: the longest desktop ones (Beakerlight) did not fit the short banner */
  .feat-text .only-desktop { display: none !important; }
  .feat-text .only-phone { display: inline !important; }
  .feat-tile { min-height: 160px; }
}

/* ---------- Category page (Category.dc.html) ---------- */
.pg-title { font-weight: 800; font-size: 48px; line-height: 1.05; letter-spacing: -0.02em; }
.main-list { gap: 40px; }
.cat-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-top: -8px; }
.cat-intro { display: flex; flex-direction: column; gap: 8px; }
.cat-blurb { margin: 0; color: var(--text-2); font-size: 18px; max-width: 680px; }
.sort { position: relative; display: flex; align-items: center; gap: 10px; }
.sort-label { color: var(--muted); font-size: 14px; }
.sort-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 16px; min-width: 150px;
  justify-content: space-between; border-radius: var(--r-input); border: 1px solid var(--line);
  background: var(--deck); color: var(--chalk); font: inherit; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.sort-btn svg { color: var(--muted); transition: transform 0.15s; }
.sort-btn:hover, .sort.is-open .sort-btn { border-color: var(--line-strong); background: var(--deck-2); }
.sort.is-open .sort-btn svg { transform: rotate(180deg); }
.sort-list {
  position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: max-content;
  margin: 0; padding: 6px; list-style: none; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--deck); box-shadow: 0 16px 40px rgb(0 0 0 / 45%);
}
.sort-list:focus { outline: none; }
.sort-list:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.sort-option {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; color: var(--text-2); cursor: pointer;
}
.sort-option svg { color: var(--violet); visibility: hidden; }
.sort-option.is-active { background: var(--deck-2); color: var(--chalk); }
.sort-option[aria-selected="true"] { color: var(--chalk); font-weight: 600; }
.sort-option[aria-selected="true"] svg { visibility: visible; }
.cat-games { display: flex; flex-direction: column; gap: 14px; }
.load-more { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 18px; }
.cat-others { display: flex; flex-direction: column; gap: 16px; }
/* What a category or collection has, in words (docs/SEO-PLAN.md §6.2): a Deck box under the games */
.cat-text { max-width: 880px; }
.cat-text h2 { font-size: 22px; }
.cat-text .pills { margin-top: 4px; }
.cat-text p a { text-decoration: underline; text-underline-offset: 3px; }  /* links in text: not by colour alone */
.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.cat-card {
  display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 22px;
  background: var(--deck); border: 1px solid var(--line); color: var(--chalk);
}
.cat-card:hover { color: var(--chalk); border-color: var(--lime); }
.cat-card img, .cat-card .cat-art { width: 120px; height: 68px; border-radius: 12px; object-fit: cover; flex: none; }
/* Picture of a category with no games yet: its icon in lime on violet (category_picture in parts.py) */
.cat-art {
  display: grid; place-items: center; color: var(--lime);
  background: radial-gradient(circle at 70% 25%, rgba(139, 108, 255, 0.5), transparent 65%), var(--deck-2);
}
.cat-card .cat-art svg { width: 32px; height: 32px; }
.cat-card-name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.3; }
.cat-card-count { display: block; color: var(--muted); font-size: 14px; }
@media (max-width: 767px) {
  .main-list { gap: 28px; }
  .pg-title { font-size: 32px; }
  .cat-head { margin-top: 0; gap: 14px; }
  .cat-blurb { font-size: 15px; }
  .cat-games { gap: 10px; }
  .cat-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cat-card { padding: 12px; border-radius: 18px; }
  .cat-card img, .cat-card .cat-art { width: 104px; height: 58px; border-radius: var(--r-thumb); }
  .cat-card-name { font-size: 20px; }
}

/* ---------- Pills (search suggestions, recent searches, category links) ---------- */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--deck); color: var(--chalk);
}
.pill:hover { color: var(--chalk); border-color: var(--lime); }
.pill-big { height: 44px; padding: 0 18px; background: var(--night); }
@media (max-width: 767px) { .pill { padding: 0 14px; } }

/* ---------- Phone list rows (MRecent.dc.html, MSearch.dc.html) ---------- */
.rows { display: flex; flex-direction: column; gap: 12px; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px;
  background: var(--deck); color: var(--chalk); font-size: 15px; line-height: 1.45;
}
.row:hover { color: var(--chalk); }
.row img { width: 104px; height: 58px; border-radius: var(--r-thumb); object-fit: cover; flex: none; }
.row-text { flex: 1; min-width: 0; }
.row-name { display: block; font-weight: 600; }
.row-sub { display: block; color: var(--muted); font-size: 13px; }
.row-play {
  width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--lime); color: var(--on-lime);
  display: grid; place-items: center; flex: none;
}

/* ---------- Search (Search.dc.html, SearchEmpty.dc.html, MSearch.dc.html) ---------- */
.srch-top { display: flex; flex-direction: column; gap: 16px; }
.srch-label { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1.2; letter-spacing: -0.02em; }
.srch-box {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; width: 100%;
  background: var(--deck); border: 2px solid var(--lime); border-radius: 14px; color: var(--muted);
}
.srch-box input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--chalk); font-size: 17px; }
.srch-box input::placeholder { color: var(--muted); }
.srch-box input::-webkit-search-cancel-button { display: none; }
.srch-big { gap: 12px; height: 64px; padding: 0 10px 0 20px; max-width: 760px; border-radius: 18px; }
.srch-big input { font-size: 20px; }
.srch-clear {
  width: 44px; height: 44px; border: 0; border-radius: var(--r-pill); background: var(--deck-2); color: var(--chalk);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.srch-count { margin: 0; color: var(--muted); }
.srch-count strong { color: var(--chalk); }
.main-search { gap: 40px; }
.srch-results { display: flex; flex-direction: column; gap: 12px; }
.srch-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px;
  background: var(--deck); border: 1px solid var(--line); border-radius: 22px;
}
.srch-empty-icon { color: var(--violet); }
.srch-empty-icon svg { stroke-width: 1.8; }
.srch-empty h1 { font-size: 30px; line-height: 1.2; overflow-wrap: anywhere; }
.srch-empty p { margin: 0; color: var(--text-2); }
.srch-empty .pills { justify-content: center; margin-top: 8px; }
.srch-also, .srch-try { display: flex; flex-direction: column; gap: 16px; }
.srch-try { gap: 12px; }
.srch-recent { display: flex; flex-direction: column; gap: 12px; }
.srch-small-h { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--muted); }
@media (max-width: 767px) {
  .hd-search { display: block; }
  .main-search { gap: 24px; }
  .srch-results .sec-note { font-size: 13px; }
  .srch-empty { padding: 32px 20px; }
  .srch-empty-icon svg { width: 44px; height: 44px; }
  .srch-empty h1 { font-size: 24px; }
  .srch-try .sec-title { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--muted); }
}

/* ---------- Phone tabs: Categories and Recent (MCategories.dc.html, MRecent.dc.html) ---------- */
.hd-tab { justify-content: flex-start; gap: 10px; }
.hd-tab h1 { font-weight: 800; font-size: 24px; line-height: 1.25; }
.main-tab { gap: 24px; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.cat-tile { position: relative; display: block; height: 200px; border-radius: 20px; overflow: hidden; color: var(--chalk); background: var(--deck); }
.cat-tile:hover { color: var(--chalk); outline: 3px solid var(--lime); outline-offset: 2px; }
.cat-tile img, .cat-tile .cat-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-tile .cat-art { padding-bottom: 40px; }
.cat-tile-label { position: absolute; left: 12px; bottom: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(15, 13, 28, 0.88); }
.cat-tile-name { display: block; font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1; }
.cat-tile-count { display: block; color: var(--muted); font-size: 13px; }
.recent { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.recent-head { display: flex; justify-content: space-between; align-items: center; }
.recent-head .sec-note { font-size: 13px; }
.link-btn { height: 44px; padding: 0 14px; font-size: 15px; border: 0; background: transparent; color: var(--lime); font-weight: 600; cursor: pointer; margin-right: -14px; }
.link-btn:hover { color: var(--lime-hover); }
.recent-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.recent-empty {
  display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px 20px; text-align: center;
  background: var(--deck); border: 1px solid var(--line); border-radius: 22px;
}
.recent-empty p { margin: 0; color: var(--text-2); }
@media (max-width: 767px) {
  .main-tab { padding-top: 16px; gap: 14px; }
  .cat-tiles { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cat-tile { height: 128px; }
  .cat-tile:hover { outline: none; }
}

/* ---------- Site pages: About, Contact, Privacy, Terms, Cookie settings, 404 ---------- */
.pg-head { display: flex; flex-direction: column; gap: 8px; }
.pg-intro { margin: 0; color: var(--text-2); font-size: 18px; max-width: 680px; }
.box { background: var(--deck); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.box p { margin: 0; color: var(--text-2); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row .btn-secondary { padding: 0 26px; font-weight: 700; font-size: 17px; }

.about-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 40px; align-items: center; }
.about-text { display: flex; flex-direction: column; gap: 18px; }
.about-lead { margin: 0; color: var(--text-2); font-size: 18px; }
.about-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.about-shots img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; }
.about-why { display: flex; flex-direction: column; gap: 18px; }
.about-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.about-point { display: flex; flex-direction: column; gap: 10px; }
.about-point h3 { font-family: var(--font-body); font-size: 19px; line-height: 1.5; }
.about-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--deck-2); display: grid; place-items: center; color: var(--lime); }
.about-band { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.about-band .sec-title { margin-bottom: 4px; }
@media (max-width: 767px) {
  .pg-intro, .about-lead { font-size: 16px; }
  .box { padding: 20px; border-radius: 18px; }
  .about-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .about-shots { gap: 8px; }
  .about-shots img { border-radius: 12px; }
  .about-points { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .about-band .btn, .about-text .btn { flex: 1 1 auto; }
}

.contact { display: flex; flex-direction: column; gap: 20px; max-width: 680px; }
.contact-email { display: flex; flex-direction: column; gap: 6px; }
.contact-note { color: var(--muted); font-size: 14px; }
.contact-address { font-size: 22px; font-weight: 700; color: var(--lime); overflow-wrap: anywhere; }
.contact-bug { display: flex; flex-direction: column; gap: 8px; }
.contact-bug h2 { font-family: var(--font-body); font-size: 18px; line-height: 1.5; }
@media (max-width: 767px) { .contact-address { font-size: 20px; } }

.legal-head { display: flex; flex-direction: column; gap: 12px; }
.legal-head .tag { align-self: flex-start; padding: 4px 10px; }
.legal-date { color: var(--muted); font-size: 14px; }
.legal { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.legal-toc { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 2px; padding: 14px; }
.legal-toc span { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 12px; }
.legal-toc a { color: var(--text-2); padding: 8px 12px; border-radius: 10px; font-size: 15px; }
.legal-toc a:hover { color: var(--chalk); background: var(--deck-2); }
.legal-text { flex: 999 1 560px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 32px; }
.legal-text section { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.legal-text section h2 { font-size: 26px; line-height: 1.3; }
.legal-text p { margin: 0; color: var(--text-2); }
.legal-text p a, .legal-text li a, .ck-note a { text-decoration: underline; text-underline-offset: 3px; }  /* links inside text are underlined (accessibility; approved by Tayyab 16 Nov 2026) */
.legal-text ul { margin: 0; padding-left: 22px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.legal-short { border-color: var(--lime); display: flex; flex-direction: column; gap: 10px; }
.legal-short h2 { font-family: var(--font-body); font-size: 20px; line-height: 1.5; }
@media (max-width: 767px) {
  .legal { gap: 28px; }
  .legal-toc { max-width: none; flex-basis: 100%; }
  .legal-text { flex-basis: 100%; gap: 28px; }
  .legal-text section h2 { font-size: 22px; }
}

.ck { max-width: 820px; display: flex; flex-direction: column; gap: 24px; }
.ck-row { display: flex; gap: 20px; align-items: center; justify-content: space-between; }
.ck-text { flex: 1; min-width: 0; }
.ck-text h2 { font-family: var(--font-body); font-size: 19px; line-height: 1.5; margin-bottom: 4px; }
.ck-always { color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.switch {
  width: 60px; height: 36px; flex: none; border-radius: var(--r-pill); border: 0; padding: 4px; cursor: pointer;
  display: flex; justify-content: flex-start; background: var(--line-strong);
}
.switch span { width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--chalk); }
.switch[aria-checked="true"] { justify-content: flex-end; background: var(--lime); }
.switch[aria-checked="true"] span { background: var(--night); }
.ck .btn-row .btn { font-weight: 700; font-size: 17px; padding: 0 26px; }
.ck-saved { margin: -8px 0 0; color: var(--lime); font-size: 14px; font-weight: 600; }
.ck-saved:empty { display: none; }
.ck-note { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 767px) {
  .ck { gap: 16px; }
  .ck-row { gap: 16px; }
  .ck-text h2 { font-size: 17px; }
  .ck-text p { font-size: 15px; }
  .ck .btn-row .btn { flex: 1 1 auto; }
}

/* ---------- Cookie consent banner, test version (Consent.dc.html) ---------- */
.consent { position: fixed; inset: 0; z-index: 100; background: rgba(15, 13, 28, 0.55); display: flex; align-items: flex-end; justify-content: center; padding: 32px; }
.consent-box {
  width: 960px; max-width: 100%; background: var(--deck); border: 1px solid var(--line); border-radius: 22px; padding: 28px;
  display: flex; gap: 28px; align-items: center;
}
.consent-text { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.consent-text h2 { font-size: 24px; line-height: 1.3; }
.consent-text p { margin: 0; color: var(--text-2); }
.consent-btns { display: flex; flex-direction: column; gap: 10px; flex: none; width: 240px; }
.consent-btns .btn { font-weight: 700; }
.consent-btns div { display: flex; gap: 10px; }
.consent-btns div .btn { flex: 1; padding: 0 12px; font-size: 15px; font-weight: 700; }
@media (max-width: 767px) {
  .consent { padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
  .consent-box { flex-direction: column; align-items: stretch; gap: 18px; padding: 20px; border-radius: 18px; }
  .consent-text h2 { font-size: 22px; }
  .consent-text p { font-size: 15px; }
  .consent-btns { width: auto; }
}
.consent-box:focus { outline: none; }

/* ---------- Cookie settings popup (same switches as Cookies.dc.html, over the page) ---------- */
.no-scroll, .no-scroll body { overflow: hidden; }
.ck-pop { position: fixed; inset: 0; z-index: 120; background: rgba(15, 13, 28, 0.55); display: flex; align-items: center; justify-content: center; padding: 32px; }
.ck-pop[hidden] { display: none; }
.ck-pop-box {
  width: 720px; max-width: 100%; max-height: 100%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--night); border: 1px solid var(--line); border-radius: 22px; padding: 28px; gap: 16px;
}
.ck-pop-box:focus { outline: none; }
.ck-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ck-pop-head h2 { font-size: 28px; line-height: 1.25; }
.ck-pop-intro { margin: -8px 0 0; color: var(--text-2); }
.ck-pop-box .box { padding: 20px 22px; }
@media (max-width: 767px) {
  .ck-pop { align-items: flex-end; padding: 0; }
  .ck-pop-box {
    border-radius: 28px 28px 0 0; border-bottom: 0; max-height: 92vh; max-height: 92dvh;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); gap: 12px;
  }
  .ck-pop-head h2 { font-size: 24px; }
  .ck-pop-box .box { padding: 16px; }
}

.nf { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 40px 0; }
.nf svg { max-width: 100%; height: auto; }
.nf-code { font-family: var(--font-display); font-weight: 800; font-size: 96px; line-height: 1; color: var(--lime); }
.nf-title { font-weight: 800; font-size: 40px; line-height: 1.2; }
.nf .pg-intro { max-width: 520px; }
.nf-games { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 767px) {
  .nf { padding: 16px 0 0; gap: 14px; }
  .nf svg { width: 176px; }
  .nf-code { font-size: 72px; }
  .nf-title { font-size: 30px; }
}

/* ---------- Offline page (Offline.dc.html) ---------- */
.off-status {
  display: flex; align-items: center; gap: 14px; background: var(--deck); border: 1px solid var(--violet);
  border-radius: 22px; padding: 18px 22px;
}
.off-status svg { flex: none; color: var(--violet); }
.off-status-title { font-weight: 700; }
.off-status-text { color: var(--text-2); }
.off-games { display: flex; flex-direction: column; gap: 16px; }
.tag-ready { background: var(--lime); }
.tag-needs { background: var(--chalk); }
.off-card:not(.is-ready) { opacity: 0.55; }
.off-card .card-name { margin-bottom: 0; }
@media (max-width: 767px) {
  .off-status { padding: 16px; border-radius: 18px; }
}

/* ---------- "Add to home screen" sheet (MInstall.dc.html), phones only ---------- */
.install { position: fixed; inset: 0; z-index: 110; background: rgba(15, 13, 28, 0.5); display: flex; align-items: flex-end; }
.install-box {
  width: 100%; background: var(--deck); border-top: 1px solid var(--line); border-radius: 28px 28px 0 0;
  padding: 12px 20px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px;
  font-size: 15px; line-height: 1.45;
}
.install-box:focus { outline: none; }
.install-handle { align-self: center; width: 44px; height: 5px; border-radius: var(--r-pill); background: var(--line-strong); }
.install-head { display: flex; align-items: center; gap: 14px; }
.install-head .logo-mark { flex: none; }
.install-head h2 { font-weight: 800; font-size: 22px; line-height: 1.25; }
.install-head p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.install-box .btn { width: 100%; font-weight: 700; }
