/* ==========================================================================
   KundaliLens phone and tablet fixes (mobile QA, 2 Dec 2026).
   Loaded last so it can correct earlier files without editing them in place.
   Checked at 360, 375, 390, 414 and 430 px wide, 768 portrait, 844 x 390 and
   1024 x 768 landscape.
   ========================================================================== */

/* Landing: planet captions sit on top of the text column on phones, where the
   copy runs full width over the 3D scene. Keep the scene, drop the captions. */
@media (max-width: 767.98px) {
  body[data-lp] .orb-labels,
  body[data-lp="intro"] .orb-labels,
  body[data-lp="l-system"] .orb-labels {
    opacity: 0;
  }
}

/* Landing hero form: an equal split so "Pick a time" is not cut to "Pick a…". */
@media (max-width: 480px) {
  .lp-form.lp-form--hero,
  .lp-form--line {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Date and time fields: a narrower icon gutter on small phones so the full
   date ("15 Aug 1995") fits in a half-width field. */
@media (max-width: 400px) {
  .kl-pick__input {
    padding-right: 30px !important;
    padding-left: 12px !important;
  }
  .kl-pick__icon {
    width: 30px;
  }
}

/* Tonight's Moon: the tradition switch was sized to its content (flex: none),
   so "Malayalam" ran past the card edge. Let it take the row and wrap. */
@media (max-width: 767.98px), (max-width: 1023.98px) and (orientation: portrait), (max-height: 499.98px) {
  .reg .trad-switch {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
    border-radius: 16px;
  }
  .reg .trad-switch .trad-chip {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Good times timeline: the short "Yama / Gul / Rahu / Abh" tags overlap when a
   window is only a few pixels wide. The colours, legend and list below carry it. */
@media (max-width: 600px) {
  .tl__marklabel {
    display: none;
  }
}

/* ---------- Tap targets on touch screens (aim: 40px or more) ---------- */
@media (pointer: coarse), (max-width: 767.98px) {
  /* Pager dots stay small to look at but get a tall invisible hit area. */
  .pg-dot::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    bottom: -10px;
  }

  .hook-chip {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 12px;
  }

  .lang-btn {
    min-height: 34px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .fest__filters .lang-btn {
    min-height: 36px;
  }

  .chat-context__go {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    border-bottom: 0;
    text-decoration: underline;
    text-decoration-color: rgba(245, 199, 107, 0.45);
    text-underline-offset: 4px;
  }

  .trad-chip,
  .trad-switch--sm .trad-chip {
    min-height: 36px;
    line-height: 36px;
  }

  #explorer .fest__why > summary {
    padding: 8px 12px;
  }

  #intro .lp-micro .lp-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
}

/* Phones held sideways: the scene band took half the screen and only the page
   title showed above the pager. Shorter band, centred readable column. */
@media (max-height: 499.98px) and (orientation: landscape) {
  #explorer #explorerPanel {
    margin-top: calc(var(--hdr-h) + 12vh);
    margin-left: auto;
    margin-right: auto;
    max-width: 680px;
  }
}

/* Tablet portrait (761-1023 px): four columns cut "Pick a time" to "Pick a ti…".
   Date, time and city on one row, the button on its own row. */
@media (min-width: 760.02px) and (max-width: 1023.98px) {
  .lp-form.lp-form--hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr);
  }
  .lp-form--hero > .lp-btn {
    grid-column: 1 / -1;
  }
}
