/* Distrito Countries mobile app layer. Loaded only up to 768px. */
:root {
  --mobile-nav-height: 72px;
}

html {
  background: #F6F1E8;
  scroll-padding-top: 92px;
}

body {
  min-width: 0;
  background: #F6F1E8 !important;
  padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 10px);
}

body.mobile-sheet-open,
body.mobile-public-modal-open {
  overscroll-behavior: contain;
}

button,
a.btn,
.btn,
.item,
.sponsor-card,
.home-map-card,
.home-free-card,
.hero-cta-card,
.kids-card,
.module-tab,
.mobile-bottom-nav__item {
  -webkit-tap-highlight-color: transparent;
}

@media (hover: none), (pointer: coarse) {
  button,
  a.btn,
  .btn,
  a,
  .item,
  .sponsor-card,
  .home-map-card,
  .home-free-card,
  .hero-cta-card,
  .kids-card,
  .module-tab,
  .mobile-bottom-nav__item {
    transition:
      filter 90ms ease,
      box-shadow 90ms ease,
      background-color 90ms ease !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(216,111,50,.16);
  }

  button:active,
  a.btn:active,
  .btn:active,
  .item:active,
  .sponsor-card:active,
  .home-map-card:active,
  .home-free-card:active,
  .hero-cta-card:active,
  .kids-card:active,
  .module-tab:active,
  .mobile-bottom-nav__item:active {
    transform: none !important;
    filter: saturate(1.03) brightness(0.98);
  }
}

.w {
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.topbar {
  top: 0;
  z-index: 150;
  background: #FFFFFF !important;
  border-bottom: 1px solid #DDE8E2 !important;
  box-shadow: 0 1px 2px rgba(16,42,56,.04);
}

.topbar .w {
  min-height: auto !important;
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 8px !important;
  padding-top: 8px !important;
  padding-bottom: 10px !important;
}

.topbar .logo {
  width: fit-content;
  justify-self: center;
}

.topbar .logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 11px;
}

.topbar .logo-text {
  font-size: 14px !important;
  letter-spacing: 0;
}

.topbar .top-actions {
  display: none !important;
}

.search-wrap {
  order: initial !important;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
}

.search-wrap input {
  height: 38px !important;
  border-radius: 13px !important;
  background: #FAFBF8 !important;
  font-size: 13px !important;
  padding-left: 38px !important;
  box-shadow: none !important;
}

.search-wrap svg {
  left: 13px !important;
}

.public-community-strip,
.zones,
.module-strip {
  display: none !important;
}

body.mobile-page-home .public-community-strip {
  display: block !important;
  width: calc(100% - 24px) !important;
  margin: 10px auto 10px !important;
  border: 1px solid #DDE8E2 !important;
  border-radius: 14px !important;
  background: #FBFAF5 !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset !important;
}

body.mobile-page-home .public-community-strip .tagline-inner {
  min-height: auto;
  width: 100% !important;
  padding: 15px 16px !important;
  border: 0 !important;
  gap: 5px;
  text-align: center;
}

body.mobile-page-home .tagline-main {
  max-width: 330px;
  margin: 0 auto;
  font-size: 17px !important;
  line-height: 1.18 !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

body.mobile-page-home .tagline-sub {
  max-width: 320px;
  margin: 0 auto;
  font-size: 13.5px !important;
  line-height: 1.3 !important;
  color: #607575;
  letter-spacing: 0 !important;
}

.module-wrap,
.page,
.access-main,
.legal-main,
.account-shell {
  padding-bottom: 18px !important;
}

.home-gateway {
  padding-top: 12px !important;
}

.home-gateway .module-nav {
  display: none !important;
}

.home-gateway .module-tab {
  min-height: 58px;
  border: 1px solid #DDE8E2;
  border-radius: 13px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0,0,0,.035);
  padding: 10px 11px;
}

.home-gateway .module-tab strong {
  font-size: 13px;
  line-height: 1.15;
}

.home-gateway .module-tab span {
  font-size: 11px;
  line-height: 1.18;
}

body:not(.mobile-page-home) .module-nav,
body:not(.mobile-page-home) .module-links,
body:not(.mobile-page-home) .module-strip {
  display: none !important;
}

