/* Shared Japandi styles for app detail pages */
@font-face {
  font-family: "Ethic Serif";
  src: local("Ethic Serif"), local("EthicSerif-Regular"),
       url("fonts/ethic-serif/EthicSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ethic Serif";
  src: local("Ethic Serif Medium"), local("EthicSerif-Medium"),
       url("fonts/ethic-serif/EthicSerif-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

body.app-detail-page {
  --jp-soft-white: #F7F5F0;
  --jp-natural: #CBBCA4;
  --jp-taupe: #8A7968;
  --jp-moss: #4A4E3A;
  --jp-soft-black: #2C2B29;
  --jp-walnut: #4A3326;
  --paper: var(--jp-soft-white);
  --ink: var(--jp-soft-black);
  --soft: var(--jp-taupe);
  --stone: color-mix(in srgb, var(--jp-taupe) 80%, var(--jp-moss));
  --line: rgba(74, 78, 58, 0.14);
  --forest: var(--jp-moss);
  --serif: "Ethic Serif", "Bodoni Moda", Georgia, serif;
  --sans: "Outfit", system-ui, sans-serif;
  --pad: clamp(1.25rem, 4vw, 3rem);
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.app-detail-page .design-font,
body.app-detail-page h1,
body.app-detail-page h2,
body.app-detail-page h3,
body.app-detail-page h4,
body.app-detail-page .asl-name,
body.app-detail-page .footer-logo-text {
  font-family: var(--serif) !important;
  font-weight: 400 !important;
  letter-spacing: -0.025em;
  color: var(--ink);
}

body.app-detail-page p,
body.app-detail-page a,
body.app-detail-page li,
body.app-detail-page .nav-menu a,
body.app-detail-page .asl-desc,
body.app-detail-page .btn {
  font-family: var(--sans) !important;
}

/* Header */
body.app-detail-page .header {
  background: #FDFCFA !important;
  border-bottom: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.app-detail-page .nav-container {
  height: 80px !important;
  padding: 0 40px !important;
}
body.app-detail-page .logo-img { height: 32px !important; }
body.app-detail-page .nav-menu > li + li::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 1px !important;
  height: 0.85rem !important;
  background: #CBBCA4 !important;
  pointer-events: none !important;
  z-index: 2 !important;
}
body.app-detail-page .nav-menu > li:not(:last-child)::after {
  content: none !important;
  display: none !important;
}
@media (min-width: 901px) {
  body.app-detail-page .nav-menu > li.has-submenu::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    height: 10px !important;
    transform: none !important;
    background: transparent !important;
    pointer-events: auto !important;
    z-index: 1001 !important;
  }
}
body.app-detail-page .nav-menu > li {
  padding-inline: 0.4rem !important;
}
body.app-detail-page .nav-menu > li > a {
  color: #4A4E3A !important;
  font-size: 0.9rem !important;
  font-weight: 450 !important;
  background: transparent !important;
  border-radius: 9px !important;
  margin: 0 !important;
  padding: 0.55rem 0.95rem !important;
  letter-spacing: 0.02em !important;
}
body.app-detail-page .nav-menu > li > a:hover,
body.app-detail-page .nav-menu > li > a:focus,
body.app-detail-page .nav-menu > li > a.active {
  color: #4A3326 !important;
  background: rgba(74, 78, 58, 0.08) !important;
}
body.app-detail-page .nav-menu > li > a::after {
  content: none !important;
  display: none !important;
}
body.app-detail-page .nav-menu > li.has-submenu > a::after {
  content: none !important;
  display: none !important;
}
body.app-detail-page .footer-logo-text { color: var(--ink) !important; }
body.app-detail-page .footer-tagline,
body.app-detail-page .footer-bottom-text { color: var(--stone) !important; }

/* Nav submenu */
body.app-detail-page .nav .has-submenu { position: relative; }
body.app-detail-page .nav .has-submenu > .submenu { display: none; }
body.app-detail-page .nav .has-submenu:hover > .submenu,
body.app-detail-page .nav .has-submenu:focus-within > .submenu,
body.app-detail-page .nav .submenu:hover { display: block !important; }
body.app-detail-page .nav .has-submenu::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
  z-index: 1001;
  pointer-events: auto;
}
body.app-detail-page .nav .submenu a { transition: background 0.15s ease, color 0.15s ease; }
body.app-detail-page .nav .submenu a:hover { background: rgba(74, 78, 58, 0.08); color: #4A4E3A; }
body.app-detail-page .nav .has-submenu > a { display: inline-flex; align-items: center; gap: 6px; }
body.app-detail-page .nav .has-submenu > a::after {
  content: none;
  display: none;
}
body.app-detail-page .nav .submenu,
body.app-detail-page .nav .submenu-nested {
  background: #ffffff !important;
  border: 1px solid rgba(74, 78, 58, 0.14) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 40px rgba(74, 78, 58, 0.12) !important;
  padding: 6px !important;
}
@media (min-width: 901px) {
  body.app-detail-page .nav .submenu > li.has-submenu {
    position: relative !important;
  }
  body.app-detail-page .nav .submenu > li.has-submenu::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    right: -14px !important;
    width: 18px !important;
    height: 100% !important;
    z-index: 1002 !important;
  }
  body.app-detail-page .nav .submenu-nested {
    left: calc(100% - 2px) !important;
    top: 0 !important;
    min-width: 168px !important;
    padding: 5px !important;
    margin: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 28px rgba(44, 43, 41, 0.12) !important;
    display: none !important;
  }
  body.app-detail-page .nav .submenu > li.has-submenu:hover > .submenu-nested,
  body.app-detail-page .nav .submenu > li.has-submenu:focus-within > .submenu-nested,
  body.app-detail-page .nav .submenu-nested:hover {
    display: block !important;
  }
  body.app-detail-page .nav .submenu a:hover {
    background-color: rgba(74, 78, 58, 0.1) !important;
    color: #4A4E3A !important;
  }
  body.app-detail-page .nav .submenu-nested a {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.55rem 0.7rem !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
  }
  body.app-detail-page .nav .submenu-nested a img {
    width: 15px !important;
    height: 15px !important;
    padding: 7px !important;
    box-sizing: content-box !important;
    object-fit: contain !important;
    background: rgba(74, 78, 58, 0.07) !important;
    border-radius: 8px !important;
    display: block !important;
  }
  body.app-detail-page .nav .submenu-nested a:hover img {
    background: rgba(74, 78, 58, 0.12) !important;
  }
}
body.app-detail-page .nav .has-submenu > .submenu {
  left: 0 !important;
  top: calc(100% + 8px) !important;
  margin-top: 0 !important;
  z-index: 1000 !important;
}
body.app-detail-page .nav .submenu li.has-submenu:hover > .submenu-nested,
body.app-detail-page .nav .submenu li.has-submenu:focus-within > .submenu-nested {
  display: block !important;
}
body.app-detail-page .nav .submenu-nested:hover { display: block !important; }
body.app-detail-page .nav .submenu a::after { display: none !important; }

/* Hero / sections */
body.app-detail-page main > section:first-of-type:not(.ad-hero) {
  background: var(--jp-soft-white) !important;
  padding: calc(80px + clamp(1.25rem, 3vw, 2rem)) 0 clamp(2rem, 4vw, 3rem) !important;
}
/* App icon only — not platform logos or store badges */
body.app-detail-page main > section:first-of-type > .container > img {
  box-shadow: none !important;
  border: 1px solid var(--line);
}
/* App Store / Play badge image links only — not text CTA buttons */
body.app-detail-page a[href*="apps.apple.com"]:has(img),
body.app-detail-page a[href*="play.google.com"]:has(img),
body.app-detail-page a:has(img[alt*="App Store"]),
body.app-detail-page a:has(img[alt*="Google Play"]) {
  display: inline-block;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  line-height: 0;
  outline: none;
  transform: none !important;
  transition: opacity 0.2s ease;
}
body.app-detail-page a[href*="apps.apple.com"]:has(img):hover,
body.app-detail-page a[href*="play.google.com"]:has(img):hover,
body.app-detail-page a:has(img[alt*="App Store"]):hover,
body.app-detail-page a:has(img[alt*="Google Play"]):hover {
  opacity: 0.85;
  transform: none !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
body.app-detail-page a[href*="apps.apple.com"] img,
body.app-detail-page a[href*="play.google.com"] img,
body.app-detail-page a:has(img[alt*="App Store"]) img,
body.app-detail-page a:has(img[alt*="Google Play"]) img {
  border: none !important;
  box-shadow: none !important;
  display: block;
}
/* Text store CTAs (Google Play / beta / Mac download) */
body.app-detail-page .ad-hero .btn-primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem !important;
  line-height: 1.2 !important;
  background: var(--forest) !important;
  border: 1px solid var(--forest) !important;
  color: #fff !important;
  border-radius: 6px !important;
  text-decoration: none !important;
}
body.app-detail-page .ad-hero .btn-primary:hover {
  opacity: 0.92;
  background: var(--jp-walnut) !important;
  border-color: var(--jp-walnut) !important;
  color: #fff !important;
}
body.app-detail-page main > section:first-of-type h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem) !important;
  font-weight: 400 !important;
  letter-spacing: -0.03em !important;
  color: var(--ink) !important;
}
body.app-detail-page main > section h2 {
  font-size: clamp(1.45rem, 3vw, 1.85rem) !important;
  font-weight: 400 !important;
  color: var(--ink) !important;
}
body.app-detail-page main > section:not(.ad-hero) {
  padding-top: clamp(2.25rem, 4.5vw, 3.5rem) !important;
  padding-bottom: clamp(2.25rem, 4.5vw, 3.5rem) !important;
}
body.app-detail-page main > section[style*="#faf9f6"],
body.app-detail-page main > section[style*="#F7F5F0"] {
  background: var(--jp-soft-white) !important;
}
body.app-detail-page main > section[style*="#fff"],
body.app-detail-page main > section[style*="#ffffff"] {
  background: #ffffff !important;
}

