#phone-search-action,#phone-search-close,.phone-nav-icon{display:none}
#phone-map-guide{position:fixed;inset:var(--jb-header,56px) 0 0;z-index:5;pointer-events:none;align-items:center;justify-content:center;text-align:center;color:#45483f;font-family:var(--jb-copy,Arial,sans-serif)}
#phone-map-guide:not([hidden]){display:flex}
.phone-map-guidance{padding:22px 28px;border-radius:18px;background:#fafafaeb;max-width:270px}
.phone-map-guidance>svg{display:block;width:48px;height:48px;margin:0 auto 14px;color:#65695e;animation:phone-tap-hint 1.8s ease-in-out infinite}
.phone-map-guidance strong{display:block;font-size:17px;font-weight:400;margin-bottom:8px}
.phone-map-guidance p{font-size:12px;line-height:1.7;margin:0;color:#73766c}
@keyframes phone-tap-hint{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@media(max-width:899px),(hover:none),(any-pointer:coarse),(orientation:landscape) and (max-height:540px){
 #main-nav #phone-search-action{display:flex;align-items:center;gap:10px;min-height:48px;border-bottom:1px solid #e7e8e2;margin-bottom:4px}
 #main-nav .phone-nav-icon{display:inline-block;flex:none;width:18px;height:18px;vertical-align:-3px;margin-right:7px}
 #phone-search-action .phone-nav-icon{margin-right:0}
 body.touch-layout.search-open .search-wrap{display:block!important;position:fixed;top:calc(var(--jb-header,56px) + 14px + env(safe-area-inset-top));left:16px;right:16px;width:auto;max-width:520px;margin-left:auto;margin-right:auto;padding:12px;background:#fafafa;border:1px solid #e1e3dc;border-radius:14px;box-shadow:0 8px 28px #0000000c;z-index:12}
 body.touch-layout.search-open .search-box{border:0;border-radius:999px;background:#f0f1ed;padding:10px 44px 10px 16px;min-height:48px;box-shadow:none}
 body.touch-layout.search-open #search{font-size:16px}
 body.touch-layout.search-open #phone-search-close{display:grid;place-items:center;position:absolute;right:17px;top:16px;width:40px;height:40px;padding:10px;color:#62665b;border-radius:50%;background:transparent}
 body.touch-layout.search-open #search-clear{right:59px}
 body.phone-map-guided #viewport{filter:blur(1.3px)}
}
@media(prefers-reduced-motion:reduce){.phone-map-guidance>svg{animation:none}}

.touch-layout #phone-intro-guide{display:none!important}
.phone-map-guidance{padding:18px 22px;background:#fafafac9;border-radius:24px}
.phone-map-guidance>svg{width:56px;height:56px;margin:0 auto}
.phone-map-guidance>svg.phone-drag-hint{width:48px;height:24px;margin-top:12px;animation:none;opacity:.65}
.phone-map-guidance .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

@media(max-width:899px),(hover:none),(any-pointer:coarse){
 #main-nav #phone-search-action{white-space:nowrap}
 body.touch-layout.search-open .search-box{padding:10px 82px 10px 48px}
 body.touch-layout.search-open #search-toggle{display:flex!important;left:18px;top:14px;width:44px;height:44px;pointer-events:none}
 body.touch-layout.search-open #search-clear{top:14px}
 body.touch-layout.search-open #results{position:static;top:auto;left:auto;width:100%;box-sizing:border-box;margin:8px 0 0;max-height:45dvh;box-shadow:none}
}
@media(max-width:899px),(hover:none),(any-pointer:coarse){
 body.touch-layout.search-open #search-clear{display:none!important}
 body.touch-layout.search-open .search-box{padding-right:44px}
}

/* Refresh-scoped guidance on mouse and touch devices. */
body.phone-map-guided #viewport{filter:blur(1.3px)}
.phone-map-guidance{padding:20px;background:#fafafabf;border:1px solid #e2e4de80;border-radius:50%;width:88px;height:88px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;backdrop-filter:blur(4px)}
.phone-map-guidance>svg{width:38px;height:38px;flex-shrink:0;color:#73766c}
.phone-map-guidance>svg.phone-drag-hint{width:30px;height:14px;margin-top:3px}

/* Keep short instructions readable alongside the gesture icon. */
.phone-map-guidance{width:auto;height:auto;max-width:300px;padding:22px 26px;border-radius:20px}
.phone-map-guidance strong{font-size:15px;line-height:1.5;font-weight:400;margin:12px 0 5px;white-space:nowrap}
.phone-map-guidance p{font-size:11px;line-height:1.6;white-space:nowrap}
.phone-map-guidance>svg.phone-drag-hint{margin-top:12px}

@media(max-width:899px),(hover:none),(any-pointer:coarse){
 #main-nav #phone-search-action{border-bottom:0;border-top:1px solid #e7e8e2;margin:4px 0 0;padding-top:18px}
 body.touch-layout.search-open .search-wrap{padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;max-width:360px;animation:phone-search-reveal .46s cubic-bezier(.16,1,.3,1) both;transform-origin:24px 24px}
 body.touch-layout.search-open .search-box{height:48px;min-height:48px;padding:0 48px;border:1px solid #e5e5e5;border-radius:24px;background:#f2f2f2f2;box-shadow:none}
 body.touch-layout.search-open #search-toggle{left:2px;top:2px}
 body.touch-layout.search-open #phone-search-close{right:4px;top:4px}
 body.touch-layout.search-open #search{animation:phone-search-copy .38s .07s cubic-bezier(.16,1,.3,1) both}
 body.touch-layout.search-open #results{background:#fafafa;animation:phone-search-copy .32s cubic-bezier(.16,1,.3,1) both}
}
@keyframes phone-search-reveal{from{opacity:0;clip-path:inset(0 calc(100% - 48px) 0 0 round 24px);transform:translateY(-6px)}to{opacity:1;clip-path:inset(0 0 0 0 round 0);transform:translateY(0)}}
@keyframes phone-search-copy{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){body.touch-layout.search-open .search-wrap,body.touch-layout.search-open #search,body.touch-layout.search-open #results{animation:none}}

body:has(#main-nav.menu-open) .phone-intro,body:has(#main-nav.menu-open) .home-summary,body:has(#main-nav.menu-open) .phone-intro-guide{opacity:0!important;pointer-events:none!important;transition:opacity .2s ease-out}

/* Menu must fully conceal homepage copy, including during entrance animations. */
body:has(#menu-toggle[aria-expanded="true"]) :is(#phone-intro,#home-summary,#phone-intro-guide),
body:has(#main-nav.menu-open) :is(#phone-intro,#home-summary,#phone-intro-guide){visibility:hidden!important;opacity:0!important;pointer-events:none!important}

/* Unboxed static gesture guidance, scaled to the homepage description. */
.phone-map-guidance{padding:0;border:0;border-radius:0;background:transparent;backdrop-filter:none;box-shadow:none;max-width:calc(100vw - 48px)}
.phone-map-guidance>svg{width:30px;height:30px;margin:0 auto 14px;animation:none;transform:none;color:#62645c}
.phone-map-guidance strong{font-family:var(--jb-copy,Arial,sans-serif);font-size:calc(var(--guide-copy-size,12px) + 4px);font-weight:400;line-height:1.65;margin:0 0 3px;color:#62645c}
.phone-map-guidance p{font-family:var(--jb-copy,Arial,sans-serif);font-size:var(--guide-copy-size,12px);font-weight:400;line-height:1.65;margin:0;color:#62645c}

@media(max-width:899px),(hover:none),(any-pointer:coarse){
 body.touch-layout.search-open .search-box{border:1px solid #d9d9d3;background:#fff;box-shadow:0 4px 16px #00000005}
}

/* Keep controls aligned with the app's compact layout on narrow/short mouse screens. */
@media(min-width:761px) and (hover:hover) and (pointer:fine){
 body.touch-layout #menu-toggle{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:44px;height:44px;margin-left:auto;padding:10px}
 body.touch-layout header #main-nav{display:none;position:absolute;top:var(--jb-header,56px);right:16px;left:auto;width:180px;max-width:calc(100vw - 32px);padding:12px;background:#fafafa;border:1px solid #e5e5e1;border-radius:8px;box-shadow:0 12px 36px #0001;flex-direction:column;align-items:stretch;gap:0}
 body.touch-layout header #main-nav.menu-open{display:flex}
 body.touch-layout header #main-nav>button,body.touch-layout header #main-nav>a{text-align:left;min-height:44px;padding:10px 14px;font-size:16px}
 body.touch-layout #main-nav #phone-search-action{display:flex}
 body.touch-layout:not(.search-open) .search-wrap{display:none!important}
}
