/* Review-only shared toolbar layout; changes stay local until approved.
   All ordinary material rails share a 12px safe-area baseline. */
:root{--ttt-toolbar-bottom:calc(12px + env(safe-area-inset-bottom));--ttt-tool-width:64px;--ttt-tool-height:72px;--ttt-tool-icon-width:38px;--ttt-tool-icon-height:32px}
body.inside #roomToolRail{bottom:var(--ttt-toolbar-bottom)!important;max-width:calc(100vw - 24px);gap:6px}
body.inside #tools.material-tray:not(.has-reset-dock){bottom:var(--ttt-toolbar-bottom)!important}
body.inside #tools.material-tray{
 background:transparent!important;border:0!important;border-radius:0!important;
 box-shadow:none!important;backdrop-filter:none!important;min-height:var(--ttt-tool-height);
 align-items:center;gap:6px!important;
}
body.inside #tools.material-tray .material-tool:not(.swatch),
body.inside #roomResetDock button{
 min-width:var(--ttt-tool-width)!important;max-width:var(--ttt-tool-width)!important;
 min-height:var(--ttt-tool-height)!important;height:var(--ttt-tool-height)!important;
 padding:4px!important;border:0!important;border-radius:0!important;
 background:transparent!important;box-shadow:none!important;
 flex-shrink:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;
}
body.inside #tools.material-tray .material-tool:not(.swatch)>svg,
body.inside #roomResetDock button>svg{
 width:var(--ttt-tool-icon-width)!important;height:var(--ttt-tool-icon-height)!important;
 flex:0 0 var(--ttt-tool-icon-height)!important;overflow:visible;
}
body.inside #tools.material-tray .tool-caption,
body.inside #roomResetDock .tool-caption{
 font:12px/1.25 var(--font-tools,system-ui)!important;
 text-align:center;max-width:var(--ttt-tool-width);margin:0!important;
}
body.inside #roomToolRail #roomResetDock{width:var(--ttt-tool-width)!important;flex-basis:var(--ttt-tool-width)!important}
body.inside #roomToolRail #tools.material-tray.has-reset-dock{
 max-width:calc(100vw - 24px - var(--ttt-tool-width) - 6px)!important;
}
/* A small menu/size slider has a different function; keep its width and native interaction. */
body.inside #tools.material-tray.water-bead-tools .water-bead-size-control{
 min-height:var(--ttt-tool-height)!important;height:var(--ttt-tool-height)!important;
}
/* Gathering Place uses the same bottom alignment but its tools are separate from the room tray. */
#gatheringPlace .gather-tools{bottom:var(--ttt-toolbar-bottom)!important;gap:6px}
#gatheringPlace .gather-tools button{min-width:var(--ttt-tool-width);min-height:var(--ttt-tool-height);background:transparent}
#gatheringPlace .gather-tools button.unified-reset{width:var(--ttt-tool-width);height:var(--ttt-tool-height)}
/* Standalone studies keep extra space for their bottom Home button.
   When embedded as one of the 40 rooms, align with the host toolbar instead. */
body.embedded #materials{bottom:var(--ttt-toolbar-bottom)!important;gap:6px!important;align-items:center}
body.embedded #materials button{min-width:var(--ttt-tool-width)!important;min-height:var(--ttt-tool-height)!important;background:transparent!important;box-shadow:none!important}
body.embedded #materials button.unified-reset{height:var(--ttt-tool-height)!important;width:var(--ttt-tool-width)!important}
body.embedded #materials button .tool-caption{font:12px/1.25 var(--font-tools,system-ui)!important}
/* The three Material Encounters need additional palette/comparison controls.
   Their material rail shares the baseline, while the slider may extend upward. */
