:root {
  --ink: #0C3A52;
  --teal: #1D7A9E;
  --green: #1D9E75;
  --orange: #EF9F27;
  --blue: #378ADD;
  --purple: #7F77DD;
  --pink: #D4537E;
  --bg: #ffffff;
  --bg-soft: #F0F6F5;
  --bg-alt: #F7FAFA;
  --bg-trust: #EAF3F4;
  --line: rgba(12, 58, 82, .1);
  --shadow-card: 0 6px 20px rgba(12, 58, 82, .06);
  --shadow-pop: 0 20px 45px rgba(12, 58, 82, .16);
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1160px;
  --font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px; /* под липкий хедер ≈63px (site-chrome .index-header) */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 24px;
}

@media (min-width: 901px) {
  .container { padding: 0 48px; }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand strong {
  font-size: 21px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 36px);
  font-weight: 700;
  font-size: 15px;
}

.nav-links a { opacity: .7; }
.nav-links a:hover { opacity: 1; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 40px;
  min-height: 40px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px rgba(12, 58, 82, .04);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 0;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: box-shadow .18s ease, transform .18s ease;
}

.menu-toggle::before {
  transform: translateY(-6px);
  box-shadow: 0 6px 0 currentColor;
}

.menu-toggle::after { transform: translateY(6px); }

.menu-toggle:hover {
  background: #E8F3F2;
  box-shadow: inset 0 0 0 1px rgba(12, 58, 82, .08);
}

.nav.is-open .menu-toggle,
header.is-open .menu-toggle {
  background: #E8F3F2;
  box-shadow: inset 0 0 0 1px rgba(12, 58, 82, .08);
}

.nav.is-open .menu-toggle::before,
header.is-open .menu-toggle::before {
  transform: translateY(0) rotate(45deg);
  box-shadow: none;
}

.nav.is-open .menu-toggle::after,
header.is-open .menu-toggle::after {
  transform: translateY(0) rotate(-45deg);
}

.lang-switcher { position: relative; }

.lang-btn {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  background: var(--bg-soft);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(12, 58, 82, .18);
}

.lang-btn .arrow {
  width: 10px;
  height: 10px;
  transition: transform .18s ease;
}

.lang-switcher.open .lang-btn .arrow { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 140px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
}

.lang-switcher.open .lang-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-menu a {
  min-height: 38px;
  padding: 0 11px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  opacity: .75;
}

.lang-menu a:hover { background: var(--bg-alt); opacity: 1; }
.lang-menu a.current { color: var(--teal); background: var(--bg-soft); opacity: 1; }

/* .index-header chrome moved to assets/css/site-chrome.css (single source of truth). */

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 16px 32px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
}