.sponsor-duo,
.sponsor-slot {
  margin-top: 12px !important;
  margin-bottom: 12px !important;
}

.sponsor-duo {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

.sponsor-card {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 86px minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 10px !important;
  border-radius: 13px !important;
}

.sponsor-card-image,
.sponsor-fallback-visual {
  width: 86px !important;
  min-height: 74px !important;
  height: 74px !important;
  border-radius: 10px !important;
}

.sponsor-card-body {
  min-width: 0;
  gap: 4px !important;
  padding: 0 !important;
}

.sponsor-card h3 {
  font-size: 13px !important;
  line-height: 1.18 !important;
}

.sponsor-card p {
  max-height: 34px;
  overflow: hidden;
  font-size: 11.5px !important;
  line-height: 1.35 !important;
}

.sponsor-cta,
.sponsor-cta-fallback {
  min-height: 28px !important;
  width: fit-content !important;
  padding: 0 10px !important;
  font-size: 11px !important;
}

.home-free-card {
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  padding: 16px !important;
  border-radius: 14px !important;
}

.home-free-card h1 {
  font-size: 21px !important;
  line-height: 1.12 !important;
}

.home-free-card p {
  font-size: 12.5px !important;
}

.home-free-commercial {
  margin-top: 12px !important;
  padding-top: 12px !important;
}

.home-free-actions .btn {
  width: 100%;
}

.hero {
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.04) !important;
}

.hero-main {
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  padding: 16px !important;
}

.hero h1 {
  font-size: 25px !important;
  line-height: 1.08 !important;
}

.hero p {
  font-size: 12.5px !important;
}

.hero-cta-card {
  width: 100% !important;
  padding: 14px !important;
  border-radius: 12px !important;
}

.hero-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  width: 100%;
}

.stat {
  min-width: 0;
  padding: 9px 8px !important;
  border-bottom: 0 !important;
}

.stat strong {
  font-size: 13px !important;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.stat span {
  font-size: 10px !important;
}

.content-grid {
  grid-template-columns: 1fr !important;
  gap: 12px !important;
}

.panel,
.side-box,
.legal-card,
.access-card {
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.04) !important;
}

.panel-head {
  padding: 13px 14px !important;
}

.panel-head h2 {
  font-size: 18px !important;
}

.panel-head p {
  font-size: 12px !important;
}

.filters {
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  padding: 10px 14px !important;
}

.filters .filter-input {
  display: none !important;
}

.filter-select {
  min-width: 0;
  height: 38px !important;
}

.item {
  grid-template-columns: 50px minmax(0, 1fr) !important;
  gap: 11px !important;
  padding: 14px !important;
}

.item .actions {
  grid-column: 1 / -1;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap;
  min-width: 0;
}

.badge,
.card-thumb {
  width: 50px !important;
  height: 50px !important;
  border-radius: 12px !important;
}

.item h3 {
  font-size: 15px !important;
}

.item p {
  font-size: 12.5px !important;
}