body.embedded .room-bottom{bottom:var(--ttt-toolbar-bottom)!important;align-items:end;gap:8px}
body.embedded .tooltray{background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;padding:0!important;align-items:center;min-height:var(--ttt-tool-height)}
body.embedded .tooltray #reset{min-width:var(--ttt-tool-width)!important;width:var(--ttt-tool-width)!important;min-height:var(--ttt-tool-height)!important;height:var(--ttt-tool-height)!important}
body.embedded .tooltray .tools button{min-height:var(--ttt-tool-height)!important;min-width:var(--ttt-tool-width)!important;background:transparent}
body.embedded .tooltray .tools button span{font-size:12px}
/* A comparison slider is not a material tool. On phones, place it above the
   bottom-aligned material toolbar instead of squeezing color swatches sideways. */
@media(max-width:650px){
 body.embedded .room-bottom{
  flex-direction:column-reverse!important;align-items:center!important;
  justify-content:center!important;flex-wrap:nowrap!important;gap:8px!important;
  bottom:var(--ttt-toolbar-bottom)!important;
 }
 body.embedded .tooltray{flex:none!important;max-width:calc(100vw - 16px);margin:0 auto}
 body.embedded .comparison{
  flex:none!important;width:min(250px,calc(100vw - 32px))!important;
  max-width:calc(100vw - 32px);margin:0 auto;
 }
}
@media(max-height:500px) and (orientation:landscape){
 body.inside #roomToolRail{bottom:max(6px,env(safe-area-inset-bottom))!important}
 body.embedded #materials,body.embedded .room-bottom{bottom:max(6px,env(safe-area-inset-bottom))!important}
}

/* Dedicated title / invitation rows on compact screens; never overlap the icons. */
@media(max-width:1000px){
 #firstVisitInvitation{
  top:120px!important;
  max-width:calc(100vw - 36px);
  font-size:clamp(15px,2.5vw,18px);
  line-height:1.4;
 }
}
@media(max-height:500px) and (orientation:landscape){
 #firstVisitInvitation{top:105px!important;max-width:65vw;font-size:14px}
}
/* Direct Map and Room Index actions are equally sized and clearly distinguishable. */
.quiet-controls #roomIndexHeaderToggle{
 width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;
 padding:10px!important;color:#59634e;border:0!important;background:transparent!important;
 display:grid;place-items:center;cursor:pointer;
}
#roomIndexHeaderToggle svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#roomIndexHeaderToggle:focus-visible{outline:2px solid #687d66;outline-offset:2px}
/* Keep the original sound control functional while housing it alongside haptics
   inside Guide only on phones. On desktop it returns to the icon row. */
#guideSoundRow{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;font:14px var(--font-tools,system-ui)}
#guideSoundRow[hidden]{display:none!important}
#guideSoundRow #quietSound{display:grid;place-items:center;flex:0 0 44px;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:9px;border:0!important;background:transparent!important;opacity:1!important}
#guideSoundRow #quietSound svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#guideSoundRow #quietSound[aria-pressed='true']{color:#6e8165}

/* Guide: one visual hierarchy for small screens and desktop.
   The prose is the invitation; preferences and the story are separate destinations. */
#guideNote{width:min(450px,calc(100vw - 28px));padding:31px 31px 26px;max-height:calc(100dvh - 36px);line-height:1.55}
#guideNote .guide-eyebrow{margin:0 0 7px;font:600 10px/1.4 var(--font-tools,system-ui);letter-spacing:.15em;text-transform:uppercase;color:#8a8b76}
#guideNote h2{font:normal 29px/1.1 var(--font-reading,Georgia,serif)!important;margin:0 36px 20px 0;letter-spacing:-.015em}
#guideNote .guide-section{padding:17px 0;border-top:1px solid #d8d1bf}
#guideNote .guide-section:last-child{padding-bottom:0}
#guideNote .guide-section h3{margin:0 0 10px;color:#596550;font:600 12px/1.4 var(--font-tools,system-ui);letter-spacing:.08em;text-transform:uppercase}
#guideNote .guide-section p{font:14px/1.65 var(--font-tools,system-ui);color:#625f51;margin:0 0 11px}
#guideNote .guide-section p:last-child{margin-bottom:0}
#guideNote .guide-section strong{font-weight:600;color:#465442}
#guideNote .guide-preferences{display:flex;flex-direction:column}
#guideNote #guideSoundRow,#guideNote .guide-setting,#guideNote #numberPreference{
 display:flex;align-items:center;justify-content:space-between;gap:12px;
 min-height:54px;margin:0;padding:6px 0;width:100%;
 border:0;border-bottom:1px solid #ded8c990;
 font:14px/1.45 var(--font-tools,system-ui);color:#505b49;
}
#guideNote #guideNumbersSlot>*{border-bottom:0}
#guideNote #guideSoundRow #quietSound{margin:0;flex:0 0 44px!important}
#guideNote .guide-toggle{min-width:74px;min-height:40px;padding:8px 12px;background:transparent;border:1px solid #b9bca6;border-radius:20px;color:#526450;font:600 12px var(--font-tools,system-ui)}
#guideNote .guide-toggle[aria-pressed='true']{background:#e3e9dc;border-color:#849678}
#guideNote .guide-toggle:disabled{opacity:.55}