.btn-primary { background: var(--teal); color: #fff; }
.btn-link {
  font-weight: 700;
  font-size: 15px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
  width: fit-content;
}

.btn-store {
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 13px;
}

.btn-store.ghost { background: rgba(255, 255, 255, .1); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 88px) 0;
  background: linear-gradient(180deg, #EAF4F3 0%, #F0F6F5 55%, #E3EFEC 100%);
}

.hero .blob {
  position: absolute;
  border-radius: 50%;
  background: #DCEEEA;
  opacity: .6;
  z-index: 0;
}

.hero .blob-1 { left: -8%; bottom: -150px; width: 480px; height: 320px; }
.hero .blob-2 { left: 22%; bottom: -190px; width: 640px; height: 400px; background: #CFE8E2; opacity: .5; }
.hero .blob-3 { right: -10%; bottom: -170px; width: 540px; height: 350px; background: #D7EEE9; }

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero-eyebrow {
  font-weight: 800;
  font-size: 13px;
  color: var(--green);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hero-title {
  font-weight: 900;
  line-height: 1.05;
  font-size: clamp(28px, 4vw, 42px);
}

.hero-title .big {
  display: block;
  font-size: clamp(46px, 7vw, 92px);
  color: var(--teal);
}

.hero-lede {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.5;
  opacity: .75;
  max-width: 460px;
}

.hero-copy { display: flex; flex-direction: column; gap: 20px; }

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 8px;
}

/* hero screenshots — animated deck of 5, ring carousel */
.hero-art {
  position: relative;
  height: 320px;
  transform: translateY(-15%);
}

.hero-art .shot {
  position: absolute;
  max-width: none;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 16px;
  border: 6px solid #fff;
  box-shadow: 0 20px 40px rgba(12,58,82,.22);
  transition:
    left .7s cubic-bezier(.4,0,.2,1),
    top .7s cubic-bezier(.4,0,.2,1),
    width .7s cubic-bezier(.4,0,.2,1),
    transform .7s cubic-bezier(.4,0,.2,1),
    opacity .45s ease;
}

.hero-art .shot-1 { left: -4%; top: 8px;  width: 110%; transform: rotate(-6deg); z-index: 5; border-width: 6px; box-shadow: 0 28px 56px rgba(12,58,82,.32); }
.hero-art .shot-2 { left: 6%;  top: 30px; width: 96%;  transform: rotate(4deg);  z-index: 4; }
.hero-art .shot-3 { left: 12%; top: 50px; width: 86%;  transform: rotate(10deg); z-index: 3; }
.hero-art .shot-4 { left: 16%; top: 68px; width: 79%;  transform: rotate(16deg); z-index: 2; }
.hero-art .shot-5 { left: 19%; top: 84px; width: 72%;  transform: rotate(22deg); z-index: 1; }

.hero-art .shot.is-leaving {
  transform: translateY(-70px) translateX(-16px) rotate(-24deg) scale(.85);
  opacity: 0;
  z-index: 6;
}
.hero-art .shot.is-entering { opacity: 0; }
.hero-art .shot.is-resetting { transition: none !important; }

@media (max-width: 900px) { .hero-art { max-width: 420px; margin-inline: auto; width: 100%; height: 230px; } }

/* ---------- Fact strip ---------- */

.fact-strip {
  display: flex;
  justify-content: center;
  gap: 80px;
  padding: 40px 0;
  background: #fff;
  flex-wrap: wrap;
}

.fact { text-align: center; }
.fact b { display: block; font-size: 34px; font-weight: 900; color: var(--teal); }
.fact span { display: block; font-size: 14px; font-weight: 700; opacity: .6; }

/* ---------- Section headings ---------- */

.section { padding: clamp(48px, 8vw, 72px) 0; }
.section.alt { background: var(--bg-alt); }
.section.trust { background: var(--bg-trust); }

.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 900; margin: 0; }
.section-head p { font-weight: 600; font-size: 16px; opacity: .6; margin: 8px 0 0; }

/* ---------- App grid ---------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.app-card {
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

a.app-card { cursor: pointer; }
.app-card.is-static { cursor: default; }

.app-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-card-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.app-card-head h3 { margin: 0; font-size: 19px; font-weight: 800; }

.app-card-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.app-card-tags span {
  background: rgba(255, 255, 255, .75);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 12px;
}

.app-card p { margin: 0; font-size: 14px; line-height: 1.5; opacity: .75; font-weight: 600; min-height: calc(1.5em * 3); }

.app-card-shot {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  box-sizing: border-box;
  padding: 6px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(12,58,82,.16);
}

.app-card-link { display: block; min-height: 1.5em; font-weight: 700; font-size: 14px; color: var(--teal); }

/* per-app accent backgrounds */
.app-card.tint-animals { background: #E4F5EF; }
.app-card.tint-vegefruits { background: #FDF1E1; }
.app-card.tint-cars { background: #E8F1FC; }
.app-card.tint-nature { background: #EEEDFB; }
.app-card.tint-human-world { background: #FBEAEF; }
.app-card.tint-learn2read { background: #E3F1F5; }

/* ---------- Reviews ---------- */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review .stars { color: var(--orange); font-size: 16px; letter-spacing: 2px; }
.review p { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.5; font-style: italic; }
.review .author { font-weight: 800; font-size: 14px; opacity: .7; }

/* ---------- Trust grid ---------- */

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.trust-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-icon .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
}

.trust-item h3 { margin: 0; font-size: 16px; font-weight: 800; }
.trust-item p { margin: 0; font-size: 14px; line-height: 1.4; opacity: .6; font-weight: 600; }

.dot-green { background: var(--green); }
.dot-teal { background: var(--teal); }
.dot-orange { background: var(--orange); }
.dot-pink { background: var(--pink); }
.dot-purple { background: var(--purple); }
.dot-blue { background: var(--blue); }

/* ---------- Footer ---------- */

.site-footer {
  padding: clamp(40px, 6vw, 56px) 0;
  background: var(--ink);
  color: #fff;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand .brand strong { color: #fff; }
.footer-brand p { margin: 0; font-size: 14px; opacity: .55; max-width: 280px; font-weight: 600; }

.footer-links { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-links a { font-weight: 700; font-size: 14px; opacity: .8; }

.footer-stores { display: flex; gap: 12px; flex-wrap: wrap; }

.footer-rule { height: 1px; background: rgba(255, 255, 255, .12); margin: 36px 0; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom small { opacity: .5; font-weight: 600; font-size: 13px; }

/* .index-footer chrome moved to assets/css/site-chrome.css (single source of truth). */

/* ---------- App detail page ---------- */

.app-hero {
  padding: clamp(40px, 6vw, 64px) 0 48px;
  background: linear-gradient(180deg, #F3FBFD 0%, #E5F5F8 58%, #D5EAEF 100%);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.app-hero-head {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.app-hero-icon {
  width: 104px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 12px 14px rgba(12,58,82,.18));
  flex: 0 0 auto;
}

.app-hero-title { font-size: clamp(28px, 4vw, 40px); font-weight: 900; margin: 0 0 8px; }
.app-hero-sub { font-size: 17px; font-weight: 600; opacity: .7; margin: 0 0 14px; }
.app-hero-stores { display: flex; gap: 12px; flex-wrap: wrap; }

/* Detail hero: copy column + phone mockup */
.app-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.app-hero-copy { max-width: 560px; }
.app-hero-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 22px;
}
.app-hero-brand .app-hero-icon { width: 112px; height: 112px; margin: 0; }
.app-hero-brand .app-hero-title { margin: 0; }
.app-hero-lead {
  font-size: 18px;
  font-weight: 600;
  color: #526A78;
  margin: 0 0 26px;
  max-width: 46ch;
}
.app-hero-note {
  font-size: 14px;
  font-weight: 600;
  color: #5A707D;
  margin: 16px 0 0;
}

/* Download CTA — puzzlebreeze pill form, design-system teal */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 64px;
  padding: 0 34px 0 28px;
  border-radius: 999px;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .01em;
  background: linear-gradient(180deg, #2188AF, #1B7FA7);
  box-shadow: 0 16px 32px rgba(29, 122, 158, .32), 0 4px 0 rgba(12, 58, 82, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(29, 122, 158, .38), 0 4px 0 rgba(12, 58, 82, .06);
}
.btn-download-icon { width: 24px; height: 24px; fill: currentColor; flex: 0 0 auto; }
.btn-download-sep {
  width: 2px;
  height: 34px;
  margin: 0 12px;
  background: rgba(255, 255, 255, .6);
  border-radius: 2px;
  flex: 0 0 auto;
}

/* Landscape phone mockup (screens are 16:9) */
.app-hero-media { display: flex; justify-content: center; }
.hero-phone {
  position: relative;
  width: min(100%, 470px);
  aspect-ratio: 16 / 9;
  padding: 15px 22px;
  border-radius: 34px;
  background: linear-gradient(155deg, #14435E, var(--ink));
  box-shadow: var(--shadow-pop);
}
.hero-phone::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .28);
}
.hero-phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.hero-phone-screen img { width: 100%; height: 100%; object-fit: cover; }

/* Download block (store links target of the hero CTA) */
.download-block { background: var(--bg-soft); }
.download-card {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 40px);
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-card);
}
.download-icon { width: 96px; height: 96px; object-fit: contain; flex: 0 0 auto; }
.download-body { flex: 1 1 320px; }
.download-title { font-size: clamp(21px, 3vw, 27px); font-weight: 900; margin: 0 0 6px; }
.download-sub { font-size: 15.5px; font-weight: 600; opacity: .7; margin: 0 0 20px; }
.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.store-buttons .store {
  flex: 0 0 184px;
  max-width: 184px;
  border-radius: 12px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.store-buttons .store:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(12, 58, 82, .16); }
.store-buttons .store img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 768 / 227;
  object-fit: contain;
  border-radius: 12px;
}
@media (max-width: 560px) {
  .store-buttons .store { flex-basis: calc(50% - 6px); max-width: 220px; }
}

.carousel-shell {
  position: relative;
  margin-inline: calc(clamp(20px, 4vw, 40px) * -1);
  overflow: hidden;
  padding: 4px 0 0;
}

.carousel-shell::before,
.carousel-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 38px;
  pointer-events: none;
}

.carousel-shell::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-soft), rgba(240, 246, 245, 0));
}

.carousel-shell::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-soft), rgba(240, 246, 245, 0));
}

