
:root {
  --ink: #3f3f42;
  --muted: #8b8d91;
  --line: #edf0f2;
  --soft: #f7f8f9;
  --yellow: #f5cf16;
  --blue: #2388c2;
  --blue-dark: #166ea2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body:has(.home-page) { background: linear-gradient(180deg, #92ffb3 0%, #00d2f8 100%) fixed; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.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; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { width: 100%; flex: 1; }

/* Shared static release chrome. Detail pages keep the quiet white logo rail
   while the home page exposes the same search affordance at every size. */
.site-header {
  position: relative;
  z-index: 10;
  height: 54px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.header-inner {
  width: min(1160px, calc(100% - 32px));
  height: 54px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand-lockup { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand-wordmark { display: inline-flex; align-items: center; gap: 7px; color: #c7c9cb; font-weight: 800; letter-spacing: -.8px; }
.brand-mark { display: block; width: 28px; height: 28px; overflow: hidden; border-radius: 8px; background: transparent; line-height: 0; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.brand-name { font-size: 23px; line-height: 1; }
.search-form { display: flex; width: 100%; max-width: 520px; margin-left: auto; gap: 7px; }
.search-input { display: block; flex: 1 1 auto; min-width: 0; width: 100%; height: 36px; border: 1px solid #e3e6e9; border-radius: 18px; padding: 0 16px; outline: 0; color: #555; background: #fafbfc; }
.search-input::placeholder { color: #a7adb2; }
.search-input:focus { border-color: #b9d9ea; box-shadow: 0 0 0 3px rgba(35,136,194,.12); }
.search-submit { flex: 0 0 auto; height: 36px; border: 0; border-radius: 18px; padding: 0 14px; color: #fff; background: var(--blue); font-size: 12px; font-weight: 700; }
.search-submit:hover, .search-submit:focus-visible { background: var(--blue-dark); outline: 0; }
.header-locale { display: flex; gap: 8px; align-items: center; color: #9aa0a5; font-size: 11px; white-space: nowrap; }
.header-locale .locale-switcher { margin-left: 0; }
.header-locale a[data-active="true"] { color: #495057; font-weight: 700; }
body:has(.detail-page) .site-header .search-form,
body:has(.detail-page) .site-header .header-locale { display: none; }

/* Home: an 11-column, 97px icon grid with 16px gaps and two 3x3 anchors,
   measured from mzgen's desktop wall. */
.home-page { padding: 0 0 24px; background: transparent; }
.home-hero { width: min(1130px, calc(100% - 32px)); margin: 26px auto 18px; padding: 28px 32px; border: 1px solid rgba(255,255,255,.65); border-radius: 22px; color: #173d4e; background: rgba(255,255,255,.82); box-shadow: 0 12px 28px rgba(0,86,113,.14); }
.home-hero-brand { display: flex; align-items: center; gap: 16px; }
.home-hero-brand img { flex: 0 0 auto; border-radius: 15px; box-shadow: 0 5px 12px rgba(0,0,0,.12); }
.home-hero h1 { margin: 3px 0 0; color: #17465a; font-size: clamp(28px, 4vw, 42px); line-height: 1.05; letter-spacing: -.8px; }
.home-hero p { max-width: 680px; margin: 16px 0 0; color: #55717e; font-size: 15px; line-height: 1.6; }
.eyebrow { color: #548291; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.home-ad { width: min(1130px, calc(100% - 32px)); margin: 0 auto 20px; min-height: 120px; border: 1px solid rgba(255,255,255,.66); border-radius: 16px; background: rgba(255,255,255,.5); box-shadow: 0 5px 16px rgba(0,86,113,.1); }
.home-section { width: min(1130px, calc(100% - 32px)); margin: 0 auto 28px; }
.home-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 0 13px; }
.home-section-heading h2 { margin: 3px 0 0; color: #15485e; font-size: 22px; }
.catalog-count { color: #4e8190; font-size: 12px; }
.home-recommendations, .home-game-grid { width: 100%; max-width: none; padding: 0; }
.home-game-card { min-width: 0; transition: transform .16s ease, box-shadow .16s ease; }
.home-game-card:hover, .home-game-card:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.12); outline: 0; }
.category-filters { display: flex; gap: 8px; max-width: 100%; margin: 0 0 14px; padding: 2px 0 3px; overflow-x: auto; scrollbar-width: thin; }
.category-filter { flex: 0 0 auto; border: 1px solid rgba(35,136,194,.24); border-radius: 18px; padding: 8px 13px; color: #2c7895; background: rgba(255,255,255,.72); font-size: 12px; }
.category-filter:hover, .category-filter:focus-visible, .category-filter.is-active { border-color: var(--blue); color: #fff; background: var(--blue); outline: 0; }
.home-game-card[hidden] { display: none; }
.icons-wall { display: grid; grid-template-columns: repeat(11, 97px); grid-auto-rows: 97px; gap: 16px; justify-content: center; padding: 16px 0; }
.wall-item { position: relative; display: block; width: 97px; height: 97px; overflow: hidden; border-radius: 16px; background: #c9d1d2; box-shadow: 0 6px 12px rgba(0,0,0,.24); transition: transform .18s ease, box-shadow .18s ease; }
.wall-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wall-item:hover, .wall-item:focus-visible { z-index: 2; transform: translateY(-2px); box-shadow: 0 10px 18px rgba(0,0,0,.26); outline: 0; }
.wall-item::after { content: attr(title); position: absolute; inset: auto 0 0; padding: 24px 8px 8px; color: #fff; background: linear-gradient(0deg, rgba(0,0,0,.52), transparent); font-size: 12px; font-weight: 700; opacity: 0; transition: opacity .16s ease; }
.wall-item:hover::after, .wall-item:focus-visible::after { opacity: 1; }
.wall-item:nth-child(1) { grid-column: 5 / span 3; grid-row: 1 / span 3; width: 323px; height: 323px; }
.wall-item:nth-child(2) { grid-column: 2 / span 3; grid-row: 2 / span 3; width: 323px; height: 323px; }

/* Detail page: white editorial layout, a wide main rail and a narrow
   featured rail matching the reference's 1160px desktop composition. */
body:has(.detail-page) .site-header { height: 54px; }
.detail-page { max-width: 1160px; margin: 0 auto; padding: 29px 0 54px; background: #fff; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 844px) 274px; gap: 42px; align-items: start; }
.detail-sidebar { min-width: 0; }
.detail-content { min-width: 0; }
.detail-top-rail { display: none; }
.detail-section { margin: 0 0 16px; padding: 18px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 1px 7px rgba(0,0,0,.08); }
.hero { min-height: 184px; display: grid; grid-template-columns: 152px minmax(0,1fr); gap: 21px; align-items: center; padding: 16px; }
.hero-icon { display: block; width: 152px; height: 152px; border-radius: 18px; object-fit: cover; background: #edf0f2; }
.hero-copy { min-width: 0; }
.hero .eyebrow { display: none; }
.hero h1 { margin: 0 0 13px; color: #454547; font-size: 32px; line-height: 1.08; font-weight: 800; }
.hero-publisher { margin: 0; color: var(--muted); font-size: 14px; }
.hero-rating { margin: 12px 0 0; color: #7c7f82; font-size: 14px; }
.hero-rating > span:first-child { color: var(--yellow); letter-spacing: 2px; font-size: 20px; vertical-align: -1px; }
.hero-rating > span:last-child { margin-left: 8px; color: #9a9da0; font-size: 12px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 26px; margin-top: 18px; }
.hero-stat strong { display: block; color: #54575a; font-size: 15px; font-weight: 400; white-space: nowrap; }
.hero-stat span { display: block; margin-top: 10px; color: #a5a8aa; font-size: 13px; }
.store-cta { display: flex; align-items: center; padding: 13px 16px; }
.cta-row { display: flex; width: 100%; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cta { display: inline-flex; min-width: 144px; min-height: 40px; align-items: center; justify-content: center; border-radius: 22px; padding: 0 18px; color: #fff; background: var(--blue); font-size: 13px; font-weight: 700; transition: background .16s ease, transform .16s ease; }
.cta:hover, .cta:focus-visible { background: var(--blue-dark); transform: translateY(-1px); outline: 0; }
.cta.secondary { color: #fff; background: #252525; }
.cta.outline { color: var(--blue); background: #fff; border: 1px solid #b8d9ea; }
.ad-unit { display: flex; width: 100%; min-height: 250px; align-items: center; justify-content: center; overflow: hidden; background: #f4f7f9; }
.ad-unit:not(.ad-unit-placeholder) { padding: 8px; }
.ad-unit .adsbygoogle { min-height: 100%; border-radius: 10px; background: #fff; }
.ad-unit-placeholder { color: #afb4b8; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.ad-unit-placeholder span { opacity: .75; }
.detail-ad { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 7px rgba(0,0,0,.06); }
.detail-ad-top { min-height: 250px; }
.detail-ad-screenshots { min-height: 110px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.section-heading h2 { margin: 0; color: #4a4c4e; font-size: 18px; line-height: 1.2; font-weight: 700; }
.info-section { padding: 15px 16px; }
.info-title { display: none; }
.info-table { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 64px; row-gap: 0; margin: 0; }
.info-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); min-height: 45px; align-items: center; border-bottom: 1px solid var(--line); font-size: 14px; }
.info-label { color: #95999c; }
.info-value { margin: 0; min-width: 0; color: #55585b; overflow-wrap: anywhere; text-align: left; }
.info-value a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.desktop-info-grid { display: none; }
.detail-content > .detail-section:not(.hero):not(.info-section):not(.store-cta) { padding: 20px 16px; }
.detail-content > .detail-section:not(.hero):not(.info-section):not(.store-cta) .section-heading { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.description { margin: 0; color: #585b5e; font-size: 15px; line-height: 1.72; white-space: pre-line; }
.how-to-play { margin-bottom: 16px; }
.how-to-play ol { display: grid; gap: 11px; margin: 0; padding-left: 21px; color: #585b5e; font-size: 15px; line-height: 1.62; }
.screenshot-gallery { display: flex; gap: 12px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: thin; }
.screenshot-gallery button { flex: 0 0 auto; display: block; width: auto; padding: 0; border: 0; background: transparent; }
.screenshot-gallery img { display: block; width: auto; height: 216px; max-width: 540px; border-radius: 8px; object-fit: contain; background: #edf0f2; }
.screenshot-gallery img.portrait-screenshot { height: 260px; max-width: 190px; }
.gallery-lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 28px; background: rgba(15,20,26,.78); }
.gallery-lightbox button { position: absolute; top: 18px; right: 22px; border: 0; color: #fff; background: transparent; font-size: 30px; }
.gallery-lightbox img { max-width: min(94vw, 1100px); max-height: 88vh; width: auto; height: auto; border-radius: 12px; object-fit: contain; }
.rating-summary { display: grid; gap: 11px; }
.rating-large { margin-right: 12px; color: #2d3337; font-size: 30px; font-weight: 700; }
.stars, .review-stars { color: var(--yellow); letter-spacing: 1px; }
.rating-count { color: var(--muted); font-size: 12px; }
.rating-breakdown { display: grid; width: 100%; gap: 7px; }
.rating-bar { display: grid; grid-template-columns: 38px minmax(0,1fr) 32px; gap: 9px; align-items: center; color: #869097; font-size: 12px; }
.rating-bar-track { height: 8px; overflow: hidden; border-radius: 8px; background: #edf0f2; }
.rating-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--yellow); }
.review-list { display: grid; gap: 18px; margin: 0; padding-left: 18px; }
.review-item { color: #4e575e; font-size: 14px; line-height: 1.55; }
.review-item p { margin: 8px 0 0; }
.review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: #47525b; }
.review-meta > span + span::before { content: '•'; margin-right: 7px; color: #899196; }
.review-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.review-tags span { padding: 3px 8px; border-radius: 5px; color: #2467a3; background: #dceeff; font-size: 11px; line-height: 1; }

.recommendation-wall { padding: 16px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 1px 7px rgba(0,0,0,.08); }
.recommendation-wall .section-heading { margin: 0 2px 13px; }
.recommendation-wall .section-heading h2 { font-size: 22px; }
.rail { display: grid; gap: 13px; }
.rail-card { display: grid; grid-template-columns: 68px minmax(0,1fr); column-gap: 12px; min-width: 0; padding: 0 2px; }
.rail-icon { grid-row: span 3; width: 68px; height: 68px; border-radius: 12px; object-fit: cover; background: #edf0f2; }
.rail-name { overflow: hidden; align-self: center; color: #505255; font-size: 14px; line-height: 1.2; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rail-publisher { display: none; }
.tile-rating { overflow: hidden; color: #999b9f; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.recommendation-wall .tile-rating { margin-top: 3px; }
.hot-apps-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.hot-app { display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: #edf0f2; }
.hot-app img { display: block; width: 100%; height: 100%; object-fit: cover; }

.site-footer { border-top: 1px solid var(--line); color: #9a9da0; background: #fff; }
.footer-inner { width: min(1160px, calc(100% - 32px)); min-height: 66px; margin: 0 auto; display: flex; align-items: center; gap: 18px; font-size: 12px; }
.footer-copy { color: #a7aaad; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 14px; color: #8d9195; }
.locale-switcher { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.locale-switcher a { color: #9ca1a5; }
.locale-switcher a[data-active="true"] { color: #4d5256; font-weight: 700; }

/* Supporting routes keep the existing data flows while sharing the quieter
   card language used by the detail page. */
.page-intro, .filter-rail, .mosaic-wrap, .see-more, .mosaic-empty { max-width: 1130px; margin-left: auto; margin-right: auto; }
.page-intro { padding: 30px 0 18px; }
.page-title { margin: 0; }
.filter-rail { padding-bottom: 18px; }
.mosaic-wrap { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 14px; }
.mosaic-tile { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.06); }
.mosaic-tile .tile-image { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.tile-name, .tile-meta { display: block; overflow: hidden; padding: 8px 10px 0; text-overflow: ellipsis; white-space: nowrap; }
.tile-name { color: #414448; font-size: 13px; font-weight: 700; }
.tile-meta { padding-top: 4px; color: #a0a5a8; font-size: 11px; }
.mosaic-tile .tile-rating { display: block; padding: 5px 10px 10px; }
.mosaic-tile.featured { grid-column: span 2; }
.mosaic-empty { padding: 50px 0; text-align: center; color: var(--muted); }
.see-more { margin-top: 18px; padding: 12px 22px; border: 1px solid var(--blue); border-radius: 24px; background: #fff; color: var(--blue); text-align: center; }

@media (max-width: 1199px) and (min-width: 768px) {
  .detail-page { padding: 24px 20px 48px; }
  .detail-layout { grid-template-columns: minmax(0,1fr) 248px; gap: 24px; }
  .icons-wall { grid-template-columns: repeat(9, 97px); }
  .wall-item:nth-child(1) { grid-column: 4 / span 3; }
  .wall-item:nth-child(2) { grid-column: 1 / span 3; }
}

@media (max-width: 767px) {
  .site-header { display: block; height: 50px; }
  .header-inner { width: calc(100% - 20px); height: 50px; gap: 9px; }
  .brand-name { font-size: 20px; }
  .brand-mark { width: 25px; height: 25px; font-size: 18px; }
  .search-form { max-width: none; }
  .search-input { height: 32px; padding: 0 12px; }
  .search-submit { height: 32px; padding: 0 10px; font-size: 11px; }
  .header-locale { display: none; }
  .home-page { padding: 0 10px 18px; }
  .home-hero, .home-ad, .home-section { width: calc(100% - 0px); }
  .home-hero { margin-top: 14px; padding: 20px 16px; border-radius: 16px; }
  .home-hero-brand { gap: 11px; }
  .home-hero-brand img { width: 44px; height: 44px; border-radius: 12px; }
  .home-hero h1 { font-size: 28px; }
  .home-hero p { margin-top: 12px; font-size: 13px; }
  .home-ad { min-height: 100px; margin-bottom: 16px; border-radius: 12px; }
  .home-section { margin-bottom: 22px; }
  .home-section-heading h2 { font-size: 18px; }
  .home-recommendations, .home-game-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .catalog-count { font-size: 11px; }
  .icons-wall { grid-template-columns: repeat(3, minmax(0,1fr)); grid-auto-rows: auto; gap: 10px; padding: 12px 0 20px; }
  .wall-item, .wall-item:nth-child(1), .wall-item:nth-child(2) { width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; }
  .wall-item:nth-child(1) { grid-column: 1 / span 2; grid-row: 1 / span 2; }
  .wall-item:nth-child(2) { grid-column: 3; grid-row: 1 / span 2; }
  .wall-item::after { display: none; }
  .detail-page { width: 100%; padding: 0 10px 30px; }
  .detail-layout { display: block; }
  .detail-sidebar { display: block; margin-top: 10px; }
  .detail-content { width: 100%; }
  .detail-section { margin-bottom: 10px; border-radius: 12px; padding: 14px 12px; }
  .hero { min-height: 0; grid-template-columns: 87px minmax(0,1fr); gap: 17px; padding: 8px; align-items: start; }
  .hero-icon { width: 87px; height: 87px; border-radius: 10px; }
  .hero h1 { margin-bottom: 7px; font-size: 22px; line-height: 1.2; }
  .hero-publisher { display: none; }
  .hero-rating { margin-top: 6px; font-size: 12px; }
  .hero-rating > span:first-child { font-size: 17px; letter-spacing: 1px; }
  .hero-rating > span:last-child { display: block; margin: 3px 0 0; }
  .hero-stats { grid-column: 1 / -1; gap: 8px; margin-top: 1px; padding: 8px 0 0; border-top: 1px solid var(--line); }
  .hero-stat strong { font-size: 12px; }
  .hero-stat span { margin-top: 4px; font-size: 10px; }
  .store-cta { padding: 10px 12px; }
  .cta-row { width: 100%; gap: 8px; }
  .cta { flex: 1 1 130px; min-width: 0; min-height: 38px; padding: 0 12px; font-size: 12px; }
  .detail-ad { min-height: 118px; border-radius: 12px; }
  .detail-ad-top { min-height: 250px; }
  .info-section { padding: 12px; }
  .info-title { display: flex; margin-bottom: 0; }
  .info-table { display: grid; grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 135px minmax(0,1fr); min-height: 34px; font-size: 12px; }
  .detail-content > .detail-section:not(.hero):not(.info-section):not(.store-cta) { padding: 14px 12px; }
  .section-heading h2 { font-size: 16px; }
  .description, .how-to-play ol { font-size: 13px; line-height: 1.65; }
  .screenshot-gallery img { height: 178px; max-width: 320px; }
  .screenshot-gallery img.portrait-screenshot { height: 230px; max-width: 160px; }
  .gallery-lightbox { padding: 18px; }
  .hot-apps-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
  .hot-app { border-radius: 9px; }
  .footer-inner { width: calc(100% - 20px); padding: 14px 0; flex-wrap: wrap; }
  .footer-copy { width: 100%; }
  .locale-switcher { margin-left: 0; }
  .mosaic-wrap { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; padding: 0 10px; }
}

body.lightbox-open { overflow: hidden; }
.market-label { margin-left: auto; color: #8c979d; font-size: 11px; white-space: nowrap; }
.footer-note { margin-left: auto; color: #a7aaad; }

@media (max-width: 767px) {
  .market-label { display: none; }
  .footer-note { width: 100%; margin-left: 0; }
}

/* Static home wall: the public home surface follows mzgen.com's compact icon
   wall. The search and detail routes keep the existing editorial chrome. */
html:has(.home-page),
body:has(.home-page) {
  min-height: 100%;
  background: linear-gradient(180deg, #92ffb3 0%, #00d2f8 100%) fixed;
}

body:has(.home-page) { overflow-x: hidden; }
body:has(.home-page) .site-header,
body:has(.home-page) .site-footer { display: none; }
body:has(.home-page) .site-shell { min-height: 100vh; }

.home-page {
  min-height: 100vh;
  padding: 0;
  background: transparent;
}

.icons-wall {
  --wall-columns: 11;
  --wall-size: calc(100vw / var(--wall-columns) - 18px);
  display: grid;
  grid-template-columns: repeat(var(--wall-columns), var(--wall-size));
  grid-auto-rows: var(--wall-size);
  grid-auto-flow: dense;
  gap: 16px;
  justify-content: center;
  margin: 0;
  padding: 16px 0;
}

.icons-wall .wall-item,
.icons-wall .wall-item:nth-child(1),
.icons-wall .wall-item:nth-child(2) {
  width: 100%;
  height: 100%;
}

.icons-wall .wall-item:nth-child(1) { grid-area: ip0; }
.icons-wall .wall-item:nth-child(2) { grid-area: ip1; }

.icons-wall .wall-item img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

@media (min-width: 104px) and (max-width: 543px) {
  .icons-wall {
    --wall-columns: 3;
    grid-template-areas:
      "ip0 ip0 ."
      "ip0 ip0 ."
      ". ip1 ip1"
      ". ip1 ip1";
  }
}

@media (min-width: 544px) and (max-width: 763px) {
  .icons-wall {
    --wall-columns: 5;
    grid-template-areas:
      ". . . ip0 ip0"
      ". . . ip0 ip0"
      "ip1 ip1 . . ."
      "ip1 ip1 . . .";
  }
}

@media (min-width: 764px) and (max-width: 1203px) {
  .icons-wall {
    --wall-columns: 7;
    grid-template-areas:
      ". ip0 ip0 ip0 . . ."
      ". ip0 ip0 ip0 . . ."
      ". ip0 ip0 ip0 . . ."
      ". . . . ip1 ip1 ip1"
      ". . . . ip1 ip1 ip1"
      ". . . . ip1 ip1 ip1";
  }
}

@media (min-width: 1204px) and (max-width: 1313px) {
  .icons-wall {
    --wall-columns: 11;
    grid-template-areas:
      ". . . . ip0 ip0 ip0 . . . ."
      ". ip1 ip1 ip1 ip0 ip0 ip0 . . . ."
      ". ip1 ip1 ip1 ip0 ip0 ip0 . . . ."
      ". ip1 ip1 ip1 . . . . . . .";
  }
}

@media (min-width: 1314px) and (max-width: 1533px) {
  .icons-wall {
    --wall-columns: 12;
    grid-template-areas:
      ". . . . ip0 ip0 ip0 . . ip1 ip1 ip1"
      ". . . . ip0 ip0 ip0 . . ip1 ip1 ip1"
      ". . . . ip0 ip0 ip0 . . ip1 ip1 ip1";
  }
}

@media (min-width: 1534px) and (max-width: 1863px) {
  .icons-wall {
    --wall-columns: 14;
    grid-template-areas:
      ". . . . ip0 ip0 ip0 . . . . ip1 ip1 ip1"
      ". . . . ip0 ip0 ip0 . . . . ip1 ip1 ip1"
      ". . . . ip0 ip0 ip0 . . . . ip1 ip1 ip1";
  }
}

@media (min-width: 1864px) {
  .icons-wall {
    --wall-columns: 17;
    grid-template-areas:
      ". . . . ip0 ip0 ip0 . . . . ip1 ip1 ip1 . . ."
      ". . . . ip0 ip0 ip0 . . . . ip1 ip1 ip1 . . ."
      ". . . . ip0 ip0 ip0 . . . . ip1 ip1 ip1 . . .";
  }
}

/* Detail page pass: preserve the site's data rules while matching the
   reference's quiet two-column editorial composition. */
.detail-page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 0 54px;
  background: #fff;
}

.detail-layout {
  grid-template-columns: minmax(0, 893px) 277px;
  gap: 30px;
}

.detail-content { min-width: 0; padding: 0 20px; }

.detail-page .hero {
  min-height: 182px;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  padding: 14px 16px;
  border-radius: 14px;
}

.detail-page .hero-icon {
  width: 154px;
  height: 154px;
  border-radius: 20px;
}

.detail-page .hero-info {
  min-width: 0;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.detail-page .hero h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
}

.detail-page .hero-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 12px;
}

.detail-page .hero-stat strong { font-size: 16px; }
.detail-page .hero-stat span { margin-top: 6px; font-size: 13px; }

.detail-page .info-section {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 14px;
}

.detail-page .info-table {
  grid-template-columns: 1fr;
  row-gap: 0;
}

.detail-page .info-row {
  grid-template-columns: 1fr 1fr;
  min-height: 45px;
  font-size: 16px;
}

.detail-page .detail-ad {
  min-height: 90px;
  margin: 14px 0;
  border: 1px dashed #eef1f3;
  border-radius: 14px;
  background: #fbfcfd;
  box-shadow: none;
}

.detail-page .detail-ad-top { min-height: 90px; }
.detail-page .detail-ad-screenshots { min-height: 90px; }

.detail-page .description-section,
.detail-page .screenshots-section,
.detail-page .rating-section {
  padding: 20px 16px;
}

.detail-page .description-section .section-heading h2,
.detail-page .screenshots-section .section-heading h2,
.detail-page .rating-section .section-heading h2 {
  font-size: 24px;
  font-weight: 600;
}

.detail-page .store-cta {
  margin-top: 30px;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.detail-page .store-cta .cta-row { justify-content: space-between; gap: 20px; }

.detail-page .store-cta .cta {
  width: calc(50% - 10px);
  min-height: 70px;
  border-radius: 10px;
  font-size: 18px;
}

.detail-page .recommendation-wall {
  border-radius: 14px;
  padding: 16px;
}

.detail-page .recommendation-wall .section-heading h2 { font-size: 24px; }
.detail-page .rail { gap: 16px; }

@media (max-width: 1199px) {
  .detail-page { max-width: 100%; padding: 0 0 40px; }
  .detail-layout { display: block; }
  .detail-content { padding: 0; }
  .detail-sidebar { display: none; }
}

@media (max-width: 767px) {
  .detail-page .detail-section {
    margin-bottom: 0;
    border-radius: 0;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
  }

  .detail-page .hero {
    min-height: 0;
    grid-template-columns: 87px minmax(0, 1fr);
    gap: 17px;
    padding: 16px 10px;
  }

  .detail-page .hero-icon {
    width: 87px;
    height: 87px;
    border-radius: 10px;
  }

  .detail-page .hero-info {
    display: contents;
    min-height: 0;
  }

  .detail-page .hero-copy { grid-column: 2; grid-row: 1; }
  .detail-page .hero h1 { font-size: 22px; line-height: 1.2; }
  .detail-page .hero-publisher { display: none; }

  .detail-page .hero-stats {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .detail-page .hero-stat strong { font-size: 12px; }
  .detail-page .hero-stat span { margin-top: 4px; font-size: 10px; }
  .detail-page .info-section { padding: 12px 10px; }
  .detail-page .info-row { min-height: 38px; font-size: 14px; }
  .detail-page .detail-ad { min-height: 72px; margin: 0; border-radius: 0; border-right: 0; border-left: 0; }
  .detail-page .detail-ad-top { min-height: 72px; }
  .detail-page .description-section,
  .detail-page .screenshots-section,
  .detail-page .rating-section { padding: 18px 10px; }
  .detail-page .description-section .section-heading h2,
  .detail-page .screenshots-section .section-heading h2,
  .detail-page .rating-section .section-heading h2 { font-size: 20px; }
  .detail-page .store-cta { padding: 18px 10px; }
  .detail-page .store-cta .cta-row { gap: 8px; }
  .detail-page .store-cta .cta { width: calc(50% - 4px); min-height: 42px; padding: 0 10px; font-size: 13px; }
}

/* Detail lower sections: reference-style ratings, reviews, and recommendations. */
.detail-page .section-heading h2 { display: flex; align-items: center; gap: 8px; }
.section-emoji { font-size: .82em; line-height: 1; }
.detail-page .rating-section { padding: 24px 20px 26px; }
.detail-page .rating-overview { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 34px; align-items: center; }
.detail-page .rating-summary { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.detail-page .rating-large { margin: 0; color: #4b4b4e; font-size: 82px; line-height: .95; font-weight: 800; letter-spacing: -3px; }
.detail-page .rating-summary .stars { color: #ffc400; font-size: 24px; letter-spacing: 2px; line-height: 1; }
.detail-page .rating-summary .rating-count { margin-top: 2px; color: #90969a; font-size: 13px; }
.rating-breakdown-wrap { min-width: 0; }
.rating-breakdown-label { display: block; margin-bottom: 10px; color: #9ca3a8; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.detail-page .rating-breakdown { gap: 9px; }
.detail-page .rating-bar { grid-template-columns: 18px minmax(0, 1fr) 42px; gap: 10px; color: #777e83; font-size: 13px; }
.detail-page .rating-bar-track { height: 11px; background: #edf0f2; }
.detail-page .rating-bar-fill { background: #4aa8f5; }
.detail-page .rating-bar strong { color: #8c9499; font-size: 11px; font-weight: 600; text-align: right; }
.detail-page .description-section { padding-bottom: 24px; }
.detail-page .description { display: grid; gap: 12px; color: #565e64; font-size: 15px; line-height: 1.72; }
.description-paragraph { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 7px; margin: 0; }
.description-emoji { color: #f0b400; font-size: 16px; line-height: 1.65; }
.detail-page .reviews-section { padding-bottom: 22px; }
.detail-page .section-note { margin: -5px 0 15px; color: #959ca1; font-size: 12px; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.review-card { min-width: 0; padding: 15px; border: 1px solid #e7eaec; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(36,49,58,.05); }
.review-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.review-author { display: flex; flex-wrap: wrap; gap: 4px 7px; color: #596168; font-size: 12px; font-weight: 700; line-height: 1.45; }
.review-author span { color: #a1a7ab; font-weight: 400; }
.review-card-stars { flex: 0 0 auto; color: #ffc400; font-size: 14px; letter-spacing: 1px; line-height: 1; }
.review-card p { display: -webkit-box; overflow: hidden; margin: 11px 0 0; color: #626b72; font-size: 13px; line-height: 1.58; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.review-card .review-tags { margin-top: 11px; }
.detail-page .recommended-section { padding-bottom: 24px; }
.recommended-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.recommended-card { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 14px; align-items: center; min-width: 0; padding: 14px; border: 1px solid #e7eaec; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(36,49,58,.05); transition: transform .16s ease, box-shadow .16s ease; }
.recommended-card:hover, .recommended-card:focus-visible { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(36,49,58,.11); outline: 0; }
.recommended-card img { display: block; width: 80px; height: 80px; border-radius: 14px; object-fit: cover; background: #edf0f2; }
.recommended-card-copy { display: grid; min-width: 0; gap: 7px; }
.recommended-card-copy strong { overflow: hidden; color: #23282c; font-size: 15px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.recommended-card-copy span { overflow: hidden; color: #9a7a00; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.detail-page .recommendation-wall { padding-bottom: 20px; }
.detail-page .recommendation-wall .rail { gap: 17px; }
.detail-page .recommendation-wall .rail-card { grid-template-columns: 72px minmax(0,1fr); column-gap: 12px; padding: 0; }
.detail-page .recommendation-wall .rail-icon { width: 72px; height: 72px; border-radius: 13px; }
.detail-page .recommendation-wall .rail-name { font-size: 14px; line-height: 1.25; }

@media (max-width: 767px) {
  .detail-page .rating-section { padding: 20px 12px 22px; }
  .detail-page .rating-overview { grid-template-columns: 1fr; gap: 22px; }
  .detail-page .rating-summary { align-items: center; }
  .detail-page .rating-large { font-size: 68px; }
  .detail-page .rating-breakdown { gap: 8px; }
  .review-grid, .recommended-grid { grid-template-columns: 1fr; gap: 10px; }
  .detail-page .description { font-size: 14px; line-height: 1.68; }
  .description-paragraph { grid-template-columns: 21px minmax(0,1fr); gap: 5px; }
  .review-card { padding: 13px; }
  .recommended-card { grid-template-columns: 68px minmax(0,1fr); padding: 11px; gap: 11px; }
  .recommended-card img { width: 68px; height: 68px; border-radius: 12px; }
  .recommended-card-copy strong { font-size: 14px; }
}

/* Static ad reservations: two homepage slots, with no third interstitial. */
.home-page .home-ad-slot {
  display: flex;
  width: min(1200px, calc(100% - 32px));
  min-height: 90px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(88, 111, 118, .18);
  border-radius: 14px;
  background: rgba(255,255,255,.38);
  color: rgba(72, 91, 97, .34);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home-page .home-ad-top { margin-top: 12px; margin-bottom: 4px; }
.home-page .home-ad-bottom { margin-top: 4px; margin-bottom: 18px; }
.home-page .home-ad-slot span { color: inherit; }

@media (max-width: 767px) {
  .home-page .home-ad-slot { width: calc(100% - 20px); min-height: 72px; border-radius: 10px; }
  .home-page .home-ad-top { margin-top: 8px; }
  .home-page .home-ad-bottom { margin-bottom: 12px; }
}

/* AdSense needs a measurable slot width before adsbygoogle.push() runs. */
.ad-unit-adsense {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
}
.ad-unit-adsense .adsbygoogle {
  display: block;
  width: 100%;
  min-height: 90px;
  border-radius: inherit;
  background: transparent;
}

.static-search-page .mosaic-empty[hidden] { display: none; }
