/* Shared theme controls for legacy-compatible pages */
.global-controls {
  position: fixed;
  top: 74px;
  right: 14px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px);
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.site-header .global-controls,
.header-theme-control {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: none;
  border-color: rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

body.dark .site-header .global-controls,
body.dark .header-theme-control,
body.dark-theme .site-header .global-controls,
body.dark-theme .header-theme-control {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.global-controls,
.global-controls * {
  box-sizing: border-box !important;
  max-width: none !important;
}

.global-theme-switch {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  height: 36px;
  position: relative;
  display: inline-flex;
  flex: 0 0 58px !important;
  cursor: pointer;
  margin: 0 !important;
  padding: 0 !important;
}

.global-theme-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.global-theme-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #f2f2f2;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: background .22s ease, border-color .22s ease;
}

.global-theme-slider::before {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff url("/icons/sun.png") center / 18px 18px no-repeat;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .20);
  transition: transform .22s ease, background-color .22s ease;
}

.global-theme-switch input:checked + .global-theme-slider {
  background: #0a0a0a;
  border-color: #2a2a2a;
}

.global-theme-switch input:checked + .global-theme-slider::before {
  transform: translateX(22px);
  background: #99e43e url("/icons/moon5.png") center / 17px 17px no-repeat;
}

body.dark .global-controls,
body.dark-theme .global-controls {
  background: rgba(18, 18, 18, 0.82);
  border-color: rgba(255, 255, 255, 0.10);
}

body:not(.dark):not(.dark-theme) {
  background-color: #f5f1e8;
}

body.dark,
body.dark-theme {
  background: #141414 !important;
  color: #e8edf8 !important;
}

body.dark .sidebar,
body.dark-theme .sidebar,
body.dark .main section,
body.dark-theme .main section,
body.dark .profile-card,
body.dark-theme .profile-card,
body.dark .stat-card,
body.dark-theme .stat-card,
body.dark .listing-card,
body.dark-theme .listing-card,
body.dark .order-card,
body.dark-theme .order-card,
body.dark .application-card,
body.dark-theme .application-card,
body.dark .courier-card,
body.dark-theme .courier-card,
body.dark .modal-content,
body.dark-theme .modal-content {
  background: #202020 !important;
  border-color: #2a2a2a !important;
}

body.dark input,
body.dark-theme input,
body.dark textarea,
body.dark-theme textarea,
body.dark select,
body.dark-theme select {
  background: #181818 !important;
  border-color: #333 !important;
  color: #e8edf8 !important;
}

body.dark :where(h1, h2, h3, h4, h5, h6, p, span, label, strong, small, li, td, th, div),
body.dark-theme :where(h1, h2, h3, h4, h5, h6, p, span, label, strong, small, li, td, th, div) {
  color: inherit;
}

body.dark :where(.section-kicker, .detail-kicker, .link-text, .mobile-nav a.active, .detail-mobile-nav a.active),
body.dark-theme :where(.section-kicker, .detail-kicker, .link-text, .mobile-nav a.active, .detail-mobile-nav a.active) {
  color: #99e43e !important;
}

body.dark :where(.theme-hint, .empty-sub, .muted, .meta, .meta-item, .description, .subtitle, .order-meta, .card-meta),
body.dark-theme :where(.theme-hint, .empty-sub, .muted, .meta, .meta-item, .description, .subtitle, .order-meta, .card-meta) {
  color: #b9c3d6 !important;
}

body.dark :where(.btn-primary, .add-btn, .profile-save-btn, .review-submit-btn),
body.dark-theme :where(.btn-primary, .add-btn, .profile-save-btn, .review-submit-btn) {
  color: #101510 !important;
}

.makon-user-event-modal {
  position: fixed;
  inset: 0;
  z-index: 26000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.makon-user-event-modal[aria-hidden="false"] {
  display: flex;
}

.makon-user-event-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.44);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.makon-user-event-card {
  position: relative;
  width: min(420px, calc(100vw - 28px));
  padding: 24px;
  border: 1px solid rgba(47, 158, 34, 0.18);
  border-radius: 22px;
  background: #fffdf8;
  color: #111827;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.26);
}

.makon-user-event-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: #111827;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.makon-user-event-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #e4ffd4, #f8fff0);
  box-shadow: 0 12px 28px rgba(47, 158, 34, 0.18);
  font-size: 30px;
}

.makon-user-event-kicker {
  margin: 0 0 6px;
  color: #27a327;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.makon-user-event-card h2 {
  margin: 0;
  color: #111827;
  font-size: 26px;
  line-height: 1.12;
}

.makon-user-event-card p {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.45;
}

.makon-user-event-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.makon-user-event-actions :where(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.makon-user-event-done {
  border: 1px solid rgba(47, 158, 34, 0.22);
  background: #f8fff0;
  color: #176d28;
}

.makon-user-event-open {
  border: 1px solid #2ac94f;
  background: linear-gradient(135deg, #8ee63a, #2ac94f);
  color: #0d1b0d !important;
  box-shadow: 0 14px 28px rgba(42, 201, 79, 0.22);
}

body.dark .makon-user-event-card,
body.dark-theme .makon-user-event-card {
  background: #202020;
  border-color: rgba(153, 228, 62, 0.22);
  color: #e8edf8;
}

body.dark .makon-user-event-close,
body.dark-theme .makon-user-event-close {
  background: rgba(255, 255, 255, 0.08);
  color: #e8edf8;
}

body.dark .makon-user-event-card h2,
body.dark-theme .makon-user-event-card h2 {
  color: #f8fafc;
}

body.dark .makon-user-event-card p,
body.dark-theme .makon-user-event-card p {
  color: #b9c3d6;
}

@media (max-width: 540px) {
  .makon-user-event-modal {
    align-items: flex-end;
    padding: 14px 14px 96px;
  }

  .makon-user-event-card {
    width: 100%;
    padding: 20px;
    border-radius: 20px;
  }

  .makon-user-event-card h2 {
    font-size: 24px;
  }
}

.modal#cityModal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.44);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.modal#cityModal[aria-hidden="false"] {
  display: flex;
}

.modal#cityModal .modal-content {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #fff;
  color: #111827;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.modal#cityModal .modal-content h2 {
  margin: 0 44px 16px 0;
  font-size: 22px;
  line-height: 1.2;
  color: inherit;
}

.modal#cityModal .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: inherit;
  cursor: pointer;
}

.modal#cityModal .city-list {
  display: grid;
  gap: 8px;
  max-height: min(560px, calc(100vh - 170px));
  margin: 0;
  padding: 0 4px 4px 0;
  overflow: auto;
  list-style: none;
}

.modal#cityModal .city-country-title {
  margin: 14px 0 4px;
  padding: 0 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.modal#cityModal .city-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
  cursor: pointer;
}

.modal#cityModal .city-item:hover {
  border-color: rgba(47, 158, 34, 0.32);
  background: #f1fbe8;
}

.modal#cityModal .city-item span {
  color: inherit;
  font-weight: 800;
}

.modal#cityModal .city-item small {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
}

.modal#cityModal .city-item-all {
  background: #eaffd7;
  border-color: rgba(47, 158, 34, 0.2);
}

body.dark .modal#cityModal .modal-content,
body.dark-theme .modal#cityModal .modal-content {
  background: #202020 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e8edf8 !important;
}

body.dark .modal#cityModal .modal-close,
body.dark-theme .modal#cityModal .modal-close,
body.dark .modal#cityModal .city-item,
body.dark-theme .modal#cityModal .city-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.09);
  color: #e8edf8;
}

