/* ================= Tampilan HP (app-like): tab bar bawah, sentuhan besar, area aman notch ================= */
.tabbar, .sticky-cta { display: none; }

@media (max-width: 760px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
  .wrap { width: min(1120px, 100% - 28px); }

  /* header ringkas: logo di tengah, menu pindah ke tab bar */
  .site-header { padding-top: env(safe-area-inset-top); }
  .header-in { min-height: 60px; justify-content: center; }
  .brand img { height: 36px; }
  .nav { display: none !important; }
  .nav-toggle { display: none !important; }

  /* ===== 1. Tab bar bawah di zona jempol ===== */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; gap: 2px;
    background: rgba(14,14,14,.96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px -12px rgba(0,0,0,.8);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1; min-width: 0; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .01em; border-radius: 14px; text-decoration: none;
    transition: color .2s, transform .15s;
  }
  .tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar .tab-ic { display: grid; place-items: center; width: 56px; height: 32px; border-radius: 999px; transition: background .2s, transform .2s; }
  .tabbar a:active { transform: scale(.94); }
  .tabbar a.active { color: #fff; }
  .tabbar a.active .tab-ic { background: rgba(232,20,28,.2); color: var(--red2); }
  .tabbar a.active span { font-weight: 700; }
  .tabbar a.tab-main { color: #fff; }
  .tabbar a.tab-main .tab-ic { background: var(--red); color: #fff; box-shadow: 0 6px 16px -6px rgba(232,20,28,.9); }
  .tabbar a.tab-main.active .tab-ic { background: var(--red2); }

  /* ===== 3. Tombol aksi menempel (CTA) tepat di atas tab bar ===== */
  .sticky-cta { display: block; position: fixed; left: 0; right: 0; z-index: 59; bottom: calc(70px + env(safe-area-inset-bottom)); pointer-events: none;
    transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .2s; }
  .sticky-cta.hide { transform: translateY(110%); opacity: 0; }
  .cta-in {
    pointer-events: auto; display: flex; align-items: center; gap: 12px; margin: 0 10px 8px; padding: 10px 10px 10px 16px;
    background: rgba(26,26,26,.97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid #333; border-radius: 18px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.9);
  }
  .cta-txt { flex: 1; min-width: 0; line-height: 1.2; }
  .cta-price { font: 700 1.15rem var(--font); color: #fff; }
  .cta-unit { font-size: .8rem; color: var(--muted); }
  .cta-txt small { display: block; margin-top: 3px; font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cta-btn { flex: 0 0 auto; min-height: 52px; padding: 0 20px; border-radius: 14px; font-size: 1rem; font-weight: 700; }
  body.has-cta { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  #payMetode.nudge { animation: nudge .5s; }
  @keyframes nudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

  /* ===== 2. Target sentuh minimal 48px ===== */
  .btn { min-height: 48px; }
  .btn-sm { min-height: 44px; }
  input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=url], input[type=password], input[type=search], select {
    min-height: 50px; font-size: 16px; border-radius: 12px; } /* 16px: iPhone tidak zoom otomatis */
  textarea { font-size: 16px; }
  .check { min-height: 48px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #0f0f0f; cursor: pointer; }
  .check:has(input:checked) { border-color: var(--red); }
  .check input { width: 22px; height: 22px; margin: 0; flex: 0 0 22px; }
  .radio-cards label { min-height: 56px; display: flex; flex-direction: column; justify-content: center; }
  .foot-links br { display: none; }
  .foot-links a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); color: var(--text); }
  .foot-links a::after { content: "\203A"; margin-left: auto; color: var(--muted); font-size: 1.2rem; }
  .site-footer a[href^="https://wa.me"], .site-footer a[href^="mailto"] { display: inline-block; padding: 8px 0; }

  /* tombol musik pindah ke pojok kanan atas */
  .music { left: auto; right: 8px; bottom: auto; top: calc(6px + env(safe-area-inset-top)); width: 48px; height: 48px; }
  .music .disc { width: 34px; height: 34px; }

  /* beranda */
  .hero { padding: 26px 0 40px; }
  .hero-logo { width: min(420px, 92%); }
  .hero-judul { width: min(340px, 88%); }
  .hero p.lead { font-size: 1rem; }
  .countdown { gap: 8px; }
  .countdown div { min-width: 0; flex: 1; max-width: 78px; padding: 8px 4px; }
  .countdown b { font-size: 1.5rem; }
  .hero-meta { flex-direction: column; gap: 6px; align-items: center; font-size: .95rem; }
  .cta-row .btn-lg { width: 100%; }
  .section { padding: 38px 0; }
  .card { padding: 18px; }
  .day li { flex-direction: column; gap: 0; }
  .day li b { min-width: 0; }
  h1 { font-size: clamp(1.8rem, 9vw, 2.4rem); }
  .page-title { padding: 26px 0 8px; margin-bottom: 20px; }

  /* formulir */
  .form-card { padding: 18px 16px; border-radius: 16px; }
  .stepper { gap: 2px; }
  .stepper li::before { width: 28px; height: 28px; font-size: .8rem; }
  .step h2 { font-size: 1.35rem; }
  .step-nav {
    position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 5; margin: 22px -16px -18px; padding: 12px 16px;
    background: rgba(23,23,23,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 0 0 16px 16px;
  }
  .step-nav .btn { min-height: 48px; }
  input[type=file] { padding: 12px; }
  .review dl { grid-template-columns: 1fr; gap: 2px; }

  /* tabel lebar bisa digeser */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .footer-grid { gap: 20px; }
  .site-footer { margin-top: 20px; }

  /* intro di HP */
  .intro-tag { width: min(340px, 84%); }
}

@media (max-width: 380px) {
  .tabbar a { font-size: .62rem; }
  .tabbar .tab-ic { width: 48px; }
  .cta-btn { padding: 0 14px; font-size: .95rem; }
  .countdown b { font-size: 1.3rem; }
}

/* tombol admin di HP: pojok kiri atas (pojok kanan dipakai tombol musik) */
@media (max-width: 760px) {
  .admin-btn { position: absolute; left: 8px; top: calc(6px + env(safe-area-inset-top)); padding: 0; width: 48px; height: 48px; justify-content: center; margin: 0; }
  .admin-btn span { display: none; }
}
