.niche-map { --map-rule: #ddd; --map-ink: #191919; --map-panel: #fff; color: var(--map-ink); }
.niche-map .map-brand { display: inline-block; font-size: 1rem; line-height: 1.15; font-weight: 700; letter-spacing: -.035em; }
.map-landing { min-height: min(44rem,78svh); display: grid; align-content: center; justify-items: center; }
.map-landing section, .map-missing { width: min(100%,47rem); text-align: center; }
.map-landing h1, .map-missing h1 { margin: 1rem auto 2rem; max-width: 14ch; font-size: clamp(2.8rem,6vw,5rem); font-weight: 500; line-height: 1; letter-spacing: -.065em; text-wrap: balance; overflow-wrap: anywhere; }
.map-landing h2 { margin: 1.5rem 0 .8rem; font-size: 1.05rem; font-weight: 550; }
.map-search { display: flex; align-items: center; gap: .5rem; width: min(100%,33rem); margin: 0 auto; padding: .32rem .38rem .32rem 1rem; border: 1px solid #cdcdcd; border-radius: 3rem; background: white; }
.map-search:focus-within { border-color: #555; }
.map-search input { display: block; width: 100%; min-width: 0; padding: .45rem 0; color: #171717; border: 0; outline: none; background: transparent; }
.map-search button, .map-close { display: grid; place-content: center; width: 2.2rem; height: 2.2rem; flex: none; border-radius: 50%; border: 0; background: #171717; color: #fff; font-size: 1.25rem; }
.map-examples { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; max-width: 35rem; margin: 1rem auto 0; }
.map-examples a, .map-refinements button { padding: .4rem .7rem; border: 1px solid var(--map-rule); border-radius: 2rem; font-size: .8rem; background: white; }
.map-examples a:hover, .map-ideas a:hover, .map-refinements button:hover { background: #f1f1f1; }
.map-missing { margin: 2rem auto; }
.map-missing p { margin: 1rem 0; color: #5e5e5e; line-height: 1.5; }
.map-missing .map-search { margin-top: 1.5rem; }
.map-workspace { position: relative; }
.map-toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.map-toolbar .map-search { margin: 0; flex: 1; }
.map-text-link { font-size: .83rem; font-weight: 550; text-decoration: underline; text-underline-offset: .18em; }
.map-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(12rem,17rem); border: 1px solid var(--map-rule); border-radius: 1rem; background: white; overflow: hidden; }
.map-canvas, .map-ideas { height: min(48rem,75svh); min-height: 25rem; overflow: auto; }
.map-canvas { background-color: #fafafa; background-image: radial-gradient(#dbdbdb 1px,transparent 1px); background-size: 17px 17px; }
.map-tree { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: clamp(1.4rem,4vw,4rem); align-items: start; min-height: 100%; min-width: min(31rem,100%); padding: 1.5rem clamp(.55rem,2vw,2rem); }
.map-center { position: relative; align-self: start; margin-top: 15.75rem; max-width: 10rem; padding: .85rem .9rem; border-radius: .75rem; background: #181818; color: #fff; font-size: 1.12rem; font-weight: 600; text-align: center; overflow-wrap: anywhere; }
.map-center::after { content: ""; position: absolute; width: clamp(.7rem,2vw,2rem); height: 1px; left: 100%; top: 50%; background: #aaa; }
.map-branch { position: relative; min-height: 3.5rem; display: flex; align-items: center; }
.map-branch::before { content: ""; position: absolute; top: 0; bottom: 0; width: clamp(.7rem,2vw,2rem); right: 100%; border-left: 1px solid #aaa; }
.map-branch::after { content: ""; position: absolute; width: clamp(.7rem,2vw,2rem); right: 100%; top: 50%; border-top: 1px solid #aaa; }
.map-branch:first-child::before { top: 50%; }
.map-branch:last-child::before { bottom: 50%; }
.map-branch button, .map-ideas a { display: flex; align-items: center; justify-content: space-between; gap: .65rem; border: 1px solid #d7d7d7; border-radius: .6rem; background: white; min-width: 0; min-height: 2.5rem; padding: .5rem .65rem; font-size: .82rem; text-align: left; }
.map-branch button { width: min(100%,15rem); }
.map-branch button:hover, .map-branch button[aria-pressed=true] { border-color: #777; }
.map-branch button[aria-pressed=true] { box-shadow: 0 0 0 1px #222; }
.map-branch small, .map-ideas small { color: #707070; font-size: .72rem; }
.map-branch .map-more { border-style: dashed; justify-content: center; }
.map-ideas { padding: 1rem; border-left: 1px solid var(--map-rule); }
.map-ideas h2 { margin: 0 0 .8rem; font-size: 1rem; }
.map-ideas a { margin: .4rem 0; }
.map-capture, .map-listing-count, .map-pane-note { margin: .8rem 0; color: #666; font-size: .78rem; }
.map-local-source { margin:0 0 .75rem; color:#555; font-size:.875rem; }
.map-local .map-center { margin-top:0; align-self:center; }
.map-local .map-tree { align-content:start; }
.map-local-product { display:flex; gap:.55rem; align-items:center; width:min(100%,17rem); min-width:0; padding:.38rem .6rem; border:1px solid #d7d7d7; border-radius:.6rem; background:white; font-size:.85rem; }
.map-local-product img { flex:none; width:2.45rem; height:2.45rem; object-fit:cover; border-radius:.3rem; }
.map-local-product span { overflow-wrap:anywhere; }
.map-local-product:hover { border-color:#888; }
.map-local .map-local-discover { margin-top:1.2rem; text-decoration:underline; }
.map-drawer { position: absolute; z-index: 3; top: 0; bottom: 0; right: 0; width: min(30rem,100%); overflow-y: auto; padding: 1rem; border: 1px solid var(--map-rule); border-radius: 1rem; box-shadow: -8px 4px 25px #0001; background: white; }
.map-drawer-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.map-drawer-head h2 { margin: .15rem 0; font-size: 1.25rem; }
.map-drawer-head small { color: #666; }
.map-close { background: #f2f2f2; color: #333; }
.map-orders { display: inline-flex; margin: 1rem 0 .8rem; padding: .2rem; background: #f2f2f2; border-radius: 1.4rem; }
.map-orders button { padding: .35rem .8rem; background: transparent; border: 0; border-radius: 1.2rem; font-weight: 550; font-size: .85rem; }
.map-orders [aria-pressed=true] { background: white; box-shadow: 0 1px 4px #0002; }
.map-refinements, .map-pane-source { display: flex; flex-wrap: wrap; gap: .4rem; }
.map-refinements [aria-pressed=true] { background: #161616; color: white; }
.map-listings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem .65rem; }
.map-listing { min-width: 0; }
.map-listing-photo { width: 100%; aspect-ratio: 1; overflow: hidden; background: #f5f5f5; border-radius: .65rem; }
.map-listing-photo img { height: 100%; width: 100%; object-fit: cover; }
.map-listing h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: .45rem 0 .25rem; font-size: .82rem; font-weight: 550; line-height: 1.35; }
.map-listing p { font-size: .84rem; }
.map-listing del, .map-listing small { font-size: .72rem; color: #666; }
.map-pane-source { gap: 1rem; margin: 1rem 0 0; }
@media(max-width: 48rem) {
  .map-layout { grid-template-columns: 1fr; }
  .map-canvas { height: 56svh; min-height: 18rem; }
  .map-ideas { height: auto; min-height: 0; border: 0; border-top: 1px solid var(--map-rule); }
  .map-ideas a { display: inline-flex; margin: .2rem .3rem .2rem 0; min-height: 2rem; }
  .map-center { max-width: 7rem; font-size: .9rem; padding: .6rem; }
  .map-toolbar { flex-wrap: wrap; gap: .5rem; }
  .map-toolbar .map-brand { flex: 1; }
  .map-toolbar .map-search { order: 1; flex-basis: 100%; max-width: none; }
  .map-drawer { position: fixed; inset: auto 0 0; width: 100%; max-height: 80svh; border-radius: 1rem 1rem 0 0; z-index: 11; }
}