.screens {
  display: flex;
  gap: 18px;
  overflow: visible;
  scrollbar-width: none;
  padding: 8px clamp(28px, 3vw, 48px);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  transition: transform 500ms ease;
  will-change: transform;
}

.screens::-webkit-scrollbar { display: none; }

.screens.dragging {
  cursor: grabbing;
  transition: none;
}

.screens.dragging * {
  pointer-events: none;
}

.shot {
  flex: 0 0 clamp(240px, 32vw, 360px);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 0;
  padding: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(12, 58, 82, .18);
  color: inherit;
  cursor: pointer;
  overflow: hidden;
}

.shot:focus-visible,
.carousel-arrow:focus-visible,
.viewer-close:focus-visible,
.viewer-arrow:focus-visible {
  outline: 3px solid rgba(55, 138, 221, .42);
  outline-offset: 4px;
}

.shot-img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none;
}

.carousel-arrow {
  position: absolute;
  top: 44%;
  z-index: 3;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font-size: 42px;
  font-weight: 900;
  line-height: 34px;
  text-align: center;
  transition: transform .18s ease, opacity .18s ease;
}

.carousel-arrow:hover { transform: scale(1.12); }

.carousel-arrow.prev { left: 18px; }
.carousel-arrow.next { right: 18px; }