#guideNote .desktop-shortcuts{margin:8px 0 0}
#guideNote .desktop-shortcuts summary{font:12px/1.5 var(--font-tools,system-ui);color:#718069;text-decoration-color:#b2b7a4}
#guideNote .desktop-shortcuts p{margin:5px 0 0}
#guideNote .guide-story-links{display:flex;flex-direction:column}
#guideNote .guide-story-links button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:50px;padding:9px 1px;background:transparent;color:#4e5b48;border:0;border-bottom:1px solid #ded8c990;text-align:left;font:500 14px/1.4 var(--font-tools,system-ui)}
#guideNote .guide-story-links button:last-child{border-bottom:0}
#guideNote .guide-story-links button span{color:#899580;font:normal 25px/1 Georgia,serif}
#guideNote .guide-story-links button:hover{color:#82654e}
#guideNote button:focus-visible,#guideNote input:focus-visible,#guideNote summary:focus-visible{outline:2px solid #72896d;outline-offset:3px}
@media(max-width:650px){
 #guideNote{width:calc(100vw - 28px);max-height:calc(100dvh - 28px);padding:27px 22px 22px}
 #guideNote h2{font-size:27px!important;margin-bottom:17px}
 #guideNote .guide-section{padding:15px 0}
 #guideNote .guide-section p{font-size:13px;line-height:1.58}
 #guideNote .note-close{top:8px;right:8px}
}
/* Keep each preference label at the left and its control at the right. */


/* The tree's place name stays visible; an older map rule hid all courtyard text. */
#courtyard .heart-landmark-label{
 opacity:1!important;visibility:visible!important;
 paint-order:stroke;stroke:#f7f3e9;stroke-width:2px;stroke-linejoin:round;
 font-family:var(--font-reading,Georgia,serif);font-size:34px;
}

/* Make it yours: identical On/Off controls for Haptics and Room Numbers. */
#guideNote .guide-toggle{
  margin-left:auto;flex:0 0 74px;min-width:74px;min-height:40px;
  display:grid;place-items:center;cursor:pointer;
}
#guideNote .guide-toggle:focus-visible{outline:2px solid #72896d;outline-offset:3px}

/* Map numbers and the searchable Room Index together restore wayfinding.
   Desktop: the index lives beside the watercolor landscape.
   Mobile: the numbered map remains visible above a scrollable index. */