body.dark .modal#cityModal .city-item-all,
body.dark-theme .modal#cityModal .city-item-all,
body.dark .modal#cityModal .city-item:hover,
body.dark-theme .modal#cityModal .city-item:hover {
  background: rgba(153, 228, 62, 0.14);
  border-color: rgba(153, 228, 62, 0.28);
}

/* Project-wide card rhythm: cards should wrap, not stretch across tablet/desktop widths. */
.orders-grid,
.favorites-grid,
.activity-grid,
.bookings-grid,
.cars-grid,
.movies-grid-client,
.sessions-grid,
.available-orders-grid,
.businesses-grid,
.listings-grid,
.applications-grid,
.services-grid,
.masters-grid,
.menu-grid,
.requests-grid,
.cars-grid-product,
#carsContainer .cars-grid-product {
  justify-content: start;
}

.order-card,
.favorite-card,
.activity-card,
.booking-card,
.booking-admin-card,
.car-card,
.car-card-product,
.movie-card,
.movie-card-client,
.session-card,
.session-admin-card,
.available-order-card,
.business-card-modern,
.listing-card,
.listing-card-modern,
.application-card,
.application-card-modern,
.service-card,
.master-card,
.menu-card,
.request-card,
.company-mini-card {
  width: 100%;
}

@media (min-width: 760px) {
  .activity-grid {
    grid-template-columns: repeat(auto-fit, minmax(290px, 380px)) !important;
  }

  .orders-grid,
  .favorites-grid,
  .available-orders-grid,
  .bookings-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 420px)) !important;
  }

  .cars-grid,
  .cars-grid-product,
  #carsContainer .cars-grid-product,
  .movies-grid-client,
  .services-grid,
  .masters-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 360px)) !important;
  }

  .listings-grid,
  .applications-grid,
  .businesses-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 390px)) !important;
  }
}

@media (min-width: 1180px) {
  .activity-card {
    min-height: 420px;
  }

  .booking-activity-card {
    min-height: 440px;
  }
}

@media (max-width: 768px) {
  .global-controls {
    top: 70px;
    right: 12px;
    padding: 6px;
  }

  .global-theme-switch {
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    height: 34px;
    flex-basis: 54px !important;
  }

  .global-theme-slider::before {
    width: 26px;
    height: 26px;
  }

  .global-theme-switch input:checked + .global-theme-slider::before {
    transform: translateX(20px);
  }
}

/* Detail cinema cards need dense movie browsing, not wide generic cards. */
.cinema-section .movies-grid-client,
#cinemaContainer .movies-grid-client {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
  justify-content: stretch !important;
}

.cinema-section .movie-card-client,
#cinemaContainer .movie-card-client {
  width: 100% !important;
  max-width: none !important;
}

.cinema-section .movie-card-client img,
.cinema-section .movie-no-poster,
#cinemaContainer .movie-card-client img,
#cinemaContainer .movie-no-poster {
  height: 190px !important;
}

@media (max-width: 1400px) {
  .cinema-section .movies-grid-client,
  #cinemaContainer .movies-grid-client {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1120px) {
  .cinema-section .movies-grid-client,
  #cinemaContainer .movies-grid-client {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .cinema-section .movies-grid-client,
  #cinemaContainer .movies-grid-client {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .cinema-section .movie-card-client img,
  .cinema-section .movie-no-poster,
  #cinemaContainer .movie-card-client img,
  #cinemaContainer .movie-no-poster {
    height: 160px !important;
  }
}

@media (max-width: 430px) {
  .cinema-section .movies-grid-client,
  #cinemaContainer .movies-grid-client {
    grid-template-columns: 1fr !important;
  }
}

/* Global interaction polish: remove the browser's blue tap/hover flash without
   hiding keyboard focus. This file is shared by home, overview, profiles,
   detail pages and dashboards. */
:where(
  a,
  button,
  input,
  textarea,
  select,
  summary,
  label,
  [role="button"],
  [tabindex],
  .catalog-item,
  .listing-card-home,
  .mobile-nav a,
  .event-bottom-nav a,
  .courier-mobile-nav button,
  .sidebar a
) {
  -webkit-tap-highlight-color: transparent !important;
}

:where(a, button, summary, label, [role="button"]) {
  touch-action: manipulation;
}

:where(a, button, input, textarea, select, summary, [role="button"], [tabindex]):focus {
  outline-color: transparent;
}

:where(a, button, input, textarea, select, summary, [role="button"], [tabindex]):focus-visible {
  outline: 3px solid rgba(46, 185, 57, 0.34) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(46, 185, 57, 0.12) !important;
}

:where(a, button, summary, [role="button"]):active {
  -webkit-tap-highlight-color: transparent !important;
}

@media (max-width: 767px) {
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    z-index: 13000 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 6px !important;
    width: min(calc(100vw - 24px), 560px) !important;
    height: 72px !important;
    min-height: 72px !important;
    padding: 8px !important;
    transform: translateX(-50%) !important;
    border: 1px solid rgba(28, 43, 30, 0.08) !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.13) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 56px !important;
    min-height: 56px !important;
    padding: 6px 4px !important;
    border: 0 !important;
    border-radius: 17px !important;
    background: transparent !important;
    color: #64748b !important;
    text-decoration: none !important;
    box-shadow: none !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) a:is(.active, :hover) {
    background: rgba(210, 250, 188, 0.92) !important;
    color: #2f9e22 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) :where(.icon, img, svg) {
    flex: 0 0 auto !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) :where(.icon) {
    width: 25px !important;
    height: 25px !important;
    display: grid !important;
    place-items: center !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) :where(img, svg) {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain !important;
    color: currentColor !important;
    fill: currentColor !important;
    stroke: currentColor !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) a:not(.active) img {
    filter: brightness(0) saturate(100%) invert(43%) sepia(13%) saturate(738%) hue-rotate(176deg) brightness(91%) contrast(86%) !important;
    opacity: 1 !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) a:is(.active, :hover) img {
    filter: brightness(0) saturate(100%) invert(43%) sepia(74%) saturate(858%) hue-rotate(64deg) brightness(88%) contrast(89%) !important;
    opacity: 1 !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) .nav-icon-active {
    display: none !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) a.active .nav-icon-default {
    display: none !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) a.active .nav-icon-active {
    display: block !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) .overview-nav-icon img {
    filter: none !important;
  }

  :where(.mobile-nav, .detail-mobile-nav) a > :where(.label, span:not(.icon)),
  .events-mobile-nav a > span {
    max-width: 100% !important;
    color: currentColor !important;
    font-size: 10.5px !important;
    line-height: 1.1 !important;
    font-weight: 750 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.dark :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav),
  body.dark-theme :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(19, 20, 19, 0.94) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28) !important;
  }

  body.dark :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) a,
  body.dark-theme :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) a {
    color: #cbd5e1 !important;
    background: transparent !important;
  }

  body.dark :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) a:is(.active, :hover),
  body.dark-theme :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav) a:is(.active, :hover) {
    background: rgba(55, 94, 31, 0.78) !important;
    color: #b6f36a !important;
  }
}


/* ============================================================
   MAKON LOCATION MODAL — COMPACT COUNTRY -> CITY FLOW 2026-08-18
   ============================================================ */
.modal#cityModal .modal-content {
  width: min(440px, calc(100vw - 28px)) !important;
  max-height: min(640px, calc(100dvh - 32px)) !important;
  padding: 18px !important;
  border-radius: 22px !important;
}

.modal#cityModal .modal-content h2 {
  margin: 2px 46px 3px 0 !important;
  font-size: 21px !important;
  line-height: 1.15 !important;
  letter-spacing: -.02em;
}

