/* DeepRoute H8 - one-screen map view; original map, H7 and routing preserved. */
body.dr-fantasy #dr-h8-map-controls,
body.dr-fantasy #dr-h8-continent-switch{position:fixed;z-index:10010;pointer-events:auto;font-family:Georgia,'Times New Roman',serif;}
body.dr-fantasy #dr-h8-map-controls{bottom:27px;right:calc(var(--dr-right-space,13px) + 21px);}
body.dr-fantasy #dr-h8-view-toggle,
body.dr-fantasy .dr-h8-continent-button{
  -webkit-appearance:none;appearance:none;color:#f4d599;
  background:linear-gradient(180deg,#352415 0%,#1b130d 100%);
  border:1px solid #c49148;border-radius:9px;
  box-shadow:inset 0 0 0 1px #61401d,0 4px 18px #0009;
  cursor:pointer;font-weight:bold;letter-spacing:.01em;
}
body.dr-fantasy #dr-h8-view-toggle{padding:10px 15px;min-height:40px;font-size:13px;white-space:nowrap;}
body.dr-fantasy #dr-h8-view-toggle:hover,
body.dr-fantasy .dr-h8-continent-button:hover:not(:disabled){background:linear-gradient(180deg,#594022,#302014);border-color:#f1c875;}
body.dr-fantasy #dr-h8-view-toggle:focus-visible,
body.dr-fantasy .dr-h8-continent-button:focus-visible{outline:2px solid #ffe5a0;outline-offset:3px;}
body.dr-fantasy #dr-h8-continent-switch{display:flex;top:calc(var(--dr-top-space,80px) + 12px);left:calc(var(--dr-left-space,13px) + 16px);gap:5px;flex-wrap:wrap;max-width:min(760px,calc(100vw - var(--dr-left-space,13px) - var(--dr-right-space,13px) - 30px));}
body.dr-fantasy .dr-h8-continent-button{padding:9px 12px;min-height:38px;font-size:12px;}
body.dr-fantasy .dr-h8-continent-button.dr-h8-selected{background:linear-gradient(180deg,#775227,#392510);border-color:#f7d48f;color:#ffe8b8;}
body.dr-fantasy .dr-h8-continent-button:disabled{opacity:.42;cursor:not-allowed;}
/* Fullscreen is an app layout, not the browser Fullscreen API; retain browser navigation. */
body.dr-fantasy.dr-h8-fullscreen{
  --dr-left-space:0px!important;--dr-right-space:0px!important;--dr-top-space:0px!important;
  overflow:hidden!important;
}
body.dr-fantasy.dr-h8-fullscreen #drawer-left,
body.dr-fantasy.dr-h8-fullscreen #drawer-right,
body.dr-fantasy.dr-h8-fullscreen #dr-topbar,
body.dr-fantasy.dr-h8-fullscreen .dr-topbar,
body.dr-fantasy.dr-h8-fullscreen #toggle-left,
body.dr-fantasy.dr-h8-fullscreen #toggle-right,
body.dr-fantasy.dr-h8-fullscreen #dr-options-panel{
  display:none!important;visibility:hidden!important;pointer-events:none!important;
}
body.dr-fantasy.dr-h8-fullscreen #dr-map-frame,
body.dr-fantasy.dr-h8-fullscreen #map{
  position:fixed!important;top:0!important;bottom:0!important;left:0!important;right:0!important;
  width:100vw!important;height:100vh!important;height:100dvh!important;
  max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;
  margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;transform:none!important;
}
body.dr-fantasy.dr-h8-fullscreen #dr-h8-continent-switch{display:flex;top:18px;left:18px;max-width:min(760px,calc(100vw - 36px));}
body.dr-fantasy.dr-h8-fullscreen #dr-h8-map-controls{right:22px;bottom:22px;}
@media(max-width:720px){
  body.dr-fantasy #dr-h8-map-controls{bottom:18px;right:calc(var(--dr-right-space,13px) + 10px);}
  body.dr-fantasy #dr-h8-view-toggle{padding:9px 10px;font-size:11px;min-height:36px;}
  body.dr-fantasy.dr-h8-fullscreen #dr-h8-continent-switch{left:9px;top:9px;max-width:calc(100vw - 18px);gap:4px;}
  body.dr-fantasy .dr-h8-continent-button{font-size:11px;padding:7px 8px;min-height:33px;}
  body.dr-fantasy.dr-h8-fullscreen #dr-h8-map-controls{bottom:14px;right:12px;}
}

/* H9: one clickable map switch everywhere, zone details in floating dock only in fullscreen. */
body.dr-fantasy .dr-h9-old-map-card{display:none!important;}
body.dr-fantasy #dr-h9-zone-info{display:none;position:fixed;left:18px;top:75px;z-index:10020;
  width:min(370px,calc(100vw - 36px));max-height:calc(100dvh - 100px);font-family:Georgia,'Times New Roman',serif;pointer-events:auto;}
body.dr-fantasy.dr-h8-fullscreen #dr-h9-zone-info.dr-h9-open{display:block;}
body.dr-fantasy #dr-h9-zone-info [data-dr="selected"]{display:block;box-sizing:border-box;
  width:100%;max-height:calc(100dvh - 100px);overflow:auto;padding:15px 16px;
  background:linear-gradient(170deg,#302014 0%,#130e09 100%);border:1px solid #c49148;border-radius:10px;
  color:#f3dfb7;box-shadow:0 8px 30px #000c,inset 0 0 0 1px #503516;scrollbar-width:thin;}
body.dr-fantasy #dr-h9-zone-info [data-dr="selected"] h3{color:#f2ce85;margin:0;font:bold 20px Georgia,serif;}
body.dr-fantasy .dr-geo3z-label{cursor:pointer!important;}
body.dr-fantasy .dr-geo3z-label:focus-visible{outline:2px solid #f8dc91!important;outline-offset:2px;}
/* The search field keeps its resting appearance when focused (no double rectangular frame). */
body.dr-fantasy #dr-topbar input[type="search"]:focus,
body.dr-fantasy #dr-topbar input[type="search"]:focus-visible,
body.dr-fantasy .dr-topbar input[type="search"]:focus,
body.dr-fantasy .dr-topbar input[type="search"]:focus-visible{outline:0!important;outline-offset:0!important;box-shadow:none!important;}
body.dr-fantasy #dr-topbar form:focus-within,
body.dr-fantasy .dr-topbar form:focus-within{outline:0!important;outline-offset:0!important;box-shadow:none!important;}
@media(max-width:720px){
 body.dr-fantasy #dr-h8-continent-switch{left:calc(var(--dr-left-space,13px) + 8px);top:calc(var(--dr-top-space,80px) + 6px);max-width:calc(100vw - var(--dr-left-space,13px) - 20px);}
 body.dr-fantasy.dr-h8-fullscreen #dr-h8-continent-switch{left:9px;top:9px;max-width:calc(100vw - 18px);}
 body.dr-fantasy #dr-h9-zone-info{left:9px;top:58px;width:min(360px,calc(100vw - 18px));max-height:calc(100dvh - 70px);}
 body.dr-fantasy #dr-h9-zone-info [data-dr="selected"]{max-height:calc(100dvh - 70px);}
}

/* H10 – calm, unobstructed controls; no old map-frame brackets in fullscreen. */
body.dr-fantasy #dr-h8-continent-switch{
  left:calc(var(--dr-left-space,13px) + 29px);
  top:calc(var(--dr-top-space,80px) + 19px);
  max-width:min(760px,calc(100vw - var(--dr-left-space,13px) - var(--dr-right-space,13px) - 55px));
}
body.dr-fantasy #dr-h8-map-controls{right:calc(var(--dr-right-space,13px) + 29px);bottom:24px;}
body.dr-fantasy.dr-h8-fullscreen #dr-h8-continent-switch{top:22px;left:22px;max-width:calc(100vw - 44px);}
body.dr-fantasy.dr-h8-fullscreen #dr-h8-map-controls{right:22px;bottom:22px;}
body.dr-fantasy.dr-h8-fullscreen .edge-toggle,
body.dr-fantasy.dr-h8-fullscreen #toggle-left,
body.dr-fantasy.dr-h8-fullscreen #toggle-right,
body.dr-fantasy.dr-h8-fullscreen #toggle-header,
body.dr-fantasy.dr-h8-fullscreen #toggle-top,
body.dr-fantasy.dr-h8-fullscreen #dr-top-toggle,
body.dr-fantasy.dr-h8-fullscreen .dr-header-toggle,
body.dr-fantasy.dr-h8-fullscreen .dr-top-toggle,
body.dr-fantasy.dr-h8-fullscreen .dr-top-collapse-button{
  display:none!important;visibility:hidden!important;pointer-events:none!important;
}
body.dr-fantasy.dr-h8-fullscreen #dr-map-frame::before,
body.dr-fantasy.dr-h8-fullscreen #dr-map-frame::after,
body.dr-fantasy.dr-h8-fullscreen #map::before,
body.dr-fantasy.dr-h8-fullscreen #map::after{content:none!important;display:none!important;}
body.dr-fantasy .dr-h7-regions{border-top:1px solid rgba(205,151,74,.28);margin-top:12px;padding-top:10px;}
body.dr-fantasy .dr-h7-regions>summary{cursor:pointer;list-style-position:inside;color:#f0ca82;font:bold 13px Georgia,serif;padding:5px 0;}
body.dr-fantasy .dr-h7-region-list{max-height:210px;overflow-y:auto;scrollbar-width:thin;margin:6px 0 0 5px;}
body.dr-fantasy #drawer-left [data-dr="selected"][data-geo3z-h7="true"]{max-height:min(78dvh,740px);overflow:auto;}
body.dr-fantasy.dr-h8-fullscreen #dr-h9-zone-info{top:77px;left:22px;max-height:calc(100dvh - 98px);}
body.dr-fantasy.dr-h8-fullscreen #dr-h9-zone-info [data-dr="selected"]{max-height:calc(100dvh - 98px);}
@media(max-width:720px){
 body.dr-fantasy #dr-h8-continent-switch{left:calc(var(--dr-left-space,13px) + 9px);top:calc(var(--dr-top-space,80px) + 9px);max-width:calc(100vw - var(--dr-left-space,13px) - 25px);}
 body.dr-fantasy.dr-h8-fullscreen #dr-h8-continent-switch{left:10px;top:10px;max-width:calc(100vw - 20px);}
 body.dr-fantasy.dr-h8-fullscreen #dr-h9-zone-info{left:10px;top:108px;width:min(360px,calc(100vw - 20px));max-height:calc(100dvh - 120px);}
 body.dr-fantasy.dr-h8-fullscreen #dr-h9-zone-info [data-dr="selected"]{max-height:calc(100dvh - 120px);}
 body.dr-fantasy.dr-h8-fullscreen #dr-h8-map-controls{right:12px;bottom:14px;}
}

/* H10.1: No decorative L-shaped frame brackets in either map view.
   Preserve the map itself, its border, all markers and navigation buttons. */
body.dr-fantasy #dr-map-frame::before,
body.dr-fantasy #dr-map-frame::after,
body.dr-fantasy #map::before,
body.dr-fantasy #map::after,
body.dr-fantasy #dr-map-frame > [class*="corner"],
body.dr-fantasy #map > [class*="corner"],
body.dr-fantasy [class*="map-corner"],
body.dr-fantasy [class*="frame-corner"],
body.dr-fantasy [class*="corner-ornament"],
body.dr-fantasy [class*="corner-bracket"],
body.dr-fantasy [class*="map-bracket"],
body.dr-fantasy .dr-corner-tl,
body.dr-fantasy .dr-corner-tr,
body.dr-fantasy .dr-corner-bl,
body.dr-fantasy .dr-corner-br {
  content:none!important;display:none!important;visibility:hidden!important;
  background-image:none!important;pointer-events:none!important;
}
body.dr-fantasy.dr-h8-fullscreen .dr-h10-1-hide-in-full,
body.dr-fantasy.dr-h8-fullscreen #toggle-left,
body.dr-fantasy.dr-h8-fullscreen #toggle-right,
body.dr-fantasy.dr-h8-fullscreen [data-action="toggle-left"],
body.dr-fantasy.dr-h8-fullscreen [data-action="toggle-right"]{
  display:none!important;visibility:hidden!important;pointer-events:none!important;
}

/* H10.2: The area details are one floating map card in BOTH layouts.
   They never enter #drawer-left, so this menu remains free for other functions. */
body.dr-fantasy #dr-h9-zone-info.dr-h9-open{
  display:block!important;
  left:calc(var(--dr-left-space,13px) + 29px);
  top:calc(var(--dr-top-space,80px) + 75px);
  width:min(355px,calc(100vw - var(--dr-left-space,13px) - var(--dr-right-space,13px) - 46px));
  max-height:calc(100dvh - var(--dr-top-space,80px) - 97px);
}
body.dr-fantasy #dr-h9-zone-info .dr-h7-floating{
  box-sizing:border-box;display:block;width:100%;
  max-height:calc(100dvh - var(--dr-top-space,80px) - 97px);
  overflow:auto;padding:15px 16px;
  background:linear-gradient(170deg,#302014 0%,#130e09 100%);
  border:1px solid #c49148;border-radius:10px;color:#f3dfb7;
  box-shadow:0 8px 30px #000c,inset 0 0 0 1px #503516;
  scrollbar-width:thin;
}
body.dr-fantasy #dr-h9-zone-info .dr-h7-floating h3{
  color:#f2ce85;margin:0;font:bold 20px Georgia,serif;
}
body.dr-fantasy #dr-h9-zone-info .dr-h7-floating[hidden]{display:none!important;}
body.dr-fantasy #dr-h9-zone-info .dr-h7-floating .dr-selected-top{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
body.dr-fantasy #dr-h9-zone-info .dr-h7-floating .dr-h7-close{
  appearance:none;background:transparent;border:0;color:#f4d29b;
  cursor:pointer;font-size:22px;line-height:1;padding:3px 5px;
}
body.dr-fantasy #dr-h9-zone-info .dr-h7-floating .dr-h7-close:hover{
  color:#fff1c9;
}
body.dr-fantasy.dr-h8-fullscreen #dr-h9-zone-info.dr-h9-open{
  left:22px;top:77px;width:min(355px,calc(100vw - 44px));
  max-height:calc(100dvh - 98px);
}
body.dr-fantasy.dr-h8-fullscreen #dr-h9-zone-info .dr-h7-floating{
  max-height:calc(100dvh - 98px);
}
@media(max-width:720px){
 body.dr-fantasy #dr-h9-zone-info.dr-h9-open{
   left:calc(var(--dr-left-space,13px) + 9px);
   top:calc(var(--dr-top-space,80px) + 63px);
   width:min(340px,calc(100vw - var(--dr-left-space,13px) - 20px));
   max-height:calc(100dvh - var(--dr-top-space,80px) - 78px);
 }
 body.dr-fantasy #dr-h9-zone-info .dr-h7-floating{max-height:calc(100dvh - var(--dr-top-space,80px) - 78px);}
 body.dr-fantasy.dr-h8-fullscreen #dr-h9-zone-info.dr-h9-open{
   left:10px;top:108px;width:min(340px,calc(100vw - 20px));max-height:calc(100dvh - 120px);
 }
 body.dr-fantasy.dr-h8-fullscreen #dr-h9-zone-info .dr-h7-floating{max-height:calc(100dvh - 120px);}
}

