@media (max-width: 820px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  body.ter-player-mobile {
    width: 100%;
    max-width: 100vw;
    padding-bottom: 82px !important;
  }

  body.ter-page-booking {
    padding-bottom: 24px !important;
  }

  body.ter-player-mobile *,
  body.ter-player-mobile *::before,
  body.ter-player-mobile *::after {
    box-sizing: border-box;
  }

  body.ter-player-mobile img,
  body.ter-player-mobile video,
  body.ter-player-mobile iframe {
    max-width: 100% !important;
  }

  body.ter-player-mobile .container,
  body.ter-player-mobile .wrapper,
  body.ter-player-mobile .page,
  body.ter-player-mobile .content,
  body.ter-player-mobile .main-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  body.ter-player-mobile h1 {
    font-size: clamp(25px, 7vw, 34px) !important;
    line-height: 1.45 !important;
  }

  body.ter-player-mobile h2 {
    font-size: clamp(20px, 5.5vw, 27px) !important;
    line-height: 1.55 !important;
  }

  body.ter-player-mobile p,
  body.ter-player-mobile li {
    line-height: 1.9 !important;
  }

  body.ter-player-mobile button,
  body.ter-player-mobile .btn,
  body.ter-player-mobile .button,
  body.ter-player-mobile input[type="submit"],
  body.ter-player-mobile a[class*="btn"] {
    min-height: 48px !important;
    border-radius: 13px !important;
  }

  body.ter-player-mobile input,
  body.ter-player-mobile select,
  body.ter-player-mobile textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    font-size: 16px !important;
    border-radius: 13px !important;
  }

  body.ter-player-mobile textarea {
    min-height: 110px !important;
  }

  body.ter-player-mobile .hero,
  body.ter-player-mobile .hero-section,
  body.ter-player-mobile .hero-wrap {
    min-height: 0 !important;
    height: auto !important;
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  body.ter-player-mobile .hero-content,
  body.ter-player-mobile .hero-grid,
  body.ter-player-mobile .hero-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
  }

  body.ter-player-mobile .hero img,
  body.ter-player-mobile .hero-image img {
    width: 100% !important;
    max-height: 310px !important;
    object-fit: cover !important;
    border-radius: 16px !important;
  }

  body.ter-player-mobile .rooms-grid,
  body.ter-player-mobile .room-grid,
  body.ter-player-mobile .featured-grid,
  body.ter-player-mobile .cards-grid,
  body.ter-player-mobile .cards,
  body.ter-player-mobile .grid,
  body.ter-player-mobile .detail-grid,
  body.ter-player-mobile .info-grid,
  body.ter-player-mobile .stats-grid,
  body.ter-player-mobile .meta-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  body.ter-player-mobile .room-card,
  body.ter-player-mobile .card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 16px !important;
    overflow: hidden;
  }

  body.ter-player-mobile .room-card img,
  body.ter-player-mobile .card img {
    width: 100% !important;
    aspect-ratio: 16/10;
    object-fit: cover !important;
  }

  body.ter-page-room-detail .summary-grid,
  body.ter-page-room-detail .room-stats,
  body.ter-page-room-detail .quick-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.ter-page-room-detail .summary-card,
  body.ter-page-room-detail .stat-card,
  body.ter-page-room-detail .info-card {
    min-width: 0 !important;
    padding: 13px !important;
    border-radius: 14px !important;
  }

  body.ter-page-room-detail .slots-grid,
  body.ter-page-room-detail .slot-grid,
  body.ter-page-room-detail .available-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.ter-page-room-detail a[href*="/booking/slot/"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 52px !important;
    text-align: center !important;
    border-radius: 13px !important;
  }

  body.ter-page-booking .booking-layout,
  body.ter-page-booking .booking-grid,
  body.ter-page-booking .booking-wrapper,
  body.ter-page-booking .booking-container {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.ter-page-booking .form-side,
  body.ter-page-booking .summary-side,
  body.ter-page-booking .summary-panel,
  body.ter-page-booking .booking-summary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.ter-page-booking .form-side {
    order: 1;
    padding: 18px 14px !important;
  }

  body.ter-page-booking .summary-side,
  body.ter-page-booking .summary-panel,
  body.ter-page-booking .booking-summary {
    order: 2;
  }

  body.ter-page-booking .summary-grid,
  body.ter-page-booking .summary-cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }

  body.ter-page-booking .summary-card {
    min-width: 0 !important;
    padding: 12px !important;
    border-radius: 13px !important;
  }

  body.ter-page-booking .info-box,
  body.ter-page-booking .minimum-notice {
    font-size: 13px !important;
    line-height: 1.9 !important;
    padding: 13px !important;
    border-radius: 13px !important;
  }

  body.ter-page-booking .submit {
    position: sticky !important;
    bottom: 10px !important;
    z-index: 60 !important;
    width: 100% !important;
    min-height: 56px !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.38) !important;
  }

  .ter-mobile-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    height: 64px;
    z-index: 9999;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: rgba(5,19,35,.96);
    border: 1px solid #1a456c;
    border-radius: 18px;
    box-shadow: 0 15px 42px rgba(0,0,0,.42);
    backdrop-filter: blur(13px);
    overflow: hidden;
  }

  .ter-mobile-bottom-nav a {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #9eb4ca;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
  }

  .ter-mobile-bottom-nav a span {
    font-size: 20px;
  }

  .ter-mobile-bottom-nav a.ter-active {
    color: #17d9f4;
    background: rgba(23,217,244,.07);
  }

  @media (max-width: 380px) {
    body.ter-page-room-detail .summary-grid,
    body.ter-page-room-detail .room-stats,
    body.ter-page-room-detail .quick-stats,
    body.ter-page-room-detail .slots-grid,
    body.ter-page-room-detail .slot-grid,
    body.ter-page-room-detail .available-slots,
    body.ter-page-booking .summary-grid,
    body.ter-page-booking .summary-cards {
      grid-template-columns: 1fr !important;
    }
  }
}

@media (min-width: 821px) {
  .ter-mobile-bottom-nav {
    display: none !important;
  }
}