.modal#cityModal .location-modal-subtitle {
  margin: 0 46px 14px 0 !important;
  color: #7a8495 !important;
  font-size: 12.5px !important;
  line-height: 1.35 !important;
  font-weight: 650 !important;
}

.modal#cityModal .modal-close {
  top: 12px !important;
  right: 12px !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 13px !important;
  background: #f4f6f8 !important;
}

.modal#cityModal .city-list {
  gap: 6px !important;
  max-height: min(480px, calc(100dvh - 150px)) !important;
  padding: 1px 3px 3px 0 !important;
  scrollbar-width: thin;
}

.modal#cityModal .location-modal-section-label {
  list-style: none;
  margin: 10px 2px 3px;
  color: #8a94a5;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.modal#cityModal .city-item {
  position: relative;
  min-height: 46px !important;
  padding: 9px 12px !important;
  border-radius: 13px !important;
  background: #f8f9fb !important;
  border-color: rgba(15, 23, 42, .075) !important;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.modal#cityModal .city-item:hover {
  background: #f6faef !important;
  border-color: rgba(76, 154, 39, .24) !important;
  transform: translateY(-1px);
}

.modal#cityModal .city-item > span {
  min-width: 0;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800 !important;
  overflow-wrap: anywhere;
}

.modal#cityModal .city-item > small {
  color: #7b8595 !important;
  font-size: 11px !important;
  font-weight: 700;
  white-space: nowrap;
}

.modal#cityModal .location-all-row,
.modal#cityModal .location-country-all {
  background: #fbfcfa !important;
  border-color: rgba(76, 154, 39, .16) !important;
}

.modal#cityModal .location-all-row::before,
.modal#cityModal .location-country-all::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #69b93a;
  box-shadow: 0 0 0 4px rgba(105,185,58,.12);
}

.modal#cityModal .location-country-row {
  padding-right: 38px !important;
}

.modal#cityModal .location-country-row::after {
  content: "›";
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-52%);
  color: #7f8998;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.modal#cityModal .location-city-row {
  min-height: 44px !important;
  padding-left: 14px !important;
}

.modal#cityModal .location-back-row {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 0 2px;
  padding: 5px 4px;
  border: 0;
  background: transparent;
  color: #5d6879;
  cursor: pointer;
  border-radius: 10px;
}

.modal#cityModal .location-back-row::before {
  content: "‹";
  font-size: 24px;
  line-height: 1;
}

.modal#cityModal .location-back-row span {
  font-size: 13px;
  font-weight: 800;
}

.modal#cityModal .location-back-row small {
  margin-left: auto;
  color: #8b95a3;
  font-size: 11px;
}

.modal#cityModal .location-back-row:hover {
  background: rgba(15,23,42,.035);
}

body.dark .modal#cityModal .location-modal-subtitle,
body.dark-theme .modal#cityModal .location-modal-subtitle,
body.dark .modal#cityModal .location-modal-section-label,
body.dark-theme .modal#cityModal .location-modal-section-label {
  color: #9aa5b5 !important;
}

body.dark .modal#cityModal .modal-close,
body.dark-theme .modal#cityModal .modal-close,
body.dark .modal#cityModal .city-item,
body.dark-theme .modal#cityModal .city-item {
  background: #282a28 !important;
  border-color: rgba(255,255,255,.08) !important;
}

body.dark .modal#cityModal .location-all-row,
body.dark-theme .modal#cityModal .location-all-row,
body.dark .modal#cityModal .location-country-all,
body.dark-theme .modal#cityModal .location-country-all {
  background: #252924 !important;
  border-color: rgba(153,228,62,.15) !important;
}

body.dark .modal#cityModal .location-back-row,
body.dark-theme .modal#cityModal .location-back-row {
  color: #c9d2df;
}

body.dark .modal#cityModal .location-back-row:hover,
body.dark-theme .modal#cityModal .location-back-row:hover {
  background: rgba(255,255,255,.05);
}

@media (max-width: 560px) {
  .modal#cityModal {
    padding: 12px !important;
  }

  .modal#cityModal .modal-content {
    width: min(100%, 430px) !important;
    max-height: calc(100dvh - 24px) !important;
    padding: 16px !important;
    border-radius: 22px !important;
  }

  .modal#cityModal .city-list {
    max-height: calc(100dvh - 142px) !important;
  }
}

/* ============================================================
   MAKON HOME — UNIFIED BOTTOM NAV STATES
   2026-08-18
   One icon per item. All four items use the same neutral state
   and the same green active/hover/focus state.
   ============================================================ */
@media (max-width: 920px) {
  body.home-page .mobile-nav a {
    color: #647084 !important;
    background: transparent !important;
    transform: none !important;
    transition: background-color .18s ease, color .18s ease !important;
  }

  body.home-page .mobile-nav a:is(.active, :hover, :focus-visible) {
    background: #dcf8c9 !important;
    color: #169c35 !important;
    transform: none !important;
  }

  body.home-page .mobile-nav a .icon,
  body.home-page .mobile-nav .overview-nav-icon {
    position: relative !important;
    width: 25px !important;
    height: 25px !important;
    display: grid !important;
    place-items: center !important;
  }

  body.home-page .mobile-nav a .icon img,
  body.home-page .mobile-nav .overview-nav-icon img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain !important;
    opacity: 1 !important;
    transform: none !important;
    filter: brightness(0) saturate(100%)
            invert(48%) sepia(13%) saturate(823%)
            hue-rotate(178deg) brightness(88%) contrast(87%) !important;
  }

  body.home-page .mobile-nav a:is(.active, :hover, :focus-visible) .icon img,
  body.home-page .mobile-nav a:is(.active, :hover, :focus-visible) .overview-nav-icon img {
    opacity: 1 !important;
    transform: none !important;
    filter: brightness(0) saturate(100%)
            invert(48%) sepia(81%) saturate(2041%)
            hue-rotate(105deg) brightness(93%) contrast(83%) !important;
  }

  /* Старый dual-icon механизм на главной больше не используется.
     Если закэшированный HTML ещё содержит второй img, не даём ему
     перекрывать/прятать основную иконку. */
  body.home-page .mobile-nav .overview-nav-icon .nav-icon-active {
    display: none !important;
    opacity: 0 !important;
  }

  body.home-page .mobile-nav .overview-nav-icon .nav-icon-default {
    display: block !important;
    opacity: 1 !important;
  }

  body.home-page .mobile-nav a:is(.active, :hover, :focus-visible)
  .overview-nav-icon .nav-icon-default {
    display: block !important;
    opacity: 1 !important;
  }
}

body.dark.home-page .mobile-nav a:is(.active, :hover, :focus-visible),
body.dark-theme.home-page .mobile-nav a:is(.active, :hover, :focus-visible) {
  background: rgba(55, 94, 31, .78) !important;
  color: #b6f36a !important;
}

.makon-logout-form,
.logout-form {
  margin: 0;
}

.makon-logout-form button,
.logout-form button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  width: 100%;
  cursor: pointer;
}

/* ============================================================
   MAKON V38.4 — ICON-ONLY MOBILE NAVIGATION
   More content remains visible on every public mobile page.
   ============================================================ */