#worldMapDialog .map-layout{display:grid;grid-template-columns:minmax(240px,27%) minmax(0,1fr)}
#worldMapDialog .map-layout>.map-index{display:flex!important;min-width:0}
#worldMapDialog .map-layout>.map-landscape{display:flex!important;min-width:0;min-height:0;flex:1}
#worldMapDialog .map-layout .overview-art{min-height:0;flex:1}
#worldMapPanel .map-index-quick{display:block;margin:4px auto 10px;min-height:44px;padding:8px 16px;border:1px solid #c8cbbb;border-radius:22px;background:#faf8f2;color:#516147;font:13px var(--font-tools,system-ui);cursor:pointer}
#worldMapPanel .map-index-quick:focus-visible{outline:2px solid #788c74;outline-offset:2px}
#worldMapDialog .overview-room-number,#worldMapPanel .overview-room-number{pointer-events:none}
@media(max-width:650px){
 #worldMapDialog .map-layout{display:flex;flex-direction:column;min-height:0;height:100%}
 #worldMapDialog .map-layout>.map-landscape{order:0;display:flex!important;min-height:0!important;flex:1 1 auto!important}
 #worldMapDialog .map-layout>.map-index{order:1;display:flex!important;flex:0 0 38dvh!important;height:38dvh!important;max-height:38dvh!important;min-height:0;overflow:hidden;border-top:1px solid #e1e3da;border-right:0;padding:10px 16px 4px}
 #worldMapDialog .map-index[open]+.map-landscape{display:flex!important}
 #worldMapDialog .map-index[open]>.map-index-content{min-height:0;height:auto;max-height:calc(38dvh - 58px);overflow-y:auto;overscroll-behavior:contain}
 #worldMapDialog .map-layout>.map-index:not([open]){flex:0 0 54px!important;height:54px!important;max-height:54px!important}
 #worldMapDialog .map-index>summary{padding:8px 52px 9px 0!important}
 #worldMapDialog .map-overview-head{padding-top:12px;padding-bottom:0}
 #worldMapDialog .map-overview-head h2{font-size:26px;margin-bottom:4px}
 #worldMapDialog .map-overview-head p{line-height:1.3}
 #worldMapDialog .map-current{display:none}
 #worldMapDialog .map-layout .overview-art{padding:4px 10px 6px;min-height:0;flex:1}
 #worldMapDialog .map-legend{padding:7px 12px;gap:7px;font-size:9px}
}
/* Light & Shadow's optional second light must not push Reset off small phones. */
@media(max-width:380px){
 body.embedded #materials:has(#secondLight){gap:4px!important;max-width:calc(100vw - 16px)}
 body.embedded #materials:has(#secondLight)>button{
  width:56px!important;min-width:56px!important;max-width:56px!important;
  min-height:72px!important;height:72px!important;padding:3px!important;
 }
 body.embedded #materials:has(#secondLight)>button svg{max-width:35px}
}
/* The original standalone light investigation can also open outside its world iframe. */
@media(max-width:380px){
 #materials:has(#secondLight){gap:4px!important;max-width:calc(100vw - 16px)}
 #materials:has(#secondLight)>button{
  width:56px!important;min-width:56px!important;max-width:56px!important;
  min-height:72px!important;height:72px!important;padding:3px!important;
 }
 #materials:has(#secondLight)>button svg{max-width:35px}
}
/* Optional light uses the same exact footprint as the rest of the embedded rail. */
body.embedded #materials:has(#secondLight)>button{
 box-sizing:border-box;
 flex:0 0 var(--ttt-tool-width);
 min-width:var(--ttt-tool-width)!important;
 max-width:var(--ttt-tool-width)!important;
 width:var(--ttt-tool-width)!important;
 padding:4px!important;
}
@media(max-width:380px){
 body.embedded #materials:has(#secondLight)>button{
  flex-basis:56px;min-width:56px!important;max-width:56px!important;width:56px!important;
 }
}