/* H10.3 – the selected area can be fixed without interrupting map hover or card scroll. */
body.dr-fantasy #dr-h9-zone-info .dr-h10-title-actions{
  display:flex;align-items:center;gap:7px;flex-shrink:0;
}
body.dr-fantasy #dr-h9-zone-info .dr-h10-pin{
  appearance:none;cursor:pointer;border-radius:6px;border:1px solid #a47943;
  color:#edd09b;background:linear-gradient(180deg,#4a301a,#24180f);
  padding:5px 8px;font:600 11px/1.25 Georgia,'Times New Roman',serif;
  white-space:nowrap;
}
body.dr-fantasy #dr-h9-zone-info .dr-h10-pin:hover,
body.dr-fantasy #dr-h9-zone-info .dr-h10-pin:focus-visible{
  border-color:#f0c778;color:#fff1ce;
}
body.dr-fantasy #dr-h9-zone-info.dr-h10-pinned .dr-h10-pin{
  background:linear-gradient(180deg,#89612c,#563715);border-color:#ebc16a;
  color:#fff3d8;
}
body.dr-fantasy #dr-h9-zone-info .dr-h7-floating .dr-selected-top{
  cursor:pointer;align-items:flex-start;
}
body.dr-fantasy #dr-h9-zone-info .dr-h7-floating .dr-selected-top h3{
  overflow-wrap:anywhere;
}
@media(max-width:430px){
  body.dr-fantasy #dr-h9-zone-info .dr-h10-pin{padding:4px 6px;font-size:10px;}
  body.dr-fantasy #dr-h9-zone-info .dr-h10-title-actions{gap:4px;}
}