.carousel-arrow:disabled,
.viewer-arrow:disabled {
  cursor: default;
  opacity: .42;
  pointer-events: none;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
  position: relative;
  z-index: 4;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  padding: 0;
  transition: width .25s ease, background-color .25s ease;
}

.carousel-dot:focus { outline: 0; }

.carousel-dot.active {
  width: 28px;
  border-radius: 999px;
  background: var(--teal);
}

.screenshot-viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(48px, 1fr) minmax(0, auto) minmax(48px, 1fr);
  align-items: center;
  gap: clamp(10px, 2vw, 20px);
  padding: clamp(18px, 4vw, 42px);
  background: rgba(12, 58, 82, .72);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.screenshot-viewer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.viewer-frame {
  grid-column: 2;
  margin: 0;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.viewer-img {
  width: min(86vw, 900px);
  max-height: min(82vh, 620px);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  object-fit: contain;
  background: #eaf3f4;
}

.viewer-caption {
  color: #fff;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .28);
}

.viewer-close,
.viewer-arrow {
  border: 0;
  border-radius: 999px;
  color: var(--teal);
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
  cursor: pointer;
  font-weight: 900;
}

.viewer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  font-size: 24px;
  line-height: 1;
}

.viewer-arrow {
  width: 48px;
  height: 48px;
  font-size: 30px;
  line-height: 1;
}

.viewer-arrow.prev { justify-self: end; }
.viewer-arrow.next { justify-self: start; }

/* Screenshots carousel — 2-up sliding gallery (puzzleforkids-style).
   Reusable across app-detail pages; scoped under .sc-shell so it never
   collides with the legacy .carousel-shell gallery above. */
.sc-shell {
  position: relative;
  width: min(1140px, calc(100% - 32px));
  margin: 20px auto 0;
  padding-bottom: 34px;
  overflow: hidden;
  --carousel-gap: 12px;
  --slides-visible: 2;
}

.sc-track {
  display: flex;
  gap: var(--carousel-gap);
  cursor: grab;
  touch-action: pan-y;
  transition: transform 500ms ease;
  will-change: transform;
}

.sc-track.dragging {
  cursor: grabbing;
  transition: none;
}

.sc-slide {
  flex: 0 0 calc((100% - (var(--slides-visible) - 1) * var(--carousel-gap)) / var(--slides-visible));
  min-width: 0;
  aspect-ratio: 16 / 9;
}