/* A little overview: one path to the index, plus genuinely functional map zoom. */
#worldMapPanel .mini-map-stage{position:relative;isolation:isolate}
#worldMapPanel .mini-map-stage .overview-art svg{touch-action:none;cursor:grab}
#worldMapPanel .mini-map-stage .overview-art svg:active{cursor:grabbing}
#worldMapPanel .map-zoom-controls{
 position:absolute;right:3px;bottom:1px;z-index:2;display:flex;align-items:center;
 gap:3px;border:1px solid #d7d5c8;border-radius:20px;padding:3px;
 background:#faf8f2ef;box-shadow:0 2px 8px #5f65521a;
}
#worldMapPanel .map-zoom-controls button{
 min-width:40px;min-height:40px;display:grid;place-items:center;
 border:0;border-radius:15px;background:transparent;color:#52624d;
 font-size:24px;line-height:1;cursor:pointer
}
#worldMapPanel .map-zoom-controls button:hover:not(:disabled){background:#eaece1}
#worldMapPanel .map-zoom-controls button:disabled{opacity:.35;cursor:default}
#worldMapPanel .map-zoom-controls button:focus-visible{outline:2px solid #62785c;outline-offset:1px}
#worldMapPanel .map-zoom-level{min-width:36px;text-align:center;font:11px var(--font-tools,system-ui);color:#65725d;font-variant-numeric:tabular-nums}
#worldMapPanel .map-location{display:flex;align-items:center;gap:7px;min-height:20px}
#worldMapPanel .map-location::before,#worldMapDialog .map-current-dot{
 content:'';width:10px;height:10px;border-radius:50%;background:#bd7a59;
 box-shadow:0 0 0 3px #fdf8ee,0 0 0 4px #a15e42;flex:none;
}
#worldMapDialog .map-current>span{display:flex;align-items:center;gap:10px;justify-content:flex-end}
#worldMapDialog .map-current .map-location:empty{display:none}
#worldMapDialog .map-overview-head>div:first-child{min-width:0;max-width:640px}
@media(max-width:650px){
 #worldMapDialog .map-overview-head p{font-size:13px;line-height:1.45}
 #worldMapPanel .map-zoom-controls{bottom:4px}
}

/* Map reading order: title -> one instruction -> geography -> quiet controls. */
#worldMapPanel .mini-map-title{
 margin:0;font:500 17px/1.3 var(--font-reading,Georgia,serif)!important;
 letter-spacing:-.2px;color:#495744;
}
#worldMapPanel .map-panel-head{min-height:44px;gap:12px}
#worldMapPanel .map-panel-actions .mini-map-close{
 display:grid;place-items:center;border:0;background:transparent;
 color:#687563;border-radius:50%;font-size:23px;cursor:pointer;
}
#worldMapPanel .map-panel-actions .mini-map-close:focus-visible{outline:2px solid #62785c;outline-offset:1px}
#worldMapPanel .mini-map-hint{margin:7px 0 4px;color:#697466;font:12px/1.4 var(--font-tools,system-ui)}
#worldMapPanel .mini-map-footer{display:flex;align-items:center;gap:10px;justify-content:space-between;margin-top:8px}
#worldMapPanel .mini-map-footer .map-location{
 font:12px/1.4 var(--font-tools,system-ui)!important;color:#53644e;margin:0;
 flex:1;white-space:nowrap;
}
#worldMapPanel .mini-map-footer .map-index-quick{
 display:inline-flex;align-items:center;justify-content:center;
 margin:0;min-height:44px;padding:8px 12px;white-space:nowrap;
 border-radius:14px;background:#f8f7ef;border-color:#cfd5c5;
 font:500 12px/1.25 var(--font-tools,system-ui)!important;
}
#worldMapPanel .map-zoom-controls{
 top:14px;bottom:auto;right:2px;display:flex;flex-direction:column;
 border-radius:16px;gap:2px;padding:2px;
}
#worldMapPanel .map-zoom-controls button{
 min-width:40px;min-height:40px;border-radius:12px;
 font-size:22px;
}
#worldMapPanel .map-zoom-level.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}
#worldMapDialog .map-overview-head{padding:30px 76px 8px 32px;gap:20px;align-items:flex-start}
#worldMapDialog .map-overview-head h2{font:500 clamp(29px,3vw,44px)/1.1 var(--font-reading,Georgia,serif)!important;letter-spacing:-.5px;margin:0 0 10px}
#worldMapDialog .map-overview-head p{font:14px/1.5 var(--font-tools,system-ui)!important;color:#6f786c;margin:0}
#worldMapDialog .map-current{display:flex;min-width:auto;align-items:center;padding-top:8px}
#worldMapDialog .map-current>span{
 display:inline-flex;gap:10px;align-items:center;justify-content:flex-end;
 color:#67765d;font:600 11px/1.4 var(--font-tools,system-ui)!important;
 letter-spacing:.2px;text-transform:none;white-space:nowrap;
}
#worldMapDialog .map-legend{padding:12px 24px;gap:10px 16px;color:#738072}
#worldMapDialog .map-index>summary{letter-spacing:1.3px;font-size:11px}
@media(max-width:650px){
 #worldMapDialog .map-overview-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;padding:12px 56px 6px 18px}
 #worldMapDialog .map-overview-head h2{font-size:27px!important;margin:0 0 4px}
 #worldMapDialog .map-overview-head p{font-size:12px!important;line-height:1.4}
 #worldMapDialog .map-current{display:flex!important;padding:3px 0 0;min-width:0}
 #worldMapDialog .map-current>span{font-size:10px!important;justify-content:flex-start}
 #worldMapDialog .map-zoom-controls{top:10px;bottom:auto}
 #worldMapDialog .map-legend{padding:7px 12px;gap:6px 10px}
}

