/* Mobile page picker: keep the logo and search, replace the top page strip. */
.app-shell .ym-mobile-page-menu-toggle,
.app-shell .ym-mobile-rolodex-overlay { display: none; }

@media (max-width: 760px) {
  html.ym-mobile-rolodex-ready .app-shell #primary-navigation {
    display: none !important;
  }
  .app-shell .sidebar {
    padding-bottom: 8px !important;
  }

  .app-shell .ym-mobile-bottom-dock {
    gap: 12px;
    padding-left: 18px;
    padding-right: 100px;
  }
  .app-shell .ym-mobile-bottom-dock .ym-mobile-page-menu-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(233, 110, 139, .24);
    border-radius: 18px;
    background: rgba(255, 255, 255, .8);
    box-shadow: 0 5px 16px rgba(123, 63, 81, .085);
    color: #c32b66;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    transition: background .18s ease, transform .2s ease, box-shadow .2s ease;
  }
  .app-shell .ym-mobile-page-menu-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
  }
  .app-shell .ym-mobile-page-menu-toggle:active { transform: scale(.94); }
  .app-shell .ym-mobile-page-menu-toggle:focus-visible {
    outline: 3px solid #ed3c76;
    outline-offset: 3px;
  }
  body.ym-mobile-rolodex-open .app-shell .ym-mobile-page-menu-toggle {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #ef3f78, #ff9261);
    box-shadow: 0 9px 22px rgba(239, 63, 120, .23);
  }
  .app-shell .ym-mobile-bottom-dock-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(16px, calc(5.4vw - 3px), 22px);
  }

  body.ym-mobile-rolodex-open { overflow: hidden !important; }
  body.ym-mobile-rolodex-open #ym-mobile-feedback-widget {
    visibility: hidden !important;
    pointer-events: none !important;
  }
  .app-shell .ym-mobile-rolodex-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10005;
    pointer-events: none;
  }
  .app-shell .ym-mobile-rolodex-overlay[hidden] { display: none !important; }
  .app-shell .ym-mobile-rolodex-backdrop {
    position: absolute;
    inset: 0 0 calc(85px + env(safe-area-inset-bottom)) 0;
    background: rgba(31, 41, 64, .38);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    pointer-events: auto;
  }
  .app-shell .ym-mobile-rolodex-panel {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(85px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: min(62dvh, 570px);
    max-height: calc(100dvh - 122px - env(safe-area-inset-bottom));
    min-height: 280px;
    overflow: hidden;
    border: 1px solid rgba(239, 63, 120, .16);
    border-radius: 32px 32px 22px 22px;
    background: linear-gradient(150deg, #fffaf6 0%, #fff0e6 53%, #ffe7df 100%);
    box-shadow: 0 -10px 55px rgba(65, 38, 58, .22), inset 0 1px rgba(255, 255, 255, .92);
    pointer-events: auto;
    isolation: isolate;
  }
  .app-shell .ym-mobile-rolodex-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 110px;
    background: radial-gradient(ellipse at 80% 0%, rgba(255, 166, 114, .18), transparent 74%);
    z-index: -1;
    pointer-events: none;
  }
  .app-shell .ym-mobile-rolodex-grip {
    flex: 0 0 auto;
    width: 48px;
    height: 5px;
    margin: 12px auto 7px;
    border-radius: 999px;
    background: #e9bdba;
    cursor: grab;
    touch-action: none;
  }
  .app-shell .ym-mobile-rolodex-viewport {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scroll-snap-type: y proximity;
    scrollbar-width: none;
    perspective: 850px;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  }
  .app-shell .ym-mobile-rolodex-viewport::-webkit-scrollbar { display: none; }
  .app-shell .ym-mobile-rolodex-wheel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--ym-rolodex-edge-pad, 110px) 18px;
    transform-style: preserve-3d;
  }
  .app-shell .ym-mobile-rolodex-item {
    display: flex;
    align-items: center;
    flex: 0 0 70px;
    gap: 13px;
    width: 100%;
    min-height: 70px;
    padding: 9px 16px;
    border: 1px solid rgba(229, 193, 192, .7);
    border-radius: 19px;
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 5px 16px rgba(90, 50, 74, .055);
    color: #485475;
    text-align: left;
    font-family: Montserrat, sans-serif;
    cursor: pointer;
    scroll-snap-align: center;
    -webkit-tap-highlight-color: transparent;
    backface-visibility: hidden;
    transform: rotateX(var(--ym-roller-angle, 0deg)) scale(var(--ym-roller-scale, 1));
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
    will-change: transform;
  }
  .app-shell .ym-mobile-rolodex-item.is-wheel-center:not(.is-current) {
    border-color: rgba(239, 63, 120, .5);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 9px 25px rgba(120, 61, 86, .11);
  }
  .app-shell .ym-mobile-rolodex-item.is-current {
    border-color: transparent;
    background: linear-gradient(105deg, #ef3f78, #ff825c 76%, #ffa365);
    box-shadow: 0 10px 26px rgba(239, 63, 120, .2);
    color: #fff;
  }
  .app-shell .ym-mobile-rolodex-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(239, 63, 120, .08);
    color: #d23b70;
  }
  .app-shell .ym-mobile-rolodex-item.is-current .ym-mobile-rolodex-icon {
    background: rgba(255, 255, 255, .18);
    color: #fff;
  }
  .app-shell .ym-mobile-rolodex-icon .nav-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    min-width: 0;
    padding: 0;
    margin: 0;
    color: inherit;
    background: none;
  }
  .app-shell .ym-mobile-rolodex-icon .nav-icon-svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .app-shell .ym-mobile-rolodex-icon .nav-emoji { font-size: 23px; }
  .app-shell .ym-mobile-rolodex-item-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 700;
    line-height: 1.25;
  }
  .app-shell .ym-mobile-rolodex-item-arrow {
    flex: 0 0 22px;
    color: #dc7494;
    text-align: center;
    font: 700 23px/1 Fredoka, sans-serif;
  }
  .app-shell .ym-mobile-rolodex-item.is-current .ym-mobile-rolodex-item-arrow { color: #fff; }
  .app-shell .ym-mobile-rolodex-item:focus-visible {
    outline: 3px solid #c62c67;
    outline-offset: 2px;
  }

  body.ym-mobile-rolodex-open .app-shell .ym-mobile-rolodex-panel {
    animation: ym-mobile-rolodex-boom .46s cubic-bezier(.18, 1.14, .26, 1) both;
  }
  body.ym-mobile-rolodex-open .app-shell .ym-mobile-rolodex-backdrop {
    animation: ym-mobile-rolodex-dim .24s ease-out both;
  }
  @keyframes ym-mobile-rolodex-boom {
    from { opacity: 0; transform: translateY(55px) scale(.91); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes ym-mobile-rolodex-dim {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .app-shell .ym-mobile-rolodex-panel,
  .app-shell .ym-mobile-rolodex-backdrop,
  .app-shell .ym-mobile-page-menu-toggle,
  .app-shell .ym-mobile-rolodex-item {
    animation: none !important;
    transition: none !important;
  }
}
