/* ── Mobile & tablet polish (Такофф) ── */

:root {
  --page-gutter: clamp(1rem, 4.5vw, 1.35rem);
  --section-y-mobile: clamp(2.35rem, 7.5vw, 3.25rem);
}

/* Safe areas (notch / home indicator) */
@supports (padding: max(0px)) {
  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  }

  .mobile-nav {
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  }

  .site-footer {
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  }

  .modal-overlay {
    padding:
      max(1rem, env(safe-area-inset-top, 0px))
      max(1rem, env(safe-area-inset-right, 0px))
      max(1rem, env(safe-area-inset-bottom, 0px))
      max(1rem, env(safe-area-inset-left, 0px));
  }
}

@media (max-width: 767px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    overflow-x: clip;
  }

  :root {
    --header-h: 47px;
  }

  .container,
  .page-shop .container {
    width: min(1100px, 100% - (var(--page-gutter) * 2));
  }

  /* ── Header ── */
  .header-inner {
    gap: 0.45rem;
  }

  .logo-link {
    flex-shrink: 1;
    min-width: 0;
  }

  .logo-link img {
    height: 26px;
    width: auto;
    max-width: min(42vw, 160px);
  }

  .header-buy-mobile {
    display: none !important;
  }

  .menu-btn {
    flex-shrink: 0;
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav a,
  .site-footer-nav a,
  .qr-strip a,
  .rules-sidebar a {
    touch-action: manipulation;
  }

  body.nav-open {
    overflow: hidden;
  }

  /* ── Inner pages ── */
  .page {
    padding: 1.35rem 0 2.5rem;
  }

  .section-title {
    font-size: clamp(1.35rem, 5.5vw, 1.65rem);
    margin-bottom: 0.85rem;
  }

  .section-sub {
    font-size: 0.92rem;
    margin-bottom: 1.65rem;
    line-height: 1.55;
  }

  .alert {
    font-size: 0.88rem;
    padding: 0.85rem 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .card {
    padding: 1.1rem 1.15rem;
  }

  /* ── Rules ── */
  .rules-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 1.25rem;
    padding: 0.9rem 1rem;
  }

  .rules-sidebar a {
    padding: 0.45rem 0;
    min-height: 36px;
    display: flex;
    align-items: center;
  }

  .rule-block {
    padding: 1.1rem 1.15rem;
    margin-bottom: 1rem;
  }

  .rule-block h2 {
    font-size: 1.15rem;
  }

  .rule-block p,
  .rule-block li {
    font-size: 0.9rem;
  }

  .mode-tabs {
    gap: 0.4rem;
    margin-bottom: 1.15rem;
  }

  .mode-tab {
    font-size: 0.78rem;
    padding: 0.45rem 0.8rem;
    min-height: 40px;
  }

  .search-input {
    font-size: 16px; /* prevents iOS zoom on focus */
    padding: 0.9rem 0.9rem 0.9rem 2.75rem;
  }

  .quick-chips {
    justify-content: flex-start;
    margin-bottom: 1.5rem;
  }

  /* ── FAQ ── */
  .faq-q {
    font-size: 0.92rem;
    padding: 0.95rem 1rem;
    gap: 0.65rem;
    line-height: 1.35;
    text-align: left;
  }

  .faq-a {
    font-size: 0.9rem;
    padding: 0 1rem 1rem;
    line-height: 1.55;
  }

  /* ── Video ── */
  .video-card .video-body {
    padding: 0.95rem 1.1rem 1.15rem;
  }

  .video-card .video-body .btn {
    width: 100%;
    min-height: 44px;
  }

  /* ── Landing sections ── */
  .lp-section {
    padding: var(--section-y-mobile) 0;
  }

  .lp-section-label {
    font-size: 0.68rem;
    margin-bottom: 0.65rem;
  }

  .lp-section-title {
    font-size: clamp(1.4rem, 5.8vw, 1.85rem);
    margin-bottom: 1rem;
    padding-inline: 0.15rem;
  }

  .lp-section-desc {
    font-size: 0.92rem;
    margin-bottom: 1.65rem;
    padding-inline: 0.15rem;
  }

  /* Hero */
  .lp-hero {
    padding: 1.65rem 0 2.15rem;
  }

  .lp-hero-inner {
    gap: 1.25rem;
  }

  .lp-hero-intro h1 {
    font-size: clamp(1.65rem, 7.2vw, 2.05rem);
  }

  .lp-lead {
    font-size: 0.94rem;
    margin-bottom: 1.35rem;
    line-height: 1.58;
  }

  .lp-eyebrow {
    font-size: 0.66rem;
    padding: 0.35rem 0.75rem;
    margin-bottom: 1rem;
  }

  .lp-hero-stats {
    gap: 0.55rem;
    margin-bottom: 1.35rem;
  }

  .lp-stat {
    padding: 0.7rem 0.35rem;
  }

  .lp-stat strong {
    font-size: 1.2rem;
  }

  .lp-stat span {
    font-size: 0.66rem;
  }

  .lp-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    margin-top: 0;
  }

  .lp-hero-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  .lp-hero-frame {
    width: min(100%, min(340px, 88vw));
    border-radius: 16px;
  }

  .lp-hero-badge {
    font-size: 0.78rem;
    text-align: center;
    padding-inline: 0.5rem;
  }

  /* Social proof */
  .lp-proof {
    padding: 1.85rem 0;
  }

  .lp-proof-headline {
    font-size: clamp(0.98rem, 3.8vw, 1.12rem);
    margin-bottom: 1.35rem;
    padding-inline: 0.25rem;
  }

  .lp-review {
    padding: 1.05rem 1.1rem;
  }

  .lp-review p {
    font-size: 0.85rem;
  }

  /* Slide galleries */
  .lp-benefits,
  .lp-audience,
  .lp-community,
  .lp-why-gallery {
    gap: 0.85rem;
  }

  .lp-benefit-slide,
  .lp-audience-slide,
  .lp-community-card,
  .lp-why-slide {
    border-radius: 14px;
    max-width: min(100%, 440px);
    margin-inline: auto;
  }

  .lp-benefit-slide img,
  .lp-audience-slide img,
  .lp-community-card img,
  .lp-why-slide img {
    width: 100%;
    height: auto;
  }

  /* Edition cards */
  .lp-editions-stack {
    gap: 1.15rem;
  }

  .lp-edition-card {
    border-radius: 18px;
  }

  .lp-edition-visual {
    position: relative;
    width: 100%;
    aspect-ratio: auto;
    max-height: none;
    background: var(--bg-card);
    overflow: hidden;
  }

  .lp-edition-visual img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: unset;
    object-position: center;
    display: block;
  }

  .lp-edition-details {
    padding: 1.15rem 1.15rem 1.25rem !important;
  }

  .lp-edition-details h3 {
    font-size: 1.2rem;
    margin-bottom: 0.65rem;
  }

  .lp-edition-specs li {
    font-size: 0.84rem;
    padding: 0.4rem 0;
    gap: 0.65rem;
  }

  .lp-edition-specs li strong {
    text-align: right;
    font-size: 0.84rem;
  }

  .lp-edition-note {
    font-size: 0.82rem;
  }

  .lp-edition-details .btn,
  .shop-editions .btn {
    width: 100%;
    min-height: 48px;
  }

  /* Kit / box */
  .lp-kit-edition {
    gap: 1.15rem;
  }

  .lp-kit-picker {
    width: 100%;
    max-width: 100%;
  }

  .lp-kit-picker-btn {
    font-size: 0.74rem;
    padding: 0.58rem 0.55rem;
    min-height: 44px;
  }

  .lp-box-layout {
    gap: 0.85rem;
  }

  .lp-box-hero img {
    width: 100%;
    max-width: min(100%, 360px);
    margin-inline: auto;
    aspect-ratio: 3 / 4;
    object-fit: contain;
  }

  .lp-box-grid {
    gap: 0.55rem;
  }

  .lp-box-item img {
    aspect-ratio: 3 / 4;
    object-fit: contain;
  }

  /* Gift */
  .lp-gift {
    padding: var(--section-y-mobile) 0;
  }

  .lp-gift-card {
    border-radius: 18px;
  }

  .lp-gift-header {
    padding: 1.35rem 1.15rem 0.75rem 1.45rem;
  }

  .lp-gift-title {
    max-width: none;
    font-size: clamp(1.3rem, 5.5vw, 1.55rem);
    margin-bottom: 0;
  }

  .lp-gift-body {
    padding: 0 1.15rem 1.15rem 1.45rem;
  }

  .lp-gift-lead {
    font-size: 0.9rem;
    margin-bottom: 1.15rem;
  }

  .lp-gift-points li {
    font-size: 0.86rem;
  }

  .lp-gift-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: none;
    margin: 0;
    z-index: 0;
    background: #0a0908;
    overflow: hidden;
  }

  .lp-gift-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    display: block;
  }

  .lp-gift-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lp-gift-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  /* Community + club */
  .lp-community {
    margin-bottom: 1.75rem;
  }

  .lp-club-card {
    border-radius: 18px;
  }

  .lp-club-header {
    padding: 1.35rem 1.15rem 0.75rem 1.45rem;
  }

  .lp-club-body {
    padding: 0.85rem 1.15rem 1.15rem 1.45rem;
  }

  .lp-club-title {
    max-width: none;
    font-size: clamp(1.35rem, 5.5vw, 1.65rem);
    margin-bottom: 0;
  }

  .lp-club-lead {
    font-size: 0.9rem;
    margin-top: 0.35rem;
    margin-bottom: 1.15rem;
  }

  .lp-club-features li {
    font-size: 0.86rem;
  }

  .lp-club-btn {
    width: 100%;
    max-width: none;
    min-height: 48px;
  }

  .lp-club-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: none;
    margin: 0;
    z-index: 0;
    border-radius: 0;
    border: none;
    background: #0a0908;
  }

  .lp-club-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
  }

  /* Final CTA */
  .lp-final {
    padding: var(--section-y-mobile) 0 1.15rem;
  }

  .lp-final-card {
    padding: 0 0 1.25rem;
    border-radius: 18px;
    gap: 0.4rem 0.35rem;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "posterL posterR"
      "body body";
    align-items: stretch;
    overflow: hidden;
  }

  .lp-final-visual {
    display: block;
    position: relative;
    max-width: none;
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 0;
    border-radius: 0;
    border: none;
    background: #0a0908;
  }

  .lp-final-visual--left {
    grid-area: posterL;
    justify-self: stretch;
    border-top-left-radius: 18px;
  }

  .lp-final-visual--right {
    grid-area: posterR;
    justify-self: stretch;
    border-top-right-radius: 18px;
  }

  .lp-final-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
  }

  .lp-final-body {
    grid-area: body;
    grid-column: 1 / -1;
    padding: 0.85rem 1.1rem 0;
  }

  .lp-final-lead {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .lp-final-perks,
  .lp-final-actions {
    width: 100%;
    max-width: 22rem;
  }

  .lp-final-actions .btn {
    min-height: 48px;
    font-size: 0.86rem;
    white-space: normal;
    line-height: 1.2;
  }

  /* Shop */
  .shop-hero {
    padding: 1.85rem 0 1.5rem;
    margin-bottom: 1.5rem;
  }

  .shop-hero-title {
    font-size: clamp(1.55rem, 6.5vw, 1.95rem);
  }

  .shop-hero-tagline {
    font-size: 0.9rem;
    margin-bottom: 1.1rem;
  }

  .shop-hero-pills li {
    font-size: 0.72rem;
    padding: 0.4rem 0.75rem;
  }

  .shop-editions {
    margin-bottom: 1.75rem;
    gap: 1rem;
  }

  .shop-editions .lp-edition-visual {
    max-height: none;
    width: 100%;
  }

  .shop-editions .lp-edition-card {
    border-radius: 18px;
  }

  .shop-editions .lp-edition-details {
    padding: 1.05rem 1.1rem 1.15rem !important;
  }

  .shop-section-title {
    font-size: 1.05rem;
    margin-bottom: 1.1rem;
  }

  .shop-grid-ecom {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .product-card-body {
    padding: 1.05rem 1.1rem 1.15rem;
  }

  .product-card-body h3 {
    font-size: 1.02rem;
  }

  .product-card-body .btn {
    min-height: 48px;
  }

  /* Buttons global */
  .btn {
    min-height: 44px;
    touch-action: manipulation;
  }

  .btn-lg {
    padding: 0.88rem 1.2rem;
    font-size: 0.94rem;
  }

  .compare {
    gap: 1rem;
  }

  .compare-item .label {
    font-size: 0.78rem;
    padding: 0.75rem 0.9rem 0.85rem;
  }

  .compare-placeholder {
    aspect-ratio: 4 / 3;
    font-size: 0.82rem;
  }

  /* Footer */
  .site-footer {
    margin-top: 1.5rem;
    padding-top: 2rem;
  }

  .site-footer-logo img {
    height: 36px;
  }

  .site-footer-nav {
    gap: 0.65rem 1rem;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  :root {
    --header-h: 43px;
  }

  .lp-hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .lp-final-perks {
    grid-template-columns: 1fr;
  }

  .lp-final-actions {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .lp-kit-picker-btn {
    font-size: 0.68rem;
    letter-spacing: 0;
  }

  .lp-club-tags li,
  .lp-gift-occasions li {
    font-size: 0.68rem;
    padding: 0.32rem 0.6rem;
  }
}

/* Tablet portrait tweaks */
@media (min-width: 480px) and (max-width: 767px) {
  .lp-benefits {
    grid-template-columns: repeat(2, 1fr);
  }

  .lp-benefits .lp-benefit-slide:first-child {
    grid-column: 1 / -1;
    max-width: min(100%, 440px);
  }

  .shop-grid-ecom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lp-final-card {
    gap: 0.35rem 0.3rem;
  }
}

/* No sticky hover on touch */
@media (hover: none) {
  .lp-edition-card:hover,
  .product-card:hover,
  .lp-benefit-slide:hover,
  .lp-audience-slide:hover,
  .lp-why-slide:hover,
  .lp-community-card:hover,
  .lp-club-card:hover,
  .lp-gift-card:hover,
  .lp-final-card:hover {
    transform: none;
    box-shadow: inherit;
    border-color: inherit;
  }

  .lp-edition-card:hover .lp-edition-visual img,
  .product-card:hover .product-card-img img,
  .lp-benefit-slide:hover img,
  .lp-audience-slide:hover img,
  .lp-why-slide:hover img,
  .lp-community-card:hover img,
  .lp-club-card:hover .lp-club-visual img,
  .lp-gift-card:hover .lp-gift-visual img,
  .lp-final-card:hover .lp-final-visual img {
    transform: none;
    filter: none;
  }
}