/* Shared map legend: the location marker belongs beside visit history, not in instructions. */
#worldMapPanel .mini-map-keys{
 display:flex;align-items:center;gap:14px;flex-wrap:wrap;
 margin:9px 0 2px;color:#687865;font:11px/1.4 var(--font-tools,system-ui);
}
#worldMapPanel .mini-map-keys>span{display:inline-flex;align-items:center;white-space:nowrap;gap:6px}
#worldMapPanel .mini-map-keys>span::before{
 content:'';display:inline-block;width:8px;height:8px;
 flex:none;border-radius:50%;background:#8b9b80;
}
#worldMapPanel .mini-map-keys .map-visit-key{font:11px/1.4 var(--font-tools,system-ui)!important;color:#687865}
#worldMapPanel .mini-map-keys .map-visit-key::before{width:6px;height:6px;background:#8b9b80}
#worldMapPanel .mini-map-keys .map-you-key::before,
#worldMapDialog .map-legend .map-you-key::before{
 background:#bd7a59!important;width:10px!important;height:10px!important;
 box-shadow:0 0 0 2px #fdf8ee,0 0 0 3px #a15e42;
}
#worldMapDialog .map-legend .map-you-key,
#worldMapDialog .map-legend .map-visit-key{font:11px/1.4 var(--font-tools,system-ui)!important;color:#687865}
#worldMapDialog .map-legend .map-you-key::before{margin-right:9px}
/* Mini map: Rooms Index and +/- are peers in a single bottom row. */
#worldMapPanel .mini-map-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}
#worldMapPanel .mini-map-footer .map-index-quick{flex:1 1 auto;min-width:0;min-height:44px}
#worldMapPanel .mini-map-footer .map-zoom-controls{
 position:static!important;display:inline-flex;flex:0 0 auto;flex-direction:row!important;
 align-items:center;gap:2px;margin:0;padding:2px;
 border:1px solid #d7d5c8;border-radius:14px;
 box-shadow:none;background:#faf8f2ef;
}
#worldMapPanel .mini-map-footer .map-zoom-controls button{
 flex:0 0 44px;width:44px;min-width:44px;min-height:44px;
 border-radius:11px;font-size:22px;
}
/* Full overview: floating zoom within map canvas, not inside the room index. */
#worldMapDialog .map-landscape{position:relative}
#worldMapDialog .overview-art svg{touch-action:none}
#worldMapDialog .full-map-zoom-controls{
 position:absolute;z-index:4;right:16px;bottom:63px;
 display:flex;flex-direction:column;gap:3px;padding:3px;
 border:1px solid #d7d5c8;border-radius:16px;
 background:#faf8f2ef;box-shadow:0 2px 8px #5f65521a;
}
#worldMapDialog .full-map-zoom-controls button{
 display:grid;place-items:center;min-width:44px;min-height:44px;
 border:0;border-radius:12px;background:transparent;
 color:#52624d;font:normal 24px/1 var(--font-tools,system-ui);cursor:pointer;
}
#worldMapDialog .full-map-zoom-controls button:hover:not(:disabled){background:#eaece1}
#worldMapDialog .full-map-zoom-controls button:disabled{opacity:.35;cursor:default}
#worldMapDialog .full-map-zoom-controls button:focus-visible{outline:2px solid #62785c;outline-offset:1px}
#worldMapDialog .full-map-zoom-controls .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:650px){
 #worldMapDialog .full-map-zoom-controls{right:11px;bottom:46px}
 #worldMapDialog .map-legend{column-gap:12px;row-gap:7px}
 #worldMapPanel .mini-map-keys{gap:12px;margin-top:7px}
}
/* Earlier mobile map rules set top:10px on every zoom group.
   The full-map group is bottom-anchored and must not stretch vertically. */