.sc-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 3px 3px 7px -2px rgba(0, 0, 0, 0.5);
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.sc-arrow {
  position: absolute;
  top: calc(50% - 26px);
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #ffffff;
  font-size: 42px;
  line-height: 34px;
  text-align: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.sc-arrow-left { left: 0; }
.sc-arrow-right { right: 0; }

.sc-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.sc-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  background: #943eda;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.22;
}

.sc-dots button.active { opacity: 1; }

@media (max-width: 767px) {
  .sc-shell {
    width: min(767px, calc(100% - 32px));
    --carousel-gap: 8px;
    --slides-visible: 1;
  }
}

/* Screens gallery frame — mint app-card surface with chevron controls.
   Applied on ru/puzzles-for-kids; iterated in v/cc7-shots-ds.htm.
   Clipping lives on the frame so screenshot shadows can breathe inside. */
.gallery-frame {
  --chip: #83D8BD;
  --chip-strong: #0F8465;
  position: relative;
  padding: 18px 12px 2px;
  overflow: hidden;
  border: 1px solid rgba(12, 58, 82, .09);
  border-radius: 18px;
  background: linear-gradient(180deg, #F8FFFC, #EFFAF6);
  box-shadow: 0 14px 30px rgba(12, 58, 82, .09);
}
.gallery-frame::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--chip);
}

.gallery-frame .sc-shell {
  width: 100%;
  margin: 0;
  overflow: visible;
  padding: 0 0 54px;
  --carousel-gap: 12px;
}

.gallery-frame .sc-slide { padding: 5px; }
.gallery-frame .sc-slide img {
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(12, 58, 82, .16);
}

/* Compact accent chevron circles, docked bottom-centre beside the dots */
.gallery-frame .sc-arrow {
  display: grid;
  place-items: center;
  top: auto;
  bottom: 11px;
  width: 32px;
  height: 32px;
  color: var(--chip-strong);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(15, 132, 101, .28);
  border-radius: 50%;
  font-size: 0;
  line-height: 1;
  text-shadow: none;
  opacity: .78;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}
.gallery-frame .sc-arrow::before {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
}
.gallery-frame .sc-arrow-left::before { transform: translate(calc(-50% + 1px), -50%) rotate(135deg); }
.gallery-frame .sc-arrow-right::before { transform: translate(calc(-50% - 1px), -50%) rotate(-45deg); }
.gallery-frame .sc-arrow:hover {
  transform: translateY(-1px);
  border-color: var(--chip-strong);
  background: #fff;
  opacity: 1;
}
.gallery-frame .sc-arrow-left { left: calc(50% - 125px); }
.gallery-frame .sc-arrow-right { right: calc(50% - 125px); }

.gallery-frame .sc-dots { bottom: 22px; gap: 9px; }
.gallery-frame .sc-dots button {
  width: 9px;
  height: 9px;
  border: 1px solid var(--chip-strong);
  background: transparent;
  opacity: .35;
  transition: width .2s ease, opacity .18s ease, background .18s ease;
}
.gallery-frame .sc-dots button.active {
  width: 24px;
  border-radius: 999px;
  background: var(--chip-strong);
  opacity: 1;
}

@media (max-width: 767px) {
  .gallery-frame { padding: 15px 10px 0; }
  .gallery-frame .sc-shell { --carousel-gap: 10px; --slides-visible: 1; }
  .gallery-frame .sc-slide { padding: 3px; }
  .gallery-frame .sc-slide img { box-shadow: 0 8px 18px rgba(12, 58, 82, .14); }
  .gallery-frame .sc-arrow-left { left: 4px; }
  .gallery-frame .sc-arrow-right { right: 4px; }
}

.app-description {
  padding: clamp(40px, 6vw, 56px) 0;
  max-width: 760px;
  margin-inline: auto;
}

.app-description p { font-size: 18px; line-height: 1.6; font-weight: 600; opacity: .8; margin: 0; }

.learn-grid, .features-grid {
  display: grid;
  gap: 24px;
}

.learn-grid { grid-template-columns: repeat(4, 1fr); }
.features-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }

.learn-item { display: flex; flex-direction: column; gap: 12px; }
.learn-item span { font-size: 16px; font-weight: 800; }

