/* Shared "Na skroty" panel for mobile portrait and landscape only. */
.mobile-quick-nav {
  display: none;
}

@media (max-width: 767px), (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-width: 1199px) {
  .mobile-quick-nav {
    position: relative;
    z-index: 1200;
    display: block;
  }

  body.mobile-quick-nav-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .mobile-quick-nav__fab,
  .mobile-quick-nav__top {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    display: grid;
    place-items: center;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: #d85c35;
    background: rgba(255, 248, 244, 0.9);
    border: 1px solid rgba(216, 92, 53, 0.3);
    border-radius: 50%;
    box-shadow: 0 12px 32px rgba(94, 48, 32, 0.17);
    cursor: pointer;
    touch-action: manipulation;
  }

  .mobile-quick-nav__fab {
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 1203;
    width: 54px;
    height: 54px;
  }

  .mobile-quick-nav__top {
    right: calc(max(16px, env(safe-area-inset-right)) + 5px);
    bottom: calc(max(18px, env(safe-area-inset-bottom)) + 66px);
    z-index: 1202;
    width: 44px;
    height: 44px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
  }

  .mobile-quick-nav__top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-quick-nav__fab svg,
  .mobile-quick-nav__top svg,
  .mobile-quick-nav__close svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-quick-nav__backdrop {
    position: fixed;
    inset: 0;
    z-index: 1204;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: rgba(48, 31, 25, 0.2);
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: opacity 300ms ease, visibility 300ms;
  }

  .mobile-quick-nav__sheet {
    position: fixed;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 1205;
    max-height: min(74dvh, 610px);
    box-sizing: border-box;
    padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    color: #272321;
    background: rgba(255, 249, 246, 0.97);
    border: 1px solid rgba(216, 92, 53, 0.18);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(70, 39, 29, 0.24);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(calc(100% + 24px));
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), opacity 250ms ease, visibility 300ms;
    overscroll-behavior: contain;
  }

  .mobile-quick-nav.is-open .mobile-quick-nav__backdrop,
  .mobile-quick-nav.is-open .mobile-quick-nav__sheet {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-quick-nav.is-open .mobile-quick-nav__sheet {
    transform: translateY(0);
  }

  .mobile-quick-nav__handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 10px;
    background: rgba(87, 70, 63, 0.22);
    border-radius: 4px;
  }

  .mobile-quick-nav__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    margin-bottom: 6px;
  }

  .mobile-quick-nav__heading h2 {
    margin: 0;
    color: #272321;
    font-family: var(--serif, Georgia, serif);
    font-size: 1.45rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
  }

  .mobile-quick-nav__close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    color: #6b554d;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
  }

  .mobile-quick-nav__links {
    display: grid;
    gap: 3px;
  }

  .mobile-quick-nav__links a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    color: #332b28;
    border-radius: 8px;
    font-family: var(--sans, Arial, sans-serif);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    letter-spacing: 0;
    text-transform: none;
  }

  .mobile-quick-nav__links a::before {
    content: "";
    flex: 0 0 3px;
    width: 3px;
    height: 18px;
    margin-right: 11px;
    background: #d85c35;
    border-radius: 3px;
    opacity: 0;
    transform: scaleY(0.4);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .mobile-quick-nav__links a.is-active {
    color: #bd4927;
    background: rgba(224, 102, 61, 0.09);
  }

  .mobile-quick-nav__links a.is-active::before {
    opacity: 1;
    transform: scaleY(1);
  }
}

@media (min-width: 768px) and (hover: hover), (min-width: 1200px) {
  .mobile-quick-nav {
    display: none !important;
  }
}

/* Hide shortcuts whenever the shared full-screen navigation is open. */
@media (max-width: 840px),
       (min-width: 841px) and (max-width: 1199px) and (hover: none) and (pointer: coarse) and (orientation: landscape) {
  body.mobile-menu-open .mobile-quick-nav {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