#worldMapDialog .full-map-zoom-controls{top:auto!important;height:max-content;max-height:max-content}
/* Keep the two status keys physically adjacent even when category legends wrap. */
#worldMapDialog .map-legend .map-status-keys{
 display:inline-flex;align-items:center;gap:14px;flex:0 0 auto;
 white-space:nowrap;margin-left:auto;
}
#worldMapDialog .map-legend .map-status-keys>span{display:inline-flex;align-items:center}
@media(max-width:650px){
 #worldMapDialog .map-legend .map-status-keys{gap:12px;margin-left:0}
}
/* On a narrow phone the full-map zoom group ends before the legend starts. */
@media(max-width:650px){#worldMapDialog .full-map-zoom-controls{bottom:73px}}

/* Pocket-friendly mini overview: the map is self-explanatory, not a second guide. */
#worldMapPanel .mini-map-keys{margin:3px 0 1px;gap:0}
#worldMapPanel .mini-map-keys .map-you-key{font:500 11px/1.25 var(--font-tools,system-ui);color:#62715e}
#worldMapPanel .mini-map-footer{gap:6px;margin-top:7px}
#worldMapPanel .mini-map-footer .map-index-quick{
 min-height:44px;padding:7px 10px;border-radius:12px;
 font:500 11px/1.2 var(--font-tools,system-ui)!important;
}
#worldMapPanel .mini-map-footer .map-zoom-controls{padding:0;gap:0;border-radius:12px}
#worldMapPanel .mini-map-footer .map-zoom-controls button{
 flex:0 0 44px;width:44px;min-width:44px;min-height:44px;
 padding:0;font-size:20px;border-radius:10px;
}

/* Full map: Nature, visit history, and location form one coherent legend cluster. */
#worldMapDialog .map-legend .map-nature-location{
 display:inline-flex;align-items:center;flex-wrap:wrap;
 gap:8px 12px;flex:0 1 auto;min-width:0;
}
#worldMapDialog .map-legend .map-nature-key{display:inline-flex;align-items:center;white-space:nowrap}
#worldMapDialog .map-legend .map-nature-key::before{
 content:'';display:inline-block;width:10px;height:10px;border-radius:50%;
 background:#d5e1c4;margin-right:8px;flex:none;
}
#worldMapDialog .map-legend .map-nature-location .map-status-keys{
 margin-left:0!important;gap:10px;flex:none;
}
/* Mini map: reduce visible button backgrounds without shrinking 44px touch targets. */
#worldMapPanel .mini-map-footer{justify-content:center;gap:7px}
#worldMapPanel .mini-map-footer .map-index-quick{
 position:relative;isolation:isolate;flex:0 1 auto;min-width:0;
 padding:0 14px;min-height:44px;border:0!important;background:transparent!important;
 box-shadow:none!important;color:#52624d;
}
#worldMapPanel .mini-map-footer .map-index-quick::before{
 content:'';position:absolute;inset:5px 2px;z-index:-1;
 border:1px solid #cfd5c5;border-radius:11px;background:#f8f7ef;
}
#worldMapPanel .mini-map-footer .map-index-quick:hover::before{background:#eef1e7}
#worldMapPanel .mini-map-footer .map-zoom-controls{
 flex:0 0 auto;gap:0;border:0!important;background:transparent!important;
 box-shadow:none!important;
}
#worldMapPanel .mini-map-footer .map-zoom-controls button{
 position:relative;isolation:isolate;flex:0 0 44px;
 width:44px;min-width:44px;min-height:44px;
 background:transparent!important;border:0!important;
}
#worldMapPanel .mini-map-footer .map-zoom-controls button::before{
 content:'';position:absolute;inset:5px;z-index:-1;
 border:1px solid #d7d5c8;border-radius:10px;background:#faf8f2;
}
#worldMapPanel .mini-map-footer .map-zoom-controls button:hover:not(:disabled)::before{background:#eaece1}
#worldMapPanel .mini-map-footer .map-zoom-controls button:disabled::before{opacity:.4}
@media(max-width:650px){
 #worldMapDialog .map-legend .map-nature-location{gap:7px 10px}
}