.feature-item { display: flex; gap: 14px; align-items: flex-start; }
.feature-item h3 { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
.feature-item p { margin: 0; font-size: 13px; line-height: 1.4; opacity: .6; font-weight: 600; }

.section h2.section-title { font-size: clamp(22px, 3vw, 30px); font-weight: 900; margin: 0 0 36px; }

.more-apps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.more-app-card {
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.more-app-card img { width: 44px; height: 44px; object-fit: cover; }
.more-app-card span { font-size: 14px; font-weight: 800; }

/* ---------- Legal pages ---------- */

.legal-page {
  background: var(--bg-alt);
  padding: clamp(32px, 6vw, 56px) 0;
}

.legal-document {
  width: min(860px, calc(100% - 40px));
  margin-inline: auto;
  padding: clamp(28px, 5vw, 48px);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.legal-document.c17 {
  max-width: none;
}

.legal-document h1:first-child,
.legal-document p:first-child {
  margin-top: 0;
}

.legal-document a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-document p,
.legal-document li {
  overflow-wrap: anywhere;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; margin-inline: auto; width: 100%; }
  .app-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .learn-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .more-apps-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { flex-direction: column; }
  .app-hero-grid { grid-template-columns: 1fr; }
  .app-hero-copy { max-width: none; }
  .hero-phone { width: min(100%, 440px); }
}

@media (max-width: 760px) {
  .nav { grid-template-columns: minmax(0,1fr) auto; }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 16px;
    right: 16px;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-pop);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease;
  }
  .nav-links a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--bg-alt);
    opacity: 1;
  }
  .nav.is-open .nav-links { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .menu-toggle { display: inline-flex; }
}

@media (max-width: 620px) {
  .trust-grid { grid-template-columns: 1fr; }
  .learn-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .more-apps-grid { grid-template-columns: repeat(2, 1fr); }
  .app-hero-head { flex-direction: column; align-items: flex-start; }
  .app-hero-brand { gap: 16px; }
  .app-hero-brand .app-hero-icon { width: 84px; height: 84px; }
  .app-hero-lead { font-size: 16.5px; }
  .hero-cta-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .carousel-arrow { display: none; }
  .carousel-shell { margin-inline: -20px; }
  .carousel-shell::before,
  .carousel-shell::after { width: 28px; }
  .screens { padding-inline: clamp(24px, 8vw, 64px); gap: 14px; }
  .shot { flex-basis: min(78vw, 320px); border-radius: 12px; }
  .screenshot-viewer {
    grid-template-columns: 1fr 1fr;
    align-content: center;
    justify-items: center;
  }
  .viewer-frame { grid-column: 1 / -1; grid-row: 1; }
  .viewer-img { width: min(90vw, 480px); max-height: 60vh; border-radius: 12px; }
  .viewer-arrow { grid-row: 2; width: 44px; height: 44px; }
  .viewer-arrow.prev,
  .viewer-arrow.next { justify-self: center; }
}

/* ---------- 404 ---------- */

.notfound {
  background: var(--bg-alt);
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 9vw, 96px) 0;
  text-align: center;
}

.notfound-inner {
  width: min(640px, calc(100% - 40px));
  margin-inline: auto;
}

.notfound-eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 800;
  font-size: 13px;
  color: var(--teal);
}

.notfound-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2vw, 14px);
  font-weight: 900;
  font-size: clamp(96px, 22vw, 190px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
}

.notfound-piece {
  display: inline-flex;
  width: clamp(82px, 20vw, 170px);
  height: clamp(82px, 20vw, 170px);
}

.notfound-piece img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: notfound-float 4s ease-in-out infinite;
}

@keyframes notfound-float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-10px) rotate(5deg); }
}

.notfound-title {
  margin: 18px 0 0;
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 900;
}

.notfound-lede {
  max-width: 460px;
  margin: 14px auto 0;
  font-size: clamp(16px, 2.2vw, 18px);
  color: rgba(12, 58, 82, .72);
}

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 32px;
}

.notfound-btn-ghost {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line);
}

.notfound-btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--teal); }

.notfound-help {
  margin-top: 28px;
  font-size: 15px;
  font-weight: 700;
}

.notfound-help a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .notfound-piece img { animation: none; }
}