@media (max-width: 767px) {
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) {
    height: 64px !important;
    min-height: 64px !important;
    width: min(calc(100vw - 22px), 500px) !important;
    padding: 6px 8px !important;
    border-radius: 21px !important;
  }
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a {
    height: 50px !important;
    min-height: 50px !important;
    padding: 5px !important;
    gap: 0 !important;
    border-radius: 16px !important;
  }
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a > .label,
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a > span:not(.icon):not(.overview-nav-icon) {
    display: none !important;
  }
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) :where(.icon, .overview-nav-icon) {
    width: 30px !important;
    height: 30px !important;
  }
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) :where(.icon, .overview-nav-icon) img,
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) > a > img,
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) > a > svg {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
  }
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a.active {
    background: rgba(210,250,188,.92) !important;
  }

  .courier-mobile-nav {
    min-height: 64px !important;
    height: 64px !important;
  }
  .courier-mobile-nav button {
    min-height: 50px !important;
    gap: 0 !important;
  }
  .courier-mobile-nav button > span:not(.mobile-nav-icon) {
    display: none !important;
  }
  .courier-mobile-nav .mobile-nav-icon {
    width: 28px !important;
    height: 28px !important;
  }

  body:has(:where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav)) {
    scroll-padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }
}


/* ============================================================
   MAKON V46 — ZERO-FLASH THEME + PHONE-ONLY PUBLIC BOTTOM NAV
   ============================================================ */
html[data-makon-theme="dark"] {
  background: #141414 !important;
  color-scheme: dark;
}
html[data-makon-theme="light"] {
  background: white !important;
  color-scheme: light;
}

/* Public bottom navigation belongs to phones, not tablets. */
@media (min-width: 768px) {
  body.home-page .mobile-nav,
  body.detail-page .detail-mobile-nav,
  body.overview-page .events-mobile-nav,
  body.afisha-page .events-mobile-nav,
  body.sections-page .events-mobile-nav,
  body.section-products-page .events-mobile-nav,
  body.events-page .events-mobile-nav {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.home-page,
  body.detail-page,
  body.overview-page,
  body.afisha-page,
  body.sections-page,
  body.section-products-page,
  body.events-page {
    padding-bottom: 0 !important;
  }
}


/* ============================================================
   MAKON V46.1 — PHONE-ONLY BOTTOM NAV + TABLET HEADER ICON NAV
   Bottom dock: <=540px. 541-1023px uses compact header icons.
   ============================================================ */
.makon-tablet-header-nav {
  display: none;
}

@media (min-width: 541px) and (max-width: 1023px) {
  .makon-tablet-header-nav {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    padding: 3px !important;
    border: 1px solid rgba(20, 46, 28, .08) !important;
    border-radius: 14px !important;
    background: rgba(245, 249, 242, .92) !important;
    box-shadow: none !important;
  }

  .makon-tablet-header-nav a {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border-radius: 11px !important;
    color: #667085 !important;
    background: transparent !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .makon-tablet-header-nav a.active,
  .makon-tablet-header-nav a:hover,
  .makon-tablet-header-nav a:focus-visible {
    background: #d7f6c8 !important;
    color: #15933f !important;
  }

  .makon-tablet-header-nav img,
  .makon-tablet-header-nav svg {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    object-fit: contain !important;
    filter: brightness(0) saturate(100%) invert(45%) sepia(12%) saturate(877%) hue-rotate(176deg) brightness(90%) contrast(87%) !important;
  }

  .makon-tablet-header-nav a.active img,
  .makon-tablet-header-nav a:hover img,
  .makon-tablet-header-nav a:focus-visible img {
    filter: brightness(0) saturate(100%) invert(47%) sepia(76%) saturate(1345%) hue-rotate(96deg) brightness(90%) contrast(86%) !important;
  }

  body.dark .makon-tablet-header-nav,
  body.dark-theme .makon-tablet-header-nav {
    border-color: rgba(255,255,255,.08) !important;
    background: rgba(36, 40, 36, .94) !important;
  }

  body.dark .makon-tablet-header-nav a,
  body.dark-theme .makon-tablet-header-nav a {
    color: #c9d2dc !important;
  }

  body.dark .makon-tablet-header-nav a.active,
  body.dark-theme .makon-tablet-header-nav a.active {
    background: rgba(87, 140, 55, .38) !important;
  }
}

@media (min-width: 541px) {
  body.home-page .mobile-nav,
  body.detail-page .detail-mobile-nav,
  body.overview-page .events-mobile-nav,
  body.afisha-page .events-mobile-nav,
  body.sections-page .events-mobile-nav,
  body.section-products-page .events-mobile-nav,
  body.events-page .events-mobile-nav,
  .makon-bottom-nav {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.home-page,
  body.detail-page,
  body.overview-page,
  body.afisha-page,
  body.sections-page,
  body.section-products-page,
  body.events-page {
    padding-bottom: 0 !important;
  }
}

@media (max-width: 540px) {
  body.dark :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav),
  body.dark-theme :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) {
    background: rgba(24, 27, 24, .97) !important;
    border-color: rgba(255,255,255,.08) !important;
    box-shadow: 0 -8px 28px rgba(0,0,0,.30) !important;
  }
  body.dark :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a,
  body.dark-theme :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a {
    color: #cbd5e1 !important;
    background: transparent !important;
  }
  body.dark :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a.active,
  body.dark-theme :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a.active {
    background: rgba(70, 124, 39, .58) !important;
    color: #b9f078 !important;
  }
}


/* ============================================================
   MAKON V47.2 — dark selector/modal + strict phone-only bottom nav
   ============================================================ */
@media (min-width:541px) {
  body.home-page .mobile-nav,
  body.detail-page .detail-mobile-nav,
  body.overview-page .events-mobile-nav,
  body.afisha-page .events-mobile-nav,
  body.sections-page .events-mobile-nav,
  body.section-products-page .events-mobile-nav,
  body.events-page .events-mobile-nav,
  body :is(.makon-bottom-nav) {
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }
}
@media (max-width:540px) {
  body.dark.home-page .mobile-nav,
  body.dark-theme.home-page .mobile-nav,
  body.dark.detail-page .detail-mobile-nav,
  body.dark-theme.detail-page .detail-mobile-nav,
  body.dark.overview-page .events-mobile-nav,
  body.dark-theme.overview-page .events-mobile-nav {
    background:#1b1f1b !important;
    border-color:rgba(255,255,255,.09) !important;
  }
}
body.dark .modal#cityModal .modal-content,
body.dark-theme .modal#cityModal .modal-content {
  background:#1f231f !important;
  color:#eef3ee !important;
  border-color:rgba(255,255,255,.09) !important;
}
body.dark .modal#cityModal :is(.city-item,.location-all-row,.location-country-all),
body.dark-theme .modal#cityModal :is(.city-item,.location-all-row,.location-country-all) {
  background:#292e29 !important;
  color:#eef3ee !important;
  border-color:rgba(255,255,255,.08) !important;
}
body.dark .modal#cityModal :is(.city-item:hover,.location-all-row:hover,.location-country-all:hover),
body.dark-theme .modal#cityModal :is(.city-item:hover,.location-all-row:hover,.location-country-all:hover) {
  background:#32422d !important;
  border-color:rgba(153,228,62,.20) !important;
}

/* V47.2 — location selector is fully dark on every public page. */
body.dark #cityModal .modal-content,
body.dark-theme #cityModal .modal-content {
  background:#1f231f !important;
  border-color:rgba(255,255,255,.09) !important;
  color:#eef3ee !important;
}
body.dark #cityModal :is(h2,.location-modal-subtitle,.city-item,.city-item strong,.city-item small),
body.dark-theme #cityModal :is(h2,.location-modal-subtitle,.city-item,.city-item strong,.city-item small) {
  color:#eef3ee !important;
}
body.dark #cityModal .city-item small,
body.dark-theme #cityModal .city-item small { color:#aeb9b0 !important; }
body.dark #cityModal .city-item,
body.dark-theme #cityModal .city-item {
  background:#292e29 !important;
  border-color:rgba(255,255,255,.08) !important;
}