.kids-filter-bar {
  overflow-x: auto;
  flex-wrap: nowrap !important;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.kids-filter-bar::-webkit-scrollbar {
  display: none;
}

.kids-filter-chip {
  flex: 0 0 auto;
}

body:not(.account-page) footer,
body.access-page .footer,
body.legal-page .footer,
.account-page .account-footer {
  display: none !important;
}

.modal-overlay {
  align-items: flex-end !important;
  padding: 0 !important;
  background: rgba(16,42,56,.36) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal {
  width: 100% !important;
  max-width: none !important;
  max-height: 80dvh !important;
  overflow-y: auto !important;
  border-radius: 22px 22px 0 0 !important;
  transform: translateY(100%) !important;
  transition: transform .22s ease !important;
  box-shadow: 0 -18px 46px rgba(16,42,56,.22) !important;
}

.modal-drag-handle,
.share-dialog-handle {
  display: block;
  width: 40px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: #C8D6D0;
}

.modal-overlay.open .modal {
  transform: translateY(0) !important;
}

.share-overlay {
  align-items: flex-end !important;
  padding: 0 !important;
}

.share-dialog {
  width: 100% !important;
  border-radius: 22px 22px 0 0 !important;
  box-shadow: 0 -18px 46px rgba(16,42,56,.22) !important;
}

.modal-top {
  padding: 16px 20px 0 !important;
}

.modal-body {
  padding: 16px 20px 20px !important;
}

.modal-footer {
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
}

.access-topbar {
  position: sticky;
  top: 0;
  z-index: 150;
}

.access-topbar-inner {
  min-height: 54px !important;
}

.access-main {
  max-width: 480px !important;
  padding-top: 14px !important;
}

.access-card {
  padding: 18px !important;
}

.access-copy h1 {
  font-size: 24px !important;
}

.legal-main {
  padding-top: 14px !important;
}

.legal-card h1 {
  font-size: 26px !important;
}

.account-page .account-hero,
.account-page .account-panel,
.account-page .account-card,
.account-page .account-context-panel {
  border-radius: 14px !important;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 220;
  display: grid;
  grid-template-columns: repeat(var(--mobile-nav-count, 5), minmax(0, 1fr));
  min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.97);
  border-top: 1px solid #DDE8E2;
  box-shadow: 0 -8px 24px rgba(16,42,56,.08);
}

body.map-page .topbar .w {
  display: grid !important;
  min-height: 54px !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

body.map-page .topbar .logo {
  justify-self: start !important;
}

body.map-page .account-back-link {
  width: 30px;
  height: 30px;
}

.mobile-bottom-nav__item {
  min-width: 0;
  min-height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border-radius: 14px;
  color: #607575;
  font-size: 10.5px;
  font-weight: 780;
  line-height: 1;
}

.mobile-bottom-nav__item svg {
  width: 21px;
  height: 21px;
}

.mobile-bottom-nav__item.is-active {
  color: #063047;
  background: #F0F8F4;
}

.mobile-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(16,42,56,.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.mobile-sheet-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-sheet {
  width: 100%;
  max-height: 80dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 22px 22px 0 0;
  background: #FFFFFF;
  box-shadow: 0 -18px 46px rgba(16,42,56,.22);
  transform: translateY(100%);
  transition: transform .22s ease;
  overflow: hidden;
  touch-action: pan-y;
}

.mobile-sheet--categories {
  min-height: min(620px, 76dvh);
  max-height: 86dvh;
}

.mobile-sheet--zones {
  min-height: min(560px, 82dvh);
  max-height: 88dvh;
}

.mobile-sheet-overlay.is-open .mobile-sheet {
  transform: translateY(0);
}

.mobile-sheet__handle {
  width: 40px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: #C8D6D0;
}

.mobile-sheet__head {
  padding: 8px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-sheet__title {
  color: #063047;
  font-size: 18px;
  font-weight: 850;
}

.mobile-sheet__close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #F7FAF8;
  color: #486263;
  font-size: 20px;
}

.mobile-sheet__body {
  overflow-y: auto;
  padding: 0 18px calc(18px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}

.mobile-sheet--categories .mobile-sheet__body {
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.mobile-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mobile-sheet-list {
  display: grid;
  gap: 8px;
}

.mobile-sheet-map-cta {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  border: 1px solid #C96A4A;
  border-radius: 999px;
  background: #C96A4A;
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(201, 106, 74, .16);
}

.mobile-sheet-map-cta svg {
  width: 18px;
  height: 18px;
}

.mobile-sheet-option,
.mobile-sheet-link {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #DDE8E2;
  border-radius: 14px;
  background: #FAFBF8;
  color: #102A38;
  padding: 11px 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 780;
}

.mobile-sheet--categories .mobile-sheet-link {
  min-height: 78px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  padding: 14px;
  font-size: 16px;
  line-height: 1.12;
}

.mobile-sheet-option.is-active {
  border-color: #8DB8A1;
  background: #F0F8F4;
  color: #063047;
}

.mobile-sheet-option span,
.mobile-sheet-link span {
  display: block;
  color: #607575;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}

.mobile-sheet--categories .mobile-sheet-link span {
  font-size: 12.5px;
  line-height: 1.25;
}

@media (max-width: 380px) {
  .topbar .logo-text {
    font-size: 13px !important;
  }

  .mobile-bottom-nav {
    padding-left: 5px;
    padding-right: 5px;
  }

  .mobile-bottom-nav__item {
    font-size: 10px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
