/* The tour keeps its photographic stage; these rules size its controls to the viewport. */
.tour-app {
  height: 100vh;
  height: 100dvh;
}
.tour-app :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid #e2b33c;
  outline-offset: 3px;
}
.tour-brand, .tour-nav, .tour-search-input {
  background: rgba(255, 255, 255, .74) !important;
  border: 1px solid rgba(255, 255, 255, .48) !important;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.tour-search-input::placeholder { color: #294b34; opacity: 1; }
.tour-footer {
  background: rgba(248, 246, 238, .72) !important;
  border: 1px solid rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.tour-frame-meta > div { color: #203b29 !important; }
.tour-back, .tour-play { background: rgba(255, 255, 255, .78) !important; }
.tour-mobile-nav, .tour-zones-menu { display: none; }
.tour-search-results {
  background: rgba(255, 255, 255, .93) !important;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.tour-nav { scrollbar-width: none; }
.tour-nav::-webkit-scrollbar { display: none; }
.tour-nav > * { flex-shrink: 0; }
.tour-panel {
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-top: 110px;
  background: rgba(248, 246, 238, .91) !important;
  border: 1px solid rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.tour-tray-item, .tour-cart-item { background: rgba(255, 255, 255, .86) !important; }
.tour-panel :is(h2, p, span, label, button, a) { overflow-wrap: anywhere; }
.tour-panel-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(248, 246, 238, .94);
  border-radius: 20px 20px 0 0;
}
.tour-detail-closebar {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 0;
}
.tour-panel-backdrop { display: none; }
.tour-toast {
  max-width: calc(100vw - 28px);
  white-space: normal !important;
  overflow-wrap: anywhere;
  text-align: center;
}
.tour-back, .tour-forward { touch-action: none; user-select: none; }

@media (max-width: 760px), (max-height: 500px) {
  .tour-header {
    top: max(8px, env(safe-area-inset-top)) !important;
    left: max(8px, env(safe-area-inset-left)) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px !important;
    align-items: center !important;
  }
  .tour-identity, .tour-tools { display: contents !important; }
  .tour-brand {
    grid-column: 1;
    grid-row: 1;
    width: fit-content;
    max-width: 100%;
    height: 46px !important;
    padding: 1px 6px !important;
    border-radius: 12px !important;
  }
  .tour-brand img { height: 40px !important; }
  .tour-brand a { min-height: 44px; display: flex; align-items: center; }
  .tour-brand a:last-child {
    margin-left: 5px !important;
    padding: 10px 6px !important;
    font-size: 11px !important;
  }
  .tour-cart-button {
    grid-column: 2;
    grid-row: 1;
    height: 46px !important;
    gap: 6px !important;
    padding: 0 6px 0 12px !important;
    font-size: 13px !important;
  }
  .tour-nav { display: none !important; }
  .tour-mobile-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    padding: 2px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .48);
    background: rgba(255, 255, 255, .74);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .2);
  }
  .tour-mobile-nav :is(a, button) {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 8px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #0f3d22;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
  }
  .tour-mobile-nav button { background: rgba(15, 61, 34, .1); }
  .tour-mobile-nav button[aria-expanded="true"] { background: #0f3d22; color: #fff; }
  .tour-zones-menu {
    display: block;
    position: absolute;
    top: 105px;
    left: 0;
    right: 0;
    z-index: 12;
    max-height: calc(100vh - 130px);
    max-height: calc(100dvh - 130px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(248, 246, 238, .92);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .3);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
  .tour-zones-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(248, 246, 238, .94);
  }
  .tour-zones-head h2 { margin: 0; color: #0f3d22; font-size: 17px; }
  .tour-zones-head button {
    width: 44px;
    height: 44px;
    flex: none;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .86);
    color: #0f3d22;
    font-size: 24px;
  }
  .tour-zones-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
  .tour-zones-grid button {
    min-width: 0;
    min-height: 44px;
    padding: 10px 8px;
    border: 1px solid rgba(15, 61, 34, .24);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  .tour-search {
    grid-column: 1 / -1;
    grid-row: 3;
    min-width: 0;
    pointer-events: auto;
  }
  .tour-search-input {
    width: 100% !important;
    max-width: none !important;
    height: 44px !important;
    font-size: 16px !important;
    padding: 0 16px !important;
  }
  .tour-search-results {
    top: 50px !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(45vh, 320px) !important;
  }
  .tour-search-results button { min-height: 54px; }
  .tour-footer {
    left: max(8px, env(safe-area-inset-left)) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    transform: none !important;
    width: auto !important;
    max-width: 560px;
    margin-inline: auto;
    padding: 12px !important;
    border-radius: 18px !important;
    gap: 7px !important;
  }
  .tour-frame-meta { gap: 6px !important; }
  .tour-frame-meta > :first-child {
    font-size: 10px !important;
    letter-spacing: 1px !important;
  }
  .tour-frame-meta > :last-child { font-size: 11px !important; }
  .tour-frame-title { font-size: 25px !important; }
  .tour-progress { height: 16px !important; }
  .tour-controls {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 7px !important;
  }
  .tour-controls > button {
    min-width: 0;
    width: 100% !important;
    height: 44px !important;
    padding: 0 8px !important;
    font-size: 14px !important;
  }
  .tour-controls > .tour-plants { grid-column: 1 / -1; }
  .tour-panel-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 18;
    border: 0;
    background: rgba(6, 20, 11, .25);
  }
  .tour-panel {
    top: max(8px, env(safe-area-inset-top)) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    left: max(8px, env(safe-area-inset-left)) !important;
    width: auto !important;
    max-width: 520px;
    margin-inline: auto;
    touch-action: pan-y;
    scroll-padding-top: 120px;
  }
  .tour-panel-head { padding: 14px 16px 12px !important; }
  .tour-panel-head > div { min-width: 0; }
  .tour-panel-head h2 { font-size: 30px !important; }
  .tour-panel-head > button, .tour-close {
    width: 44px !important;
    height: 44px !important;
  }
  .tour-panel input, .tour-panel select, .tour-panel textarea { font-size: 16px !important; min-width: 0; width: 100%; }
  .tour-panel :is(button, a) { min-height: 44px; }
  .tour-tray-item > button:last-child { width: 44px !important; height: 44px !important; }
  .tour-detail-photo [role="img"] { height: 220px !important; }
  .tour-detail-body { padding: 18px 18px 22px !important; }
  .tour-detail-body h2 { font-size: 33px !important; }
  .tour-product-actions { flex-wrap: wrap; }
  .tour-add-button { flex: 1 1 140px !important; }
  .tour-cart-item {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px 10px !important;
    align-items: start !important;
  }
  .tour-cart-item > :first-child { width: 52px !important; height: 52px !important; }
  .tour-cart-quantity {
    grid-column: 2;
    justify-self: start;
    height: 44px !important;
  }
  .tour-cart-quantity > button { width: 44px !important; height: 42px !important; }
  .tour-cart-item > div:nth-child(2) > button { min-height: 44px; }
  .tour-share-actions { grid-template-columns: 1fr !important; }
  .tour-toast { top: auto !important; bottom: max(20px, env(safe-area-inset-bottom)) !important; z-index: 30 !important; border-radius: 16px !important; }
}

@media (max-width: 350px) {
  .tour-frame-title { font-size: 23px !important; }
  .tour-controls > button { font-size: 13px !important; }
}

@media (max-height: 500px) and (min-width: 561px) {
  .tour-header { grid-template-columns: auto minmax(160px, 1fr) auto; }
  .tour-search { grid-column: 2; grid-row: 1; }
  .tour-cart-button { grid-column: 3; }
  .tour-brand { height: 44px !important; }
  .tour-brand img { height: 38px !important; }
  .tour-mobile-nav { grid-row: 2; }
  .tour-zones-menu { top: 103px; }
  .tour-zones-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tour-footer { padding: 9px 12px !important; gap: 3px !important; }
  .tour-frame-title { font-size: 23px !important; }
  .tour-controls { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.1fr); }
  .tour-controls > .tour-plants { grid-column: auto; }
  .tour-detail-photo [role="img"] { height: 160px !important; }
  .tour-panel-head { padding-block: 10px !important; }
}