/* ============================================================
   MAKON V48 — NAV ICON STATES + TABLET STABILITY + DARK FILTERS
   Active navigation uses the supplied filled icons, not a green tile.
   ============================================================ */
.makon-nav-icon,
:where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) .icon,
:where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) .overview-nav-icon {
  position: relative;
}

.makon-nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.nav-icon-default {
  display: block !important;
  opacity: 1 !important;
}

.nav-icon-active {
  display: none !important;
  opacity: 0 !important;
}

:where(.makon-tablet-header-nav, .mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a.active .nav-icon-default {
  display: none !important;
  opacity: 0 !important;
}

:where(.makon-tablet-header-nav, .mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a.active .nav-icon-active {
  display: block !important;
  opacity: 1 !important;
}

/* The active state is the filled icon itself; remove the old green square/pill. */
:where(.makon-tablet-header-nav, .mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a.active {
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  color: #188e3e !important;
}

:where(.makon-tablet-header-nav, .mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a.active .nav-icon-active {
  filter: brightness(0) saturate(100%) invert(44%) sepia(73%) saturate(1230%) hue-rotate(94deg) brightness(91%) contrast(89%) !important;
}

:where(.makon-tablet-header-nav, .mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a:not(.active) .nav-icon-default {
  filter: brightness(0) saturate(100%) invert(40%) sepia(9%) saturate(760%) hue-rotate(175deg) brightness(93%) contrast(88%) !important;
}

/* Home had an old rule that forcibly disabled the dual-icon mechanism. */
body.home-page .mobile-nav .nav-icon-active,
body.home-page .makon-tablet-header-nav .nav-icon-active {
  display: none !important;
}
body.home-page .mobile-nav a.active .nav-icon-default,
body.home-page .makon-tablet-header-nav a.active .nav-icon-default {
  display: none !important;
}
body.home-page .mobile-nav a.active .nav-icon-active,
body.home-page .makon-tablet-header-nav a.active .nav-icon-active {
  display: block !important;
  opacity: 1 !important;
}

@media (max-width: 540px) {
  body.home-page .mobile-nav a:is(.active, :hover, :focus-visible),
  body.detail-page .detail-mobile-nav a:is(.active, :hover, :focus-visible),
  :where(.events-mobile-nav, .makon-bottom-nav) a.active {
    background: transparent !important;
    box-shadow: none !important;
  }
}

/* Tablet icons never shrink into each other. */
@media (min-width: 541px) and (max-width: 1023px) {
  .makon-tablet-header-nav {
    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    gap: 6px !important;
    padding: 3px 4px !important;
    overflow: visible !important;
    border-radius: 15px !important;
  }

  .makon-tablet-header-nav a {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
  }

  .makon-tablet-header-nav .makon-nav-icon,
  .makon-tablet-header-nav img,
  .makon-tablet-header-nav svg {
    width: 23px !important;
    height: 23px !important;
    min-width: 23px !important;
    max-width: 23px !important;
    max-height: 23px !important;
    object-fit: contain !important;
  }

  .makon-tablet-header-nav a.active,
  .makon-tablet-header-nav a:hover,
  .makon-tablet-header-nav a:focus-visible,
  body.dark .makon-tablet-header-nav a.active,
  body.dark-theme .makon-tablet-header-nav a.active {
    background: transparent !important;
  }

  body.home-page .header-inner {
    grid-template-columns: auto minmax(68px, 118px) max-content 40px 40px !important;
    grid-template-areas: "brand city tablet-nav search-toggle assistant" !important;
    column-gap: 6px !important;
  }

  body.home-page .location-pill {
    width: auto !important;
    min-width: 0 !important;
    max-width: 118px !important;
  }

  body.home-page .makon-tablet-header-nav {
    justify-self: center !important;
  }
}

@media (min-width: 541px) and (max-width: 669px) {
  body.home-page .brand {
    display: none !important;
  }

  body.home-page .left {
    width: 38px !important;
    min-width: 38px !important;
  }

  body.home-page .location-pill {
    max-width: 92px !important;
  }

  body.home-page .makon-tablet-header-nav {
    gap: 3px !important;
    padding-inline: 3px !important;
  }

  body.home-page .makon-tablet-header-nav a {
    flex-basis: 35px !important;
    width: 35px !important;
    min-width: 35px !important;
    max-width: 35px !important;
    height: 35px !important;
    min-height: 35px !important;
  }
}

/* Dark-mode selector/filter surfaces below the home banner. */
body.dark.home-page .location-pill,
body.dark-theme.home-page .location-pill {
  border-color: rgba(255,255,255,.09) !important;
  background: #262c26 !important;
  color: #eef4ee !important;
  box-shadow: none !important;
}

body.dark.home-page .location-pill #currentCityLabel,
body.dark-theme.home-page .location-pill #currentCityLabel {
  color: #eef4ee !important;
}

body.dark.home-page .location-chevron,
body.dark-theme.home-page .location-chevron {
  border-color: #a9b5aa !important;
}

body.dark.home-page .nearby-toolbar,
body.dark-theme.home-page .nearby-toolbar,
body.dark.home-page .nearby-controls-row,
body.dark-theme.home-page .nearby-controls-row,
body.dark.home-page .nearby-chips,
body.dark-theme.home-page .nearby-chips {
  background: transparent !important;
  color: #edf3ed !important;
}

body.dark.home-page .nearby-title-row h2,
body.dark-theme.home-page .nearby-title-row h2,
body.dark.home-page .nearby-title-row a,
body.dark-theme.home-page .nearby-title-row a {
  color: #edf3ed !important;
}

body.dark.home-page .nearby-chip,
body.dark-theme.home-page .nearby-chip {
  border: 1px solid rgba(255,255,255,.09) !important;
  background: #292f29 !important;
  color: #dbe4db !important;
  box-shadow: none !important;
}

body.dark.home-page .nearby-chip.active,
body.dark-theme.home-page .nearby-chip.active,
body.dark.home-page .nearby-chip:hover,
body.dark-theme.home-page .nearby-chip:hover {
  border-color: rgba(132, 214, 88, .30) !important;
  background: #315c31 !important;
  color: #f2ffed !important;
}

/* ============================================================
   MAKON V48.1 — DESKTOP ICON NAV + STABLE TABLET SEARCH +
   PHONE DUAL-ICON CLIP
   ============================================================ */

/* Desktop uses the same compact icon-only navigation language as tablet. */
@media (min-width: 1024px) {
  body.home-page .makon-tablet-header-nav {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    flex: 0 0 auto !important;
    padding: 4px 5px !important;
    border: 1px solid rgba(20,46,28,.08) !important;
    border-radius: 15px !important;
    background: rgba(245,249,242,.90) !important;
  }

  body.home-page .makon-tablet-header-nav a {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
  }

  body.home-page .makon-tablet-header-nav .makon-nav-icon,
  body.home-page .makon-tablet-header-nav img {
    width: 23px !important;
    height: 23px !important;
    max-width: 23px !important;
    max-height: 23px !important;
  }

  body.home-page .right .header-action,
  body.home-page .right .header-profile-chip,
  body.home-page .right .header-login-btn {
    display: none !important;
  }

  body.home-page .right {
    flex: 0 0 auto !important;
    gap: 8px !important;
  }

  body.dark.home-page .makon-tablet-header-nav,
  body.dark-theme.home-page .makon-tablet-header-nav {
    border-color: rgba(255,255,255,.08) !important;
    background: rgba(36,40,36,.94) !important;
  }
}

/* 541–899px: never force a full search field into the same row as four nav
   icons. Search stays behind its compact button and opens in-place. */
@media (min-width: 541px) and (max-width: 899px) {
  body.home-page .header-inner,
  body.home-page .site-header.is-search-open .header-inner {
    grid-template-columns: auto minmax(72px, 118px) max-content 42px 42px !important;
    grid-template-areas: "brand city tablet-nav search-toggle assistant" !important;
    grid-template-rows: 1fr !important;
    column-gap: 6px !important;
  }

  body.home-page .header-filters {
    display: none !important;
  }

  body.home-page .home-mobile-search-toggle {
    display: grid !important;
    grid-area: search-toggle !important;
  }

  body.home-page .mobile-header-assistant-btn {
    grid-area: assistant !important;
  }

  body.home-page .site-header.is-search-open .header-inner {
    grid-template-columns: minmax(0, 1fr) 42px 42px !important;
    grid-template-areas: "filters search-toggle assistant" !important;
  }

  body.home-page .site-header.is-search-open .left,
  body.home-page .site-header.is-search-open .location-pill,
  body.home-page .site-header.is-search-open .makon-tablet-header-nav {
    display: none !important;
  }

  body.home-page .site-header.is-search-open .header-filters {
    display: flex !important;
    grid-area: filters !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* 900–1023px has enough room for icon nav + a real search field. */
@media (min-width: 900px) and (max-width: 1023px) {
  body.home-page .header-inner,
  body.home-page .site-header.is-search-open .header-inner {
    grid-template-columns: auto minmax(86px, 132px) max-content minmax(180px, 1fr) 42px !important;
    grid-template-areas: "brand city tablet-nav filters assistant" !important;
    grid-template-rows: 1fr !important;
    column-gap: 7px !important;
  }

  body.home-page .header-filters,
  body.home-page .site-header.is-search-open .header-filters {
    display: flex !important;
    grid-area: filters !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
  }

  body.home-page .header-input,
  body.home-page .site-header.is-search-open .header-input {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  body.home-page .home-mobile-search-toggle {
    display: none !important;
  }

  body.home-page .mobile-header-assistant-btn {
    display: grid !important;
    grid-area: assistant !important;
  }

  body.home-page .site-header.is-search-open .left,
  body.home-page .site-header.is-search-open .location-pill,
  body.home-page .site-header.is-search-open .makon-tablet-header-nav {
    display: flex !important;
  }
}

/* Phone active/default icons occupy exactly the same 24×24 slot. This prevents
   the second image from leaking below the dock on cached/legacy nav markup. */
@media (max-width: 540px) {
  body.home-page .mobile-nav :is(.icon, .overview-nav-icon) {
    position: relative !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    overflow: hidden !important;
  }

  body.home-page .mobile-nav :is(.icon, .overview-nav-icon) > img {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    object-fit: contain !important;
  }

  body.home-page .mobile-nav a:not(.active) .nav-icon-default {
    display: block !important;
    opacity: 1 !important;
  }

  body.home-page .mobile-nav a:not(.active) .nav-icon-active {
    display: none !important;
    opacity: 0 !important;
  }

  body.home-page .mobile-nav a.active .nav-icon-default {
    display: none !important;
    opacity: 0 !important;
  }

  body.home-page .mobile-nav a.active .nav-icon-active {
    display: block !important;
    opacity: 1 !important;
  }

  body.home-page .mobile-nav a.active {
    background: transparent !important;
    box-shadow: none !important;
  }
}

@media (max-width: 540px) {
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav)
  :is(.icon, .overview-nav-icon, .makon-nav-icon) {
    position: relative !important;
    overflow: hidden !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav)
  :is(.icon, .overview-nav-icon, .makon-nav-icon) > :is(.nav-icon-default, .nav-icon-active) {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
  }
}

/* ============================================================
   MAKON V48.2 — EXACT ACTIVE ICON IN PHONE BOTTOM NAV
   Prevent old overview markers/stacking rules from substituting a different
   glyph. Active Overview is always the supplied filled 2x2 catalog icon.
   ============================================================ */
@media (max-width: 540px) {
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav) .overview-nav-icon {
    position: relative !important;
    width: 28px !important;
    height: 28px !important;
    display: block !important;
    overflow: hidden !important;
  }
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav) .overview-nav-icon::before,
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav) .overview-nav-icon::after {
    content: none !important;
    display: none !important;
  }
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav) .overview-nav-icon > img {
    position: absolute !important;
    inset: 0 !important;
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    object-fit: contain !important;
  }
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav) a:not(.active) .overview-nav-icon > .nav-icon-default {
    display: block !important;
    opacity: 1 !important;
  }
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav) a:not(.active) .overview-nav-icon > .nav-icon-active {
    display: none !important;
    opacity: 0 !important;
  }
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav) a.active .overview-nav-icon > .nav-icon-default {
    display: none !important;
    opacity: 0 !important;
  }
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav) a.active .overview-nav-icon > .nav-icon-active {
    display: block !important;
    opacity: 1 !important;
    filter: brightness(0) saturate(100%) invert(44%) sepia(73%) saturate(1230%) hue-rotate(94deg) brightness(91%) contrast(89%) !important;
  }
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav) a.active {
    background: transparent !important;
    box-shadow: none !important;
  }
}