/* Mini-map: one restrained, pill-free control row at every phone width. */
#worldMapPanel .mini-map-footer{
 display:flex;align-items:center;justify-content:space-between;
 gap:3px;flex-wrap:nowrap;min-width:0;margin-top:7px;
}
#worldMapPanel .mini-map-footer .mini-map-keys{
 display:inline-flex;align-items:center;flex:0 1 auto;
 min-width:0;gap:0;margin:0;padding:0;
}
#worldMapPanel .mini-map-footer .mini-map-keys .map-you-key{
 display:inline-flex;align-items:center;gap:5px;white-space:nowrap;
 font:500 10px/1.2 var(--font-tools,system-ui);
}
#worldMapPanel .mini-map-footer .mini-map-keys .map-you-key::before{
 width:8px!important;height:8px!important;
 box-shadow:0 0 0 2px #fdf8ee,0 0 0 3px #a15e42;
 margin-right:2px;
}
#worldMapPanel .mini-map-footer .map-index-quick{
 display:inline-flex;flex:0 1 auto;min-width:0;
 min-height:44px;padding:0 3px;
 border:0!important;border-radius:0!important;
 background:transparent!important;box-shadow:none!important;
 white-space:nowrap;font:500 10px/1.2 var(--font-tools,system-ui)!important;
 text-decoration:underline;text-decoration-color:#bdc7b6;text-underline-offset:4px;
}
#worldMapPanel .mini-map-footer .map-index-quick::before{display:none!important}
#worldMapPanel .mini-map-footer .map-index-quick:hover{text-decoration-color:#52624d}
#worldMapPanel .mini-map-footer .map-zoom-controls{
 flex:0 0 auto;display:inline-flex;align-items:center;
 border:0!important;border-radius:0!important;background:transparent!important;
 padding:0!important;gap:0;
}
#worldMapPanel .mini-map-footer .map-zoom-controls button{
 display:grid;place-items:center;
 width:44px;min-width:44px;min-height:44px;flex:0 0 44px;
 border:0!important;border-radius:0!important;
 background:transparent!important;box-shadow:none!important;
 font-size:19px;
}
#worldMapPanel .mini-map-footer .map-zoom-controls button::before{
 display:block;content:'';position:absolute;
 inset:5px;z-index:-1;
 border:1px solid #d7d5c8;border-radius:4px;
 background:#faf8f2;
}
#worldMapPanel .mini-map-footer .map-zoom-controls button:hover:not(:disabled)::before{background:#eaece1}
@media(max-width:360px){
 #worldMapPanel .mini-map-footer{gap:1px}
 #worldMapPanel .mini-map-footer .mini-map-keys .map-you-key{font-size:9px}
 #worldMapPanel .mini-map-footer .map-index-quick{font-size:9px!important;padding:0 1px}
}