/* H10.4 - independent persistent area information visibility switch. */
body.dr-fantasy #dr-h10-4-restore{
  position:fixed;z-index:10024;pointer-events:auto;
  top:calc(var(--dr-top-space,80px) + 75px);
  left:calc(var(--dr-left-space,13px) + 29px);
  max-width:min(350px,calc(100vw - var(--dr-left-space,13px) - 35px));
  appearance:none;cursor:pointer;padding:9px 12px;
  color:#f2d49b;background:linear-gradient(180deg,#352415,#1b130d);
  border:1px solid #c49148;border-radius:8px;
  box-shadow:inset 0 0 0 1px #61401d,0 4px 18px #0009;
  font:600 12px/1.3 Georgia,'Times New Roman',serif;
}
body.dr-fantasy #dr-h10-4-restore[hidden]{display:none!important;}
body.dr-fantasy #dr-h10-4-restore:hover{border-color:#f1c875;background:#49321d;}
body.dr-fantasy #dr-h10-4-restore:focus-visible,
body.dr-fantasy #dr-h9-zone-info .dr-h10-4-hide:focus-visible{
  outline:2px solid #f1c875;outline-offset:2px;
}
body.dr-fantasy #dr-h9-zone-info .dr-h10-4-hide{
  appearance:none;cursor:pointer;border-radius:6px;border:1px solid #8d683e;
  color:#ecd09e;background:linear-gradient(180deg,#43301e,#21180f);
  padding:5px 8px;font:600 11px/1.25 Georgia,'Times New Roman',serif;
  white-space:nowrap;
}
body.dr-fantasy #dr-h9-zone-info .dr-h10-4-hide:hover{border-color:#f1c875;color:#fff1ce;}
body.dr-fantasy #dr-h9-zone-info .dr-h10-title-actions{flex-wrap:wrap;justify-content:flex-end;}
body.dr-fantasy.dr-h8-fullscreen #dr-h10-4-restore{top:77px;left:22px;max-width:calc(100vw - 44px);}
@media(max-width:720px){
  body.dr-fantasy #dr-h10-4-restore{
    top:calc(var(--dr-top-space,80px) + 63px);
    left:calc(var(--dr-left-space,13px) + 9px);
  }
  body.dr-fantasy.dr-h8-fullscreen #dr-h10-4-restore{top:108px;left:10px;max-width:calc(100vw - 20px);}
  body.dr-fantasy #dr-h9-zone-info .dr-h10-4-hide{padding:4px 6px;font-size:10px;}
}