/* Feature list */
body.app-detail-page .asl-category-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 0.75rem;
}
body.app-detail-page .asl-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
body.app-detail-page .asl-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 1.15rem;
  align-items: start;
  padding: 1.1rem 0.25rem;
  border-radius: 0;
  text-decoration: none;
  color: inherit;
  position: relative;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.2s ease;
}
body.app-detail-page .asl-list .asl-row:last-child { border-bottom: none; }
body.app-detail-page .asl-row:hover {
  background: transparent;
  opacity: 0.78;
}
body.app-detail-page .asl-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--stone);
  text-align: right;
  padding-top: 0.35rem;
}
body.app-detail-page .asl-name {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
body.app-detail-page .asl-desc {
  font-size: 0.9rem;
  color: var(--soft);
  line-height: 1.55;
  margin: 0;
}

/* Tech chips */
body.app-detail-page .tech-chip {
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--forest);
  background: color-mix(in srgb, var(--jp-soft-white) 70%, var(--jp-natural));
  border-radius: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
}

/* Screenshots */
body.app-detail-page .shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
body.app-detail-page .shot-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: none;
  border: 1px solid var(--line);
}
body.app-detail-page .shot-card p {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  color: var(--stone);
  line-height: 1.45;
  text-align: center;
}

/* Changelog */
body.app-detail-page .changelog-item {
  border-bottom: 1px solid var(--line);
}
body.app-detail-page .changelog-item:last-child { border-bottom: none; }
body.app-detail-page .changelog-item.is-changelog-hidden {
  display: none;
}
body.app-detail-page .changelog-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  color: var(--ink);
}
body.app-detail-page .changelog-content {
  display: none;
  padding: 0 0 1.2rem;
  color: var(--soft);
  font-size: 0.92rem;
  line-height: 1.65;
}
body.app-detail-page .changelog-content p {
  margin: 0.85rem 0 0.35rem;
  color: #2C2B29;
  font-size: 0.9rem;
}
body.app-detail-page .changelog-content p:first-child {
  margin-top: 0;
  color: var(--soft);
  font-weight: 400;
}
body.app-detail-page .changelog-content ul { margin: 0.35rem 0 0.4rem 1.1rem; }
body.app-detail-page .changelog-content li { margin-bottom: 0.4rem; }
body.app-detail-page .changelog-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 1.15rem auto 0;
  padding: 0.65rem 1.15rem;
  border: 1px solid rgba(74, 78, 58, 0.18);
  border-radius: 10px;
  background: #fff;
  color: #4A4E3A;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
