/* UsGo! responsive rules — laptop → tablet → phone */

@media (max-width: 1320px) {
  .main-nav a { padding: 8px 9px; font-size: 14px; }
}

@media (max-width: 1220px) {
  .main-nav { display: none; }
  .menu-btn { display: grid; }
  .search-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-panel .btn { grid-column: 1 / -1; min-height: 52px; }
  .sp-field + .sp-field::before { display: none; }
  .sp-field { background: var(--bg); }
  .dest-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .footer-grid .footer-app { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
  .listing-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { position: fixed; inset: auto 0 0 0; top: auto; z-index: 110; max-height: 86vh; border-radius: 24px 24px 0 0; box-shadow: var(--sh-3); padding-bottom: calc(22px + var(--safe-b)); animation: sheetUp .3s var(--ease); }
  .filters:not(.open) { display: none; }
  .filters-backdrop { position: fixed; inset: 0; background: rgba(10, 20, 51, .45); z-index: 109; }
  .filter-toggle { display: inline-flex; }
  .modal-close.filter-toggle { display: grid; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .book-card { position: static; }
  .dash { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }
  .dash-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 8px; scrollbar-width: none; border-radius: 18px; }
  .dash-nav::-webkit-scrollbar { display: none; }
  .dash-nav .me { display: none; }
  .dash-nav a { white-space: nowrap; flex: none; }
  .share-grid, .trust-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .share-photo { aspect-ratio: 16 / 10; }
  .app-band { grid-template-columns: 1fr; padding: 40px 28px; }
  .app-icon-big { display: none; }
  .legal-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat { grid-template-columns: 290px minmax(0, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .container, .container-narrow { width: calc(100% - 32px); }
  .section { padding: 64px 0; }
  .section-sm { padding: 44px 0; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .dest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: 1fr; grid-template-rows: 1fr; height: auto; aspect-ratio: 4 / 3; border-radius: var(--r-m); }
  .gallery button:not(:first-child) { display: none; }
  .gallery button:first-child { grid-row: auto; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - var(--header-h) - 140px - var(--safe-b)); min-height: 460px; }
  .chat .thread { display: none; }
  .chat.show-thread .convos { display: none; }
  .chat.show-thread .thread { display: flex; }
  .thread-head .back { display: grid; }
  .header-actions .host-cta { display: none; }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal { width: 100%; border-radius: 24px 24px 0 0; max-height: 92vh; animation: sheetUp .3s var(--ease); padding-bottom: var(--safe-b); }
  .modal-wide { width: 100%; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; padding-bottom: calc(72px + var(--safe-b)); }
  body.no-bottom-nav { padding-bottom: 0; }
  h1 { font-size: clamp(30px, 8.6vw, 40px); }
  .brand-word { font-size: 23px; }
  .brand img { width: 34px; height: 34px; }
  .header-actions .guest-only.btn { display: none; }
  .header-actions .icon-btn.auth-only[data-hide-mobile] { display: none; }
  .hero { min-height: auto; padding-bottom: 48px; }
  .has-hero .hero { padding-top: calc(var(--header-h) + 28px); }
  .hero h1 { font-size: clamp(34px, 10vw, 46px); }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-search { margin-top: 28px; }
  .search-panel { grid-template-columns: 1fr 1fr; padding: 8px; border-radius: 22px; }
  .search-panel .sp-field.wide { grid-column: 1 / -1; }
  .search-tabs { display: flex; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .search-tabs button { flex: none; }
  .stats-strip { display: none; }
  .page-hero { padding: 40px 0 48px; }
  .page-hero p { font-size: 16.5px; }
  .page-hero.with-search { padding-bottom: 88px; }
  .dest-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .dest-grid::-webkit-scrollbar { display: none; }
  .steps-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 22px; }
  .form-section { padding: 20px; border-radius: var(--r-m); }
  .form-actions .btn { flex: 1 1 auto; }
  .list-card { flex-wrap: wrap; }
  .list-card .thumb-img { width: 72px; height: 60px; }
  .list-card .lc-actions { width: 100%; justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { padding-top: 52px; }
  .detail-section > h2 { font-size: 20px; }
  .mobile-cta { display: flex; position: fixed; left: 0; right: 0; bottom: calc(64px + var(--safe-b)); z-index: 55; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px; gap: 10px; align-items: center; box-shadow: 0 -8px 24px rgba(10, 20, 51, .08); }
  .mobile-cta .price { font-size: 18px; }
  .mobile-cta .btn { margin-left: auto; }
  body.has-mobile-cta { padding-bottom: calc(140px + var(--safe-b)); }
  .auth-card { padding: 24px 20px; border-radius: 24px; }
  .book-card { padding: 18px; }
  .range-row .input[type=date] { padding: 10px 8px; font-size: 14px; }
  .app-band { border-radius: var(--r-l); padding: 32px 22px; }
  .store-badge { min-width: 0; flex: 0 1 auto; }
  .play-badge img { height: 52px; }
  .store-badges .store-badge { min-height: 52px; }
  .table th, .table td { padding: 10px 12px; }
  .toasts { bottom: calc(84px + var(--safe-b)); }
  .chat { border-radius: var(--r-m); height: calc(100vh - var(--header-h) - 120px - var(--safe-b)); }
  .msg { max-width: 85%; }

  /* App-style bottom navigation */
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + var(--safe-b)); box-shadow: 0 -6px 24px rgba(10, 20, 51, .06); }
  .bottom-nav a { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; font-size: 11px; font-weight: 700; color: var(--faint); position: relative; border-radius: 12px; }
  .bottom-nav a .i { width: 23px; height: 23px; }
  .bottom-nav a[aria-current="page"] { color: var(--blue); }
  .bottom-nav a[aria-current="page"]::before { content: ""; position: absolute; top: -6px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--blue); }
  .bottom-nav .create { color: var(--ink); }
  .bottom-nav .create span.plus { width: 46px; height: 46px; margin-top: -22px; border-radius: 16px; background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: var(--sh-blue); border: 3px solid #fff; }
  .bottom-nav .create span.plus .i { width: 22px; height: 22px; stroke-width: 2.6; }
  .bottom-nav .count { position: absolute; top: 2px; left: 54%; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 10px; line-height: 17px; text-align: center; border: 2px solid #fff; }
}

@media (max-width: 380px) {
  .search-panel { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .bottom-nav, .mobile-cta, .toasts { display: none !important; }
  body { padding: 0 !important; }
}

/* Smaller buttons, as the owner asked. Computers get the tightest sizes (the 85% page scale applies on top).
   Phones and tablets stay at 44 px high or more, the smallest size that's reliable to tap. Form fields keep their text size so iPhones don't zoom in on focus. */
@media (min-width: 1025px) {
  .btn { min-height: 40px; padding: 0 18px; font-size: 14px; gap: 6px; }
  .btn-lg { min-height: 46px; padding: 0 22px; font-size: 15px; }
  .btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
  .btn-ghost { padding: 0 12px; }
  .btn-icon, .icon-btn { width: 38px; height: 38px; padding: 0; }
  .btn-sm.btn-icon { width: 32px; height: 32px; }
}
@media (max-width: 1024px) {
  .btn { min-height: 44px; padding: 0 18px; font-size: 14.5px; }
  .btn-lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
  .btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
  .btn-ghost { padding: 0 12px; }
  .btn-icon { width: 44px; padding: 0; }
  .btn-sm.btn-icon { width: 36px; }
}

/* Navigation bar: logo at the far left, links beside it, Login and JOIN USGO! on the right. The logo is square, so equal sizes keep its proportions. */
.site-header .header-row { width: calc(100% - 48px); max-width: none; gap: 14px; }
.site-header .brand img { width: 52px; height: 52px; border-radius: 13px; }
.site-header .brand-word { font-size: 30px; }
.site-header .main-nav { margin-left: 6px; }
.join-cta { font-weight: 800; letter-spacing: .02em; white-space: nowrap; box-shadow: 0 8px 22px rgba(255, 176, 32, .38); }
@media (min-width: 1025px) { .join-cta { min-height: 36px; padding: 0 16px; } }
@media (max-width: 640px) {
  .site-header .header-row { width: calc(100% - 24px); gap: 8px; }
  .site-header .brand { gap: 7px; }
  .site-header .brand img { width: 44px; height: 44px; border-radius: 11px; }
  .site-header .brand-word { font-size: 24px; }
  .header-actions .join-cta.guest-only.btn { display: inline-flex; min-height: 38px; padding: 0 12px; font-size: 12.5px; }
}
@media (max-width: 340px) { .site-header .brand-word { display: none; } }