/* ============================================================
   MAKON V48.3 — PHONE ACTIVE OVERVIEW ICON: SHOW ALL 4 CELLS
   The older centering rule left translate(-50%,-50%) on an image later moved
   to inset:0; that clipped the 2x2 icon to one cell. Reset the transform.
   ============================================================ */
@media (max-width:540px) {
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav, .detail-mobile-nav)
  .overview-nav-icon > :is(.nav-icon-default,.nav-icon-active) {
    left:0 !important;
    top:0 !important;
    right:0 !important;
    bottom:0 !important;
    inset:0 !important;
    transform:none !important;
    margin:0 !important;
    width:28px !important;
    height:28px !important;
    max-width:28px !important;
    max-height:28px !important;
    object-fit:contain !important;
  }
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav, .detail-mobile-nav)
  .overview-nav-icon::before,
  :where(.events-mobile-nav, .makon-bottom-nav.events-mobile-nav, .detail-mobile-nav)
  .overview-nav-icon::after {
    content:none !important;
    display:none !important;
  }
}

/* ============================================================
   MAKON V48.4 — DESKTOP PUBLIC NAV NORMALIZATION
   Overview/sections/detail now use the exact compact icon sizing as Home.
   The desktop header previously displayed natural PNG dimensions because
   sizing existed only for Home/tablet breakpoints.
   ============================================================ */