body.app-detail-page .changelog-more:hover {
  background: #4A4E3A;
  border-color: #4A4E3A;
  color: #f7f5f0;
}
body.app-detail-page .changelog-more[hidden] {
  display: none !important;
}

/* Buttons */
body.app-detail-page .btn {
  border-radius: 6px !important;
  font-weight: 500 !important;
}
body.app-detail-page .btn-primary,
body.app-detail-page a.btn[style*="#0F5132"],
body.app-detail-page a.btn[style*="#4A4E3A"] {
  background: var(--forest) !important;
  border-color: var(--forest) !important;
  color: #fff !important;
}
body.app-detail-page .btn-secondary {
  background: transparent !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
}

@media (max-width: 900px) {
  body.app-detail-page .shot-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  body.app-detail-page .nav-container { padding: 0 1.25rem !important; }
}
@media (max-width: 560px) {
  body.app-detail-page .shot-grid { grid-template-columns: 1fr; }
}
    body.app-detail-page .ad-wrap {
      max-width: 1080px;
      margin: 0 auto;
      padding-left: clamp(1.25rem, 4vw, 3rem);
      padding-right: clamp(1.25rem, 4vw, 3rem);
    }
    body.app-detail-page .ad-kicker {
      display: inline-flex;
      align-items: center;
      gap: 0.55rem;
      margin: 0 0 0.85rem;
      font-size: 0.7rem;
      font-weight: 500;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: #4A4E3A;
    }
    body.app-detail-page .ad-kicker img { display: block; opacity: 0.85; }
    body.app-detail-page .ad-section-head {
      text-align: center;
      margin: 0 auto 2rem;
      max-width: 36em;
    }
    body.app-detail-page .ad-section-head h2 { margin: 0 0 0.55rem; }
    body.app-detail-page .ad-section-head p { margin: 0; color: #8A7968; line-height: 1.6; }

    body.app-detail-page .ad-hero {
      background: #F7F5F0;
      padding: calc(80px + 1.5rem) 0 clamp(2.25rem, 4vw, 3.25rem) !important;
      overflow: hidden;
      text-align: center;
    }
    body.app-detail-page .ad-hero-copy {
      text-align: center;
      max-width: 40em;
      margin-left: auto;
      margin-right: auto;
    }
    body.app-detail-page .ad-kicker {
      justify-content: center;
      margin-left: auto;
      margin-right: auto;
      width: fit-content;
    }
    body.app-detail-page .ad-hero-icon {
      width: 92px;
      height: 92px;
      border-radius: 22px;
      display: block;
      margin: 0 auto 1.2rem;
      background: #fff;
      border: 1px solid rgba(74,78,58,0.14);
      object-fit: contain;
    }
    body.app-detail-page .ad-hero h1 {
      margin: 0 0 0.85rem;
      font-size: clamp(2.2rem, 5vw, 3.2rem);
      line-height: 1.05;
    }
    body.app-detail-page .ad-lead {
      margin: 0 auto 1rem;
      color: #8A7968;
      font-size: 1.05rem;
      line-height: 1.7;
      max-width: 34em;
    }
    body.app-detail-page .ad-rank {
      margin: 0 0 1.35rem;
      color: #4A4E3A;
      font-size: 0.88rem;
      letter-spacing: 0.02em;
    }

    body.app-detail-page .ad-miles {
      background: #fff;
      padding: clamp(2.5rem, 5vw, 4rem) 0;
    }
    body.app-detail-page .ad-miles .ad-wrap {
      max-width: 40rem;
    }
    body.app-detail-page .ad-milestones {
      list-style: none;
      margin: 0;
      padding: 0;
      border-top: 1px solid rgba(74, 78, 58, 0.12);
    }
    body.app-detail-page .ad-milestones li {
      border-bottom: 1px solid rgba(74, 78, 58, 0.12);
    }
    body.app-detail-page .ad-milestones button {
      width: 100%;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 0.75rem 1.25rem;
      align-items: baseline;
      padding: 1.05rem 0;
      background: none;
      border: none;
      text-align: left;
      cursor: pointer;
      font-family: var(--sans);
      color: inherit;
    }
    body.app-detail-page .ad-milestones .ms-row {
      width: 100%;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 0.75rem 1.25rem;
      align-items: baseline;
      padding: 1.05rem 0;
    }
    body.app-detail-page .ad-milestones button:hover .ms-title {
      color: #4A4E3A;
    }
    body.app-detail-page .ad-milestones .ms-app {
      display: block;
      font-size: 0.7rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #4A4E3A;
      margin-bottom: 0.25rem;
    }
    body.app-detail-page .ad-milestones .ms-title {
      display: block;
      font-size: 1.02rem;
      color: #2C2B29;
      line-height: 1.35;
      transition: color 0.2s;
    }
    body.app-detail-page .ad-milestones .ms-note {
      display: block;
      margin-top: 0.25rem;
      font-size: 0.84rem;
      color: #8A7968;
      line-height: 1.4;
    }
    body.app-detail-page .ad-milestones time {
      font-size: 0.78rem;
      color: #8A7968;
      white-space: nowrap;
      padding-top: 0.15rem;
    }
    body.app-detail-page .ad-mile-modal {
      position: fixed;
      inset: 0;
      z-index: 10000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1.25rem;
      background: rgba(44, 43, 41, 0.72);
      backdrop-filter: blur(6px);
    }
    body.app-detail-page .ad-mile-modal.is-open {
      display: flex;
    }
    body.app-detail-page .ad-mile-modal[hidden] {
      display: none !important;
    }
    body.app-detail-page .ad-mile-modal-inner {
      width: min(100%, 42rem);
      max-height: min(90vh, 52rem);
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
    }
    body.app-detail-page .ad-mile-modal img {
      width: 100%;
      max-height: min(78vh, 44rem);
      object-fit: contain;
      border-radius: 12px;
      background: #F7F5F0;
    }
    body.app-detail-page .ad-mile-modal-caption {
      margin: 0;
      text-align: center;
      color: #F7F5F0;
      font-size: 0.92rem;
      line-height: 1.45;
    }
    body.app-detail-page .ad-mile-modal-close {
      align-self: flex-end;
      border: 1px solid rgba(247, 245, 240, 0.28);
      background: transparent;
      color: #F7F5F0;
      border-radius: 999px;
      padding: 0.4rem 0.9rem;
      font-family: var(--sans);
      font-size: 0.82rem;
      cursor: pointer;
    }

    body.app-detail-page .ad-story {
      background: #fff;
      padding: clamp(2.5rem, 5vw, 4rem) 0;
      text-align: center;
    }
    body.app-detail-page .ad-story-inner {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1.35rem;
      max-width: 42rem;
      margin: 0 auto;
      text-align: center;
      justify-items: center;
    }
    body.app-detail-page .ad-story-inner > div {
      width: 100%;
      text-align: center;
    }
    body.app-detail-page .ad-story-text {
      text-align: center;
    }
    body.app-detail-page .ad-story h2,
    body.app-detail-page .ad-craft h2 {
      margin: 0 auto;
      font-size: clamp(1.6rem, 3vw, 2.1rem);
      line-height: 1.15;
      text-align: center;
    }
    body.app-detail-page .ad-story-text p {
      margin: 0 0 1rem;
      color: #8A7968;
      line-height: 1.75;
      font-size: 1.02rem;
    }
    body.app-detail-page .ad-story-text p:last-child { margin-bottom: 0; }
    body.app-detail-page .ad-story-text a {
      color: #4A4E3A;
      text-decoration: underline;
      text-underline-offset: 0.18em;
      text-decoration-thickness: 1px;
    }
    body.app-detail-page .ad-story-text a:hover {
      color: #2C2B29;
    }

    body.app-detail-page .ad-features {
      background: #F7F5F0;
      padding: clamp(2.5rem, 5vw, 4rem) 0;
    }
    body.app-detail-page .ad-cap-groups {
      display: grid;
      gap: clamp(2rem, 4vw, 3rem);
      max-width: 56rem;
      margin: 0 auto;
    }
    body.app-detail-page .ad-cap-label {
      margin: 0 0 1rem;
      font-size: 0.7rem;
      font-weight: 500;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: #4A4E3A;
      padding-bottom: 0.75rem;
      border-bottom: 1px solid rgba(74, 78, 58, 0.14);
    }
    body.app-detail-page .ad-cap-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 1.5rem 1.75rem;
    }
    body.app-detail-page .ad-cap {
      margin: 0;
    }
    body.app-detail-page .ad-cap-num {
      display: block;
      margin: 0 0 0.55rem;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 0.72rem;
      font-weight: 500;
      letter-spacing: 0.06em;
      color: #8A7968;
    }
    body.app-detail-page .ad-cap h3 {
      margin: 0 0 0.45rem;
      font-size: 1.2rem;
      line-height: 1.2;
    }
    body.app-detail-page .ad-cap p {
      margin: 0;
      color: #8A7968;
      font-size: 0.94rem;
      line-height: 1.55;
    }

    body.app-detail-page .ad-craft {
      background: #fff;
      padding: clamp(2.5rem, 5vw, 4rem) 0;
    }
    body.app-detail-page .ad-craft-photo {
      margin: 0;
      justify-self: center;
    }
    body.app-detail-page .ad-craft-photo img {
      width: min(360px, 100%);
      height: auto;
      display: block;
      border-radius: 16px;
      border: 1px solid rgba(74,78,58,0.14);
    }
    body.app-detail-page .ad-craft-photo figcaption {
      margin-top: 0.7rem;
      text-align: center;
      font-size: 0.82rem;
      color: #8A7968;
      line-height: 1.45;
      max-width: 22em;
      margin-left: auto;
      margin-right: auto;
    }
    body.app-detail-page .ad-craft .ad-watch-copy a {
      color: #4A4E3A;
      text-decoration: underline;
      text-underline-offset: 0.18em;
      text-decoration-thickness: 1px;
    }
    body.app-detail-page .ad-craft .ad-watch-copy a:hover {
      color: #2C2B29;
    }

    body.app-detail-page .ad-watch {
      background: #F7F5F0;
      padding: clamp(2.75rem, 6vw, 4.5rem) 0;
    }
    body.app-detail-page .ad-watch-inner {
      display: grid;
      grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.75fr);
      gap: clamp(1.75rem, 4vw, 3.5rem);
      align-items: center;
    }
    body.app-detail-page .ad-watch-copy h2 {
      margin: 0 0 0.9rem;
      font-size: clamp(1.7rem, 3.2vw, 2.3rem);
      line-height: 1.12;
    }
    body.app-detail-page .ad-watch-copy p {
      margin: 0 0 0.85rem;
      color: #8A7968;
      line-height: 1.7;
      font-size: 1.02rem;
      max-width: 32em;
    }
    body.app-detail-page .ad-watch-note {
      color: #4A4E3A !important;
      font-size: 0.92rem !important;
    }
    body.app-detail-page .ad-watch-frame {
      margin: 0;
      justify-self: center;
    }
    body.app-detail-page .ad-watch-frame img {
      width: min(240px, 70vw);
      height: auto;
      display: block;
      border-radius: 36px;
      border: 1px solid rgba(74,78,58,0.16);
      background: #111;
      animation: adFloat 5s ease-in-out infinite;
    }
    @keyframes adFloat {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-8px); }
    }

    body.app-detail-page .ad-shots {
      background: #fff;
      padding: clamp(2.5rem, 5vw, 4rem) 0;
    }
    /* Without Watch, craft + Product both sat on white — give Product the cream band Watch provides on iOS */
    body.app-detail-page:not(:has(.ad-watch)) .ad-shots {
      background: #F7F5F0;
    }
    body.app-detail-page:not(:has(.ad-watch)) .ad-tech {
      background: #fff;
    }
    body.app-detail-page:not(:has(.ad-watch)) .ad-change {
      background: #F7F5F0;
    }
    body.app-detail-page:not(:has(.ad-watch)) .ad-miles {
      background: #F7F5F0;
    }
    body.app-detail-page:not(:has(.ad-watch)) .ad-miles + .ad-change {
      background: #fff;
    }
    /* Without Watch and Product shots, craft + Tech both sat on white — give Tech its own cream band */
    body.app-detail-page:not(:has(.ad-watch)):not(:has(.ad-shots)) .ad-tech {
      background: #F7F5F0;
    }
    body.app-detail-page:not(:has(.ad-watch)):not(:has(.ad-shots)) .ad-change {
      background: #fff;
    }
    body.app-detail-page:not(:has(.ad-watch)):not(:has(.ad-shots)) .ad-miles {
      background: #fff;
    }
    body.app-detail-page:not(:has(.ad-watch)):not(:has(.ad-shots)) .ad-miles + .ad-change {
      background: #F7F5F0;
    }
    body.app-detail-page .ad-shot-rail {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 1rem;
    }
    body.app-detail-page .ad-shot-rail--ipad {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: clamp(0.85rem, 1.6vw, 1.35rem);
      max-width: none;
      margin: 0 auto;
      width: 100%;
    }
    body.app-detail-page .ad-shot-rail--ipad-3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    body.app-detail-page .ad-shots:has(.ad-shot-rail--ipad) .ad-wrap {
      max-width: 1520px;
      padding-left: clamp(0.75rem, 2vw, 1.5rem);
      padding-right: clamp(0.75rem, 2vw, 1.5rem);
    }
    body.app-detail-page .ad-shot-rail figure { margin: 0; }
    body.app-detail-page .ad-shot-rail img {
      width: 100%;
      height: auto;
      display: block;
      border-radius: 12px;
      border: 1px solid rgba(74,78,58,0.12);
      background: #F7F5F0;
    }
    body.app-detail-page .ad-shot-rail--ipad img {
      border-radius: 16px;
      border: none;
      background: transparent;
    }
    body.app-detail-page .ad-shot-rail figcaption {
      margin-top: 0.65rem;
      text-align: center;
      font-size: 0.82rem;
      color: #8A7968;
    }
    body.app-detail-page .ad-shot-rail--ipad figcaption {
      margin-top: 0.85rem;
      font-size: 0.9rem;
    }

    body.app-detail-page .ad-tech {
      background: #F7F5F0;
      padding: clamp(2.5rem, 5vw, 4rem) 0;
    }
    body.app-detail-page .ad-tech-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1.5rem 1.75rem;
      max-width: 56rem;
      margin: 0 auto;
    }

    body.app-detail-page .ad-change {
      background: #fff;
      padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3.5rem, 7vw, 5.5rem);
    }
    /* Milestones (white) → Changelog (cream) so adjacent bands don’t match */
    body.app-detail-page .ad-miles + .ad-change {
      background: #F7F5F0;
    }

    @media (max-width: 1100px) {
      body.app-detail-page .ad-shot-rail--ipad-3 {
        grid-template-columns: 1fr;
        max-width: min(100%, 48rem);
      }
    }
    @media (max-width: 900px) {
      body.app-detail-page .ad-watch-inner {
        grid-template-columns: 1fr;
      }
      body.app-detail-page .ad-cap-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
      }
      body.app-detail-page .ad-tech-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      body.app-detail-page .ad-shot-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      body.app-detail-page .ad-shot-rail--ipad {
        grid-template-columns: 1fr;
        max-width: min(100%, 42rem);
      }
      body.app-detail-page .ad-shot-rail--ipad-3 {
        grid-template-columns: 1fr;
        max-width: min(100%, 42rem);
      }
      body.app-detail-page .ad-watch-frame { order: -1; }
      body.app-detail-page .ad-craft-photo { order: -1; }
    }
    @media (max-width: 560px) {
      body.app-detail-page .ad-shot-rail { grid-template-columns: 1fr 1fr; }
      body.app-detail-page .ad-shot-rail--ipad { grid-template-columns: 1fr; }
      body.app-detail-page .ad-shot-rail--ipad-3 { grid-template-columns: 1fr; }
    }
    @media (prefers-reduced-motion: reduce) {
      body.app-detail-page .ad-watch-frame img {
        animation: none;
        opacity: 1;
        transform: none;
      }
    }

