:root {
  --sheet-radius: 17px;          
  --sheet-bg: #d9d9d9;
  --sheet-text: #111;
  --sheet-text-soft: #333;
  --sheet-accent: #047857;
}

@media (max-width: 767.98px) {

  #infoCard {
    position: absolute !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  /* ---------- Kotak kartu ---------- */
  #infoCard .info-card-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 55vh;                 
    max-height: 55dvh;
    overflow: hidden;
    background: var(--sheet-bg);
    color: var(--sheet-text);
    border: 0;
    border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
  }

  /* ---------- Foto ---------- */
  #infoCard .info-img-wrap {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: 185px;
    overflow: hidden;
  }
  #infoCard .info-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }

  /* ---------- Tombol tutup (pojok kanan atas foto) ---------- */
  #infoCard .info-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #111;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: #111;
    font-size: 0.8rem;
    line-height: 1;
    z-index: 2;
  }

  /* ---------- Isi (scroll jika panjang) ---------- */
  #infoCard .info-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  #infoCard .info-title {
    margin: 0 0 0.6rem;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--sheet-text);
  }

  #infoCard .info-address {
    margin: 0 0 1rem;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--sheet-text-soft);
    text-align: left;
  }

  /* ---------- Fasilitas ---------- */
  #infoCard .info-section-label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sheet-text);
  }
  #infoCard .info-facilities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
  }
  #infoCard .info-facilities > * {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--sheet-text);
  }

  /* ---------- Tombol Lihat Rute ---------- */
  #infoCard .info-route-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 46px;
    padding: 0.65rem 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--sheet-accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
  }

  .position-relative:has(#infoCard:not([style*="display: none"]):not([style*="display:none"])) #btnPanduanInteraktif {
    display: none !important;
  }
}

/* ---------- Dark mode ---------- */
@media (max-width: 767.98px) {
  body.dark #infoCard .info-card-inner {
    background: #1f2937;
    color: #f9fafb;
    box-shadow: 0 -6px 24px rgba(255, 255, 255, 0.12);
  }
  body.dark #infoCard .info-title,
  body.dark #infoCard .info-section-label { color: #f9fafb; }
  body.dark #infoCard .info-address { color: #d1d5db; }
  body.dark #infoCard .info-facilities > * {
    background: rgba(255, 255, 255, 0.12);
    color: #f9fafb;
  }
}