@media (min-width: 1024px) {
  body:is(.overview-page,.afisha-page,.section-products-page,.sections-page,.events-page,.detail-page) .makon-tablet-header-nav {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: max-content !important;
    min-width: max-content !important;
    flex: 0 0 auto !important;
    padding: 4px 5px !important;
    overflow: hidden !important;
    border: 1px solid rgba(20,46,28,.08) !important;
    border-radius: 15px !important;
    background: rgba(245,249,242,.90) !important;
    box-shadow: none !important;
  }

  body:is(.overview-page,.afisha-page,.section-products-page,.sections-page,.events-page,.detail-page) .makon-tablet-header-nav > a {
    position: relative !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    min-height: 38px !important;
    display: grid !important;
    place-items: center !important;
    flex: 0 0 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
  }

  body:is(.overview-page,.afisha-page,.section-products-page,.sections-page,.events-page,.detail-page) .makon-tablet-header-nav .makon-nav-icon {
    position: relative !important;
    width: 23px !important;
    height: 23px !important;
    min-width: 23px !important;
    max-width: 23px !important;
    display: block !important;
    overflow: hidden !important;
  }

  body:is(.overview-page,.afisha-page,.section-products-page,.sections-page,.events-page,.detail-page) .makon-tablet-header-nav .makon-nav-icon > img,
  body:is(.overview-page,.afisha-page,.section-products-page,.sections-page,.events-page,.detail-page) .makon-tablet-header-nav > a > img {
    position: absolute !important;
    inset: 0 !important;
    width: 23px !important;
    height: 23px !important;
    min-width: 23px !important;
    max-width: 23px !important;
    max-height: 23px !important;
    object-fit: contain !important;
    transform: none !important;
  }

  body.dark:is(.overview-page,.afisha-page,.section-products-page,.sections-page,.events-page,.detail-page) .makon-tablet-header-nav,
  body.dark-theme:is(.overview-page,.afisha-page,.section-products-page,.sections-page,.events-page,.detail-page) .makon-tablet-header-nav {
    border-color: rgba(255,255,255,.08) !important;
    background: rgba(36,40,36,.94) !important;
  }
}

/* ============================================================
   MAKON V49 — PHONE BOTTOM NAV STABILITY
   One fixed geometry on every public page. Active state is communicated by
   the green icon only: no translucent green tile and no press-time movement.
   ============================================================ */
@media (max-width: 540px) {
  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: 0 !important;
    width: min(100%, 560px) !important;
    max-width: 560px !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border-radius: 20px 20px 0 0 !important;
    border-bottom: 0 !important;
    transform: translate3d(-50%, 0, 0) !important;
    translate: none !important;
    animation: none !important;
    transition: none !important;
    will-change: transform !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav) a {
    transform: none !important;
    translate: none !important;
    animation: none !important;
    transition: color .14s ease, filter .14s ease, opacity .14s ease !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav)
  a:is(.active, :hover, :focus, :focus-visible, :active) {
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    translate: none !important;
  }

  body.dark :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav)
  a:is(.active, :hover, :focus, :focus-visible, :active),
  body.dark-theme :where(.mobile-nav, .detail-mobile-nav, .events-mobile-nav, .makon-bottom-nav)
  a:is(.active, :hover, :focus, :focus-visible, :active) {
    background: transparent !important;
    box-shadow: none !important;
  }
}

/* ============================================================
   MAKON V50 — ONE PHONE BOTTOM NAV CONTRACT
   2026-08-27
   - identical geometry on Home / Detail / Overview / Events / User profile
   - active state = green icon only (NO green tile)
   - no press animation / transform / compositor jump
   - labels hidden on phones, icons occupy a fixed slot
   ============================================================ */
@media (max-width: 540px) {
  html body .makon-bottom-nav.makon-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: center !important;
    justify-items: stretch !important;
    gap: 0 !important;

    position: fixed !important;
    inset: auto 0 0 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    width: 100% !important;
    max-width: none !important;
    height: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(66px + env(safe-area-inset-bottom, 0px)) !important;

    margin: 0 !important;
    padding: 6px 10px max(6px, env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;

    border: 1px solid rgba(15, 23, 42, .08) !important;
    border-bottom: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 -6px 22px rgba(15, 23, 42, .08) !important;

    transform: none !important;
    translate: none !important;
    scale: none !important;
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    z-index: 12500 !important;
    overflow: hidden !important;
  }

  html body .makon-bottom-nav.makon-bottom-nav > a {
    display: grid !important;
    place-items: center !important;
    align-content: center !important;

    width: 100% !important;
    min-width: 0 !important;
    height: 54px !important;
    min-height: 54px !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;
    box-shadow: none !important;
    color: #6f7d91 !important;
    text-decoration: none !important;

    transform: none !important;
    translate: none !important;
    scale: none !important;
    animation: none !important;
    transition: none !important;

    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation;
    user-select: none;
  }

  /* No active/hover/focus/press tile. The icon itself is the state. */
  html body .makon-bottom-nav.makon-bottom-nav > a:is(.active, :hover, :focus, :focus-visible, :active) {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
  }

  /* Phone navigation is icon-only on every page. */
  html body .makon-bottom-nav.makon-bottom-nav > a > .label,
  html body .makon-bottom-nav.makon-bottom-nav > a > span:not(.icon):not(.overview-nav-icon) {
    display: none !important;
  }

  html body .makon-bottom-nav.makon-bottom-nav > a > :is(.icon, .overview-nav-icon) {
    position: relative !important;
    display: block !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    transform: none !important;
  }

  html body .makon-bottom-nav.makon-bottom-nav > a > :is(.icon, .overview-nav-icon) > img,
  html body .makon-bottom-nav.makon-bottom-nav > a > img {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;

    display: block !important;
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;

    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    transform: translate(-50%, -50%) !important;
    translate: none !important;
    scale: none !important;
    animation: none !important;
    transition: none !important;
  }

  /* Dual icon state: exact same 26×26 slot, so switching cannot move layout. */
  html body .makon-bottom-nav.makon-bottom-nav .nav-icon-default {
    display: block !important;
    opacity: 1 !important;
    filter: brightness(0) saturate(100%) invert(48%) sepia(12%) saturate(691%) hue-rotate(176deg) brightness(91%) contrast(87%) !important;
  }

  html body .makon-bottom-nav.makon-bottom-nav .nav-icon-active {
    display: none !important;
    opacity: 0 !important;
  }

  html body .makon-bottom-nav.makon-bottom-nav > a.active .nav-icon-default {
    display: none !important;
    opacity: 0 !important;
  }

  html body .makon-bottom-nav.makon-bottom-nav > a.active .nav-icon-active {
    display: block !important;
    opacity: 1 !important;
    filter: brightness(0) saturate(100%) invert(45%) sepia(85%) saturate(1566%) hue-rotate(96deg) brightness(93%) contrast(91%) !important;
  }

  /* Legacy one-image markup still follows the same grey/green contract. */
  html body .makon-bottom-nav.makon-bottom-nav > a > :is(.icon, .overview-nav-icon) > img:only-child {
    filter: brightness(0) saturate(100%) invert(48%) sepia(12%) saturate(691%) hue-rotate(176deg) brightness(91%) contrast(87%) !important;
  }

  html body .makon-bottom-nav.makon-bottom-nav > a.active > :is(.icon, .overview-nav-icon) > img:only-child {
    filter: brightness(0) saturate(100%) invert(45%) sepia(85%) saturate(1566%) hue-rotate(96deg) brightness(93%) contrast(91%) !important;
  }

  html body.dark .makon-bottom-nav.makon-bottom-nav,
  html body.dark-theme .makon-bottom-nav.makon-bottom-nav {
    background: rgba(24, 27, 24, .99) !important;
    border-color: rgba(255, 255, 255, .08) !important;
    box-shadow: 0 -6px 22px rgba(0, 0, 0, .20) !important;
  }

  html body.dark .makon-bottom-nav.makon-bottom-nav > a:is(.active, :hover, :focus, :focus-visible, :active),
  html body.dark-theme .makon-bottom-nav.makon-bottom-nav > a:is(.active, :hover, :focus, :focus-visible, :active) {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }
}


/* ============================================================
   MAKON V51 — FINAL PHONE NAV CONTRACT
   One filled icon per destination. The current destination is marked only
   by a soft green outline; icon source/size never changes on tap.
   ============================================================ */