/* Optional fixed grids */
body.app-detail-page .ad-cap-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.app-detail-page .ad-cap-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.app-detail-page .ad-tech-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  body.app-detail-page .ad-cap-grid--4,
  body.app-detail-page .ad-cap-grid--3,
  body.app-detail-page .ad-tech-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile: same centering + header clearance as contact/blog/about */
@media (max-width: 640px) {
  body.app-detail-page .nav-container {
    height: 72px !important;
    padding-left: max(1.25rem, env(safe-area-inset-left)) !important;
    padding-right: max(1.25rem, env(safe-area-inset-right)) !important;
  }
  body.app-detail-page .nav-menu {
    min-height: 0 !important;
    height: auto !important;
    max-height: calc(100vh - 72px) !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
  }
  body.app-detail-page .nav-menu > li {
    flex: 0 0 auto !important;
    width: 100% !important;
    padding-inline: 0 !important;
  }
  body.app-detail-page .nav-menu > li > a {
    padding: 0.95rem 1.5rem !important;
    font-size: 1.05rem !important;
  }
  body.app-detail-page .nav-menu > li > a::after {
    display: none !important;
  }
  body.app-detail-page .nav-menu .has-submenu > a::after {
    content: '▸' !important;
    display: inline !important;
    position: absolute !important;
    right: 1.5rem !important;
    top: 50% !important;
    left: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
  }

  body.app-detail-page .ad-hero {
    padding: calc(80px + 1.75rem) 0 2.5rem !important;
    text-align: center;
  }
  body.app-detail-page .ad-wrap {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }
  body.app-detail-page .ad-hero-icon {
    width: 72px !important;
    height: 72px !important;
    border-radius: 16px;
    margin-bottom: 1rem;
  }
  body.app-detail-page .ad-hero h1 {
    font-size: clamp(2.1rem, 9vw, 2.6rem) !important;
    text-align: center;
  }
  body.app-detail-page .ad-kicker {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
  }
  body.app-detail-page .ad-section-head,
  body.app-detail-page .ad-story,
  body.app-detail-page .ad-features,
  body.app-detail-page .ad-craft,
  body.app-detail-page .ad-watch,
  body.app-detail-page .ad-shots,
  body.app-detail-page .ad-tech,
  body.app-detail-page .ad-change {
    text-align: center;
  }
  body.app-detail-page .ad-story-inner,
  body.app-detail-page .ad-story-text,
  body.app-detail-page .ad-section-head {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  body.app-detail-page .ad-cap-label {
    text-align: center;
  }
  body.app-detail-page .ad-cap {
    text-align: center;
  }
  body.app-detail-page .ad-cap-grid {
    grid-template-columns: 1fr !important;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }
  body.app-detail-page .ad-tech-grid {
    grid-template-columns: 1fr !important;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  body.app-detail-page .ad-craft-inner,
  body.app-detail-page .ad-watch-inner {
    text-align: center;
    justify-items: center;
  }
  body.app-detail-page .ad-shot-rail {
    justify-content: center;
  }
  body.app-detail-page .asl-list,
  body.app-detail-page .asl-row {
    text-align: left;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }
  body.app-detail-page main > section h2 {
    text-align: center;
  }
  body.app-detail-page .changelog-list {
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  body.app-detail-page .changelog-header {
    justify-content: center;
    text-align: center;
    gap: 0.65rem;
  }
  body.app-detail-page .changelog-header > span:first-child {
    justify-content: center;
  }
  body.app-detail-page .changelog-content {
    text-align: center;
  }
  body.app-detail-page .changelog-content ul {
    margin-left: 0;
    padding-left: 0;
    list-style-position: inside;
  }
}
