/* Telefoon — dhammaan bogagga martiqaadka */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

@media (max-width: 768px) {
  input, select, textarea, button {
    font-size: 16px !important;
  }

  button, .btn, .music-control, .venue-btn, .splash-card,
  a.card, .tab, .btn-primary, .btn-secondary, .btn-g, .btn-o {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
  }

  .music-control {
    bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
    right: max(1rem, env(safe-area-inset-right, 1rem));
    width: 48px;
    height: 48px;
    min-height: 48px;
    z-index: 1001;
  }

  section,
  .couple-section,
  .countdown-section,
  .venue-section,
  .gallery-section,
  .love-section {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .couple-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .splash-ring:nth-child(1) { width: 150px !important; height: 150px !important; }
  .splash-ring:nth-child(2) { width: 200px !important; height: 200px !important; }
  .splash-ring:nth-child(3) { width: 250px !important; height: 250px !important; }
  .splash-monogram {
    width: 100px !important;
    height: 100px !important;
    margin-bottom: 1rem !important;
  }
  .splash-names { font-size: clamp(1.4rem, 7vw, 2rem) !important; }
  .splash-hint { font-size: 0.85rem !important; letter-spacing: 2px !important; padding: 0 0.5rem; }

  .hero-sub { letter-spacing: 3px !important; font-size: 0.72rem !important; }
  .hero-content { padding: 1.25rem !important; }
  .scroll-hint { font-size: 0.65rem !important; bottom: 1.25rem; }

  .countdown {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
  }
  .countdown-item {
    min-width: 62px !important;
    padding: 0.65rem 0.45rem !important;
  }
  .countdown-num { font-size: 1.5rem !important; }

  html[data-wedding-key="index"] .gallery {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.65rem !important;
    grid-auto-rows: 150px !important;
  }
  html[data-wedding-key="naqsho3"] .gallery {
    gap: 0.65rem !important;
  }
  html[data-wedding-key="naqsho2"] .gallery-item {
    flex: 0 0 240px !important;
  }

  .venue-box { padding: 1.25rem 1rem !important; }
  .venue-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.85rem 1.25rem !important; }

  footer { padding: 2rem 1rem !important; }
  footer .footer-names { font-size: 1.5rem !important; }

  /* naqsho2 hero */
  .hero-side { min-height: 28vh !important; }
  .hero-center-band {
    width: 140px !important;
    height: 140px !important;
    padding: 0.75rem !important;
  }
  .hero-name-big { font-size: clamp(1.5rem, 8vw, 2.5rem) !important; }

  /* naqsho3 */
  .neon-title { font-size: clamp(1.8rem, 9vw, 3rem) !important; }

  /* hub */
  .wrap { padding: 0 0.25rem; }
  .hero-box { padding: 1.5rem 1rem !important; }
  .hero-box h1 { font-size: 1.45rem !important; }
  .card { padding: 0.9rem 1rem !important; }

  /* qr */
  .page-qr .card {
    flex-direction: column !important;
    text-align: center;
    padding: 1rem !important;
  }
  .page-qr .btns { justify-content: center; }
  .page-qr #qrCanvas {
    width: min(240px, 78vw) !important;
    height: auto !important;
    max-width: 100%;
  }
  .page-qr button { min-height: 44px; padding: 0.65rem 0.9rem !important; }

  /* edit */
  .top { padding: 0.65rem 0.75rem !important; gap: 0.4rem !important; }
  .bottom-bar {
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0.65rem));
  }
  .preview-frame { height: 200px !important; }
  .wrap { padding-bottom: 5.5rem; }
}

@media (max-width: 380px) {
  html[data-wedding-key="index"] .gallery { grid-template-columns: 1fr !important; }
  .countdown-item { min-width: 56px !important; }
  .countdown-num { font-size: 1.25rem !important; }
}