@media (max-width:540px) {
  html body :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) > a {
    display:grid !important;
    place-items:center !important;
    background:transparent !important;
    box-shadow:none !important;
    transform:none !important;
    transition:none !important;
  }
  html body :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) > a > :is(.icon,.overview-nav-icon) {
    display:grid !important;
    place-items:center !important;
    width:42px !important;
    min-width:42px !important;
    height:42px !important;
    min-height:42px !important;
    box-sizing:border-box !important;
    border:1.5px solid transparent !important;
    border-radius:14px !important;
    background:transparent !important;
    box-shadow:none !important;
    overflow:hidden !important;
    transform:none !important;
    transition:none !important;
  }
  html body :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) .nav-icon-default {
    display:none !important;
    opacity:0 !important;
  }
  html body :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) .nav-icon-active,
  html body :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) .makon-nav-single-icon {
    position:static !important;
    inset:auto !important;
    display:block !important;
    width:26px !important;
    min-width:26px !important;
    max-width:26px !important;
    height:26px !important;
    min-height:26px !important;
    max-height:26px !important;
    margin:0 !important;
    opacity:1 !important;
    object-fit:contain !important;
    filter:none !important;
    transform:none !important;
    transition:none !important;
  }
  html body :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) > a.active,
  html body :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) > a:hover,
  html body :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) > a:focus-visible,
  html body :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) > a:active {
    background:transparent !important;
    box-shadow:none !important;
    transform:none !important;
  }
  html body :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) > a.active > :is(.icon,.overview-nav-icon) {
    border-color:rgba(24,158,62,.48) !important;
    background:rgba(52,199,89,.10) !important;
    box-shadow:0 0 0 3px rgba(52,199,89,.055) !important;
  }
  html body.dark :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) > a.active > :is(.icon,.overview-nav-icon),
  html body.dark-theme :is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav) > a.active > :is(.icon,.overview-nav-icon) {
    border-color:rgba(142,227,91,.58) !important;
    background:rgba(87,140,55,.20) !important;
  }
}


/* ============================================================
   MAKON V51.1 — PHONE NAV VISIBILITY + DETAIL HEADER ALIGNMENT
   2026-08-28
   - every phone destination always shows the filled icon
   - no default/active source switching, no layout jump
   - active destination = soft green outline only
   - high specificity intentionally neutralizes older V48/V50 switch rules
   ============================================================ */
@media (max-width: 540px) {
  html body :is(.mobile-nav.mobile-nav,
                .detail-mobile-nav.detail-mobile-nav,
                .events-mobile-nav.events-mobile-nav,
                .makon-bottom-nav.makon-bottom-nav)
  > a > :is(.icon.icon, .overview-nav-icon.overview-nav-icon) {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border: 1.5px solid transparent !important;
    border-radius: 14px !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
    transition: none !important;
    animation: none !important;
  }

  /* Never show the old outline/default image on phones. */
  html body :is(.mobile-nav.mobile-nav,
                .detail-mobile-nav.detail-mobile-nav,
                .events-mobile-nav.events-mobile-nav,
                .makon-bottom-nav.makon-bottom-nav)
  > a > :is(.icon.icon, .overview-nav-icon.overview-nav-icon)
  > img.nav-icon-default.nav-icon-default {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  /* The filled icon is permanently visible for ALL four destinations. */
  html body :is(.mobile-nav.mobile-nav,
                .detail-mobile-nav.detail-mobile-nav,
                .events-mobile-nav.events-mobile-nav,
                .makon-bottom-nav.makon-bottom-nav)
  > a > :is(.icon.icon, .overview-nav-icon.overview-nav-icon)
  > img.nav-icon-active.nav-icon-active,
  html body :is(.mobile-nav.mobile-nav,
                .detail-mobile-nav.detail-mobile-nav,
                .events-mobile-nav.events-mobile-nav,
                .makon-bottom-nav.makon-bottom-nav)
  > a > :is(.icon.icon, .overview-nav-icon.overview-nav-icon)
  > img.makon-nav-single-icon.makon-nav-single-icon {
    position: static !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: block !important;
    visibility: visible !important;
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    object-fit: contain !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
    transition: none !important;
    animation: none !important;
    filter: brightness(0) saturate(100%) invert(45%) sepia(85%) saturate(1566%) hue-rotate(96deg) brightness(93%) contrast(91%) !important;
  }

  /* Only the current page receives the translucent green frame. */
  html body :is(.mobile-nav.mobile-nav,
                .detail-mobile-nav.detail-mobile-nav,
                .events-mobile-nav.events-mobile-nav,
                .makon-bottom-nav.makon-bottom-nav)
  > a.active > :is(.icon.icon, .overview-nav-icon.overview-nav-icon) {
    border-color: rgba(24, 158, 62, .48) !important;
    background: rgba(52, 199, 89, .10) !important;
    box-shadow: 0 0 0 3px rgba(52, 199, 89, .055) !important;
  }

  html body :is(.mobile-nav.mobile-nav,
                .detail-mobile-nav.detail-mobile-nav,
                .events-mobile-nav.events-mobile-nav,
                .makon-bottom-nav.makon-bottom-nav)
  > a:not(.active) > :is(.icon.icon, .overview-nav-icon.overview-nav-icon) {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}


/* ============================================================
   MAKON V85 — ANDROID EDGE-TO-EDGE / SYSTEM SURFACE CONTRACT
   - no old splash progress line
   - public bottom dock bleeds behind the gesture area
   - light/dark surface follows the actual MAKON theme
   ============================================================ */

.makon-splash-progress {
  display: none !important;
}

/* Chrome 135+ exposes the bottom gesture area to viewport-fit=cover pages.
   The page/root canvas must always have an opaque surface. */
html,
body {
  min-height: 100%;
}

@supports (height: 100dvh) {
  body { min-height: 100dvh; }
}

html[data-makon-theme="dark"] {
  color-scheme: dark !important;
}

html[data-makon-theme="light"] {
  color-scheme: light !important;
}

/* Official Chrome edge-to-edge pattern: reserve the maximum safe area once,
   then move the fixed dock with the dynamic inset. This lets the dock's
   background extend behind Android's gesture handle without layout thrashing. */
@media (max-width: 540px) {
  :root {
    --makon-safe-bottom-max: env(safe-area-max-inset-bottom, 28px);
  }

  html body :is(.mobile-nav.mobile-nav,
                .detail-mobile-nav.detail-mobile-nav,
                .events-mobile-nav.events-mobile-nav,
                .makon-bottom-nav.makon-bottom-nav) {
    bottom: calc(env(safe-area-inset-bottom, 0px) - var(--makon-safe-bottom-max)) !important;
    height: calc(66px + var(--makon-safe-bottom-max)) !important;
    min-height: calc(66px + var(--makon-safe-bottom-max)) !important;
    padding: 6px 10px var(--makon-safe-bottom-max) !important;
    overflow: hidden !important;
  }

  html[data-makon-theme="light"] body
  :is(.mobile-nav.mobile-nav,
      .detail-mobile-nav.detail-mobile-nav,
      .events-mobile-nav.events-mobile-nav,
      .makon-bottom-nav.makon-bottom-nav) {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
  }

  html[data-makon-theme="dark"] body
  :is(.mobile-nav.mobile-nav,
      .detail-mobile-nav.detail-mobile-nav,
      .events-mobile-nav.events-mobile-nav,
      .makon-bottom-nav.makon-bottom-nav) {
    background: #141414 !important;
    background-color: #141414 !important;
  }

  body:has(:is(.mobile-nav,.detail-mobile-nav,.events-mobile-nav,.makon-bottom-nav)) {
    scroll-padding-bottom: calc(66px + var(--makon-safe-bottom-max)) !important;
  }
}
