/* Discovery stays beside its trigger; only selected details use a full panel. */
.government-drawer.discovery-menu{position:fixed;right:auto;bottom:auto;top:82px;width:310px;max-height:calc(100dvh - 84px);padding:14px;border:1px solid #9caa8c55;border-radius:16px;background:#fff9ecf5;color:#3b5249;box-shadow:0 12px 35px #273c3426;backdrop-filter:blur(12px);transform:translateX(-6px);transition:opacity .15s,visibility .15s,transform .15s;overflow:auto}
.government-drawer.discovery-menu.open{transform:none}
.discovery-menu .government-head{align-items:center;margin:0;gap:12px}
.discovery-menu .government-head h2{font-size:16px;margin:0;color:inherit}
.discovery-menu .government-close{color:inherit;min-width:32px;min-height:32px;font-size:20px}
.discovery-menu .discovery-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:10px}
.discovery-menu .discovery-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:82px;padding:9px 4px;text-align:center;border:1px solid transparent;border-radius:11px;background:#81976e0c;color:inherit;transition:background .15s,transform .15s}
.discovery-menu .discovery-choice b{font-size:25px;line-height:1;font-weight:400;color:#72895b}
.discovery-menu .discovery-choice strong{font-size:11px;line-height:1.25;font-weight:500}
.discovery-menu .discovery-choice:hover,.discovery-menu .discovery-choice:focus-visible{background:#b4c59135;border-color:#9aaa71;outline:0;transform:translateY(-2px)}
.discovery-menu .discovery-caption{min-height:32px;margin:12px 2px 0;font-size:11px;line-height:1.4;color:#728074}
@media(max-width:450px){.discovery-menu .discovery-choices{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.government-drawer.discovery-menu,.discovery-menu .discovery-choice{transition:none}}

/* Every depth shares the discovery origin instead of crossing the map. */
@media(min-width:701px){
 #app .government-drawer:not(.discovery-menu),#app .people-drawer,#app .today-drawer,#app .business-tools.hud-business{position:fixed;left:var(--discovery-left,108px);top:var(--discovery-top,80px);right:auto;bottom:auto;width:310px;max-height:calc(100dvh - var(--discovery-top,80px) - 12px);box-sizing:border-box;padding:14px;border:1px solid #9caa8c55;border-radius:16px;box-shadow:0 12px 35px #273c3426;overflow:auto;overscroll-behavior:contain;transform:translateX(-6px);transition:opacity .15s,visibility .15s,transform .15s;z-index:10}
 #app .government-drawer.open,#app .people-drawer.open,#app .today-drawer.open,#app .business-tools.hud-business.open{transform:none}
 body.hud-detail-open #app #map{right:0}
 body.hud-detail-open #app .hud-search{width:min(430px,calc(100vw - 160px))}
 #app .discovery-back{display:block;margin:0 0 8px;padding:5px 0;min-height:32px}
 #app .government-head h2,#app .hud-business h2{font-size:20px}
 html[data-theme=day] #app .government-drawer:not(.discovery-menu),html[data-theme=day] #app .people-drawer,html[data-theme=day] #app .today-drawer,html[data-theme=day] #app .business-tools.hud-business{background:#fff9ecfa;color:#3b5249}
 html[data-theme=day] #app .government-drawer :is(p,h2,h3,strong,button,a,small),html[data-theme=day] #app .people-drawer :is(p,h2,h3,strong,button,a,small),html[data-theme=day] #app .today-drawer :is(p,h2,h3,strong,button,a,small),html[data-theme=day] #app .hud-business :is(p,h2,h3,strong,button,a,small){color:inherit}
}

/* The discovery tray uses a light surface in both map themes. */
html #app #discovery-tray{color:#171c19;--ink:#171c19;--mint:#415c40;--gold:#745627}
html #app #discovery-tray :is(h2,strong,span,p,button){color:#171c19}
html #app #discovery-tray .discovery-choice b{color:#415c40}

/* Find uses the shared place search, with its active rail button as Close. */
html body #app #discovery-tray .find-menu-search{display:flex;align-items:center;gap:4px;padding:6px 8px;border:1px solid var(--map-border,#b4c2b5);border-radius:16px;background:var(--map-surface,#fffdf6);box-sizing:border-box;width:100%;margin:0 0 6px}
html body #app #discovery-tray .find-menu-search input{flex:1;min-width:0;width:0;border:0;outline:none;background:transparent;color:var(--map-ink,#254b43);font:inherit;font-size:16px;padding:10px 8px}
html body #app #discovery-tray .find-menu-search button{flex:0 0 44px;min-height:44px;border:0;border-radius:12px;background:transparent;color:var(--map-ink,#254b43);font-size:24px;cursor:pointer}
html body #app #discovery-tray .find-menu-search:focus-within{outline:2px solid #658979;outline-offset:2px}
