/* Original explorer styles are shared. All homepage layout overrides stay in this host. */
#map:has(.homap) #x5 { display: none !important; }
#map-tabs { scroll-margin-top: calc(var(--v7-top-h, 75px) + var(--v7-strip-h, 60px) + 12px); }
.homap { --duchy-explorer-sidebar-w: 360px; --exp-panel-w: 360px; --duchy-explorer-map-inset: 0px; --nav-stack: 0px; --duchy-sticky-subheader: 0px; --homap-colour: #5dd9d0; font-family: Inter, sans-serif; min-width: 0; }
.homap[data-view="settlements"] { --homap-colour: #c4a8f0; }
.homap[data-view="beaches"] { --homap-colour: #5baeff; }
.homap[data-view="walks"] { --homap-colour: #5ed991; }
.homap [hidden] { display: none !important; }
.homap h2, .homap h3, .homap h4 { font-family: Inter, sans-serif; font-weight: 800; text-transform: none; letter-spacing: normal; }
.homap .walks-result__name, .homap .beaches-result__name, .homap .walks-explorer-quick-name, .homap .walks-explorer-detail__title { font-weight: 800; text-transform: none; letter-spacing: normal; }
.homap button, .homap input, .homap a { font-family: inherit; }
.homap .screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.homap button, .homap-actions a { min-height: 44px; }
.homap-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 0; }
.homap-toolbar p { flex: 1 1 280px; margin: 0; }
.homap-toolbar button, .homap-actions button, .homap-actions a { border: 2px solid #0b0d12; border-radius: 8px; padding: 10px 14px; background: white; color: #0b0d12; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.homap button:focus-visible, .homap a:focus-visible, .homap input:focus-visible { outline: 3px solid #0b0d12; outline-offset: 3px; }
.homap .home-explorer-pane > .duchy-explorer-wrap { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); height: 640px !important; max-height: 640px !important; min-height: 0 !important; width: 100% !important; margin: 0 !important; border: 2px solid #0b0d12; border-radius: 16px; overflow: hidden; align-items: stretch !important; }
.homap .duchy-explorer-canvas { position: relative !important; top: auto !important; left: auto !important; transform: none !important; width: 100% !important; height: 100% !important; max-height: none !important; min-height: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.homap #explorer-map, .homap #settlements-map, .homap #beaches-explorer-map, .homap #walks-explorer-map { width: 100% !important; height: 100% !important; min-height: 0 !important; }
.homap .duchy-explorer-sidebar, .homap .explorer-map-panel { position: relative !important; inset: auto !important; transform: none !important; width: 100% !important; height: 100% !important; max-height: 100% !important; min-height: 0 !important; display: flex !important; flex-direction: column !important; border: 0 !important; border-left: 2px solid #0b0d12 !important; border-radius: 0 !important; overflow: hidden !important; box-shadow: none !important; }
.homap .duchy-explorer-sidebar__body, .homap .explorer-map-panel__body, .homap .settlements-map-sidebar__body, .homap .beaches-explorer-sidebar__body, .homap .walks-explorer-sidebar__body { display: block !important; overflow-y: auto !important; flex: 1 1 auto !important; min-height: 0 !important; max-height: none !important; }
.homap .home-explorer-pane[data-home-map-pane="parishes"] > .duchy-explorer-wrap { display: block !important; }
.homap .explorer-map-shell { height: 100% !important; display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); }
.homap .explorer-map-stage { position: relative !important; min-width: 0; height: 100% !important; }
.homap .explorer-map-controls--chips-only { display: none; }
.homap .explorer-panel__head, .homap .duchy-explorer-sidebar__head { background: var(--homap-colour); padding: 16px; }
.homap .duchy-explorer-float, .homap .walks-hub__float { pointer-events: none; }
.homap .homap-next { padding: 18px; margin-top: 16px; border: 2px solid #0b0d12; border-radius: 12px; border-top: 6px solid var(--homap-colour); background: white; }
.homap-next h3 { margin: 4px 0; font-size: 22px; }
.homap-next p { margin: 8px 0 12px; }
.homap .duchy-explorer-sidebar .homap-next, .homap .explorer-map-panel .homap-next { margin: 0; padding: 12px; border: 0; border-bottom: 1px solid #d9dee6; border-radius: 0; flex: 0 0 auto; }
.homap .homap-next h3 { font-size: 18px; }
.homap .homap-next p, .homap .homap-eyebrow { font-size: 13px; line-height: 1.4; }
.homap .homap-actions { gap: 6px; }
.homap .homap-actions > * { flex: 1 1 140px; text-align: center; padding: 8px; font-size: 14px; }
.homap #homap-food-results { max-height: 180px; overflow-y: auto; }
.homap-eyebrow { font-weight: 700; font-size: 14px; }
.homap-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.homap-actions .homap-stays { background: #ffdf40; }
.homap-actions .homap-food { background: #ff8fab; }
.homap-actions button:disabled { opacity: .55; cursor: wait; }
#homap-food-results a { display: block; padding: 12px; margin: 6px 0; border: 1px solid #d9dee6; border-radius: 8px; color: #173b48; }
.homap.is-expanded { position: fixed; inset: 0; z-index: 120; padding: 16px; background: white; overflow-y: auto; overscroll-behavior: contain; }
html.homap-expanded { overflow: hidden; }
.homap.is-expanded .home-explorer-pane > .duchy-explorer-wrap { height: calc(100dvh - 110px) !important; max-height: none !important; }
.homap.is-expanded #map-tabs { position: static; }
/* Beach cards flow within the rail, never inside a second scrolling list. */
#home-original-maps #beaches-results { max-height: none; overflow: visible; padding-right: 0; }
#home-original-maps .homap-beach-filters { margin-bottom: 12px; border-bottom: 1px solid #d9dee6; padding-bottom: 10px; }
#home-original-maps .homap-beach-filters > summary { min-height: 44px; display: list-item; align-content: center; cursor: pointer; font-weight: 700; color: #173b48; }
#home-original-maps .homap-beach-filters > summary:focus-visible { outline: 3px solid #0b0d12; outline-offset: 3px; }
#home-original-maps .homap-beach-filters .beaches-explorer-legend { margin-top: 8px; }
#home-original-maps .homap-beach-filters .beaches-explorer-type-filters { margin-top: 12px; }
#home-original-maps .beaches-explorer-results-hint { display: none; }
#home-original-maps .homap-map-options { margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #d9dee6; }
#home-original-maps .homap-map-options > summary { min-height: 44px; align-content: center; cursor: pointer; font-weight: 700; }
#home-original-maps .homap-map-options > summary:focus-visible { outline: 3px solid #0b0d12; outline-offset: 3px; }
#home-original-maps .homap-map-options .settlements-map-type-filters { margin-top: 10px; }
#home-original-maps .homap-places-heading { margin: 0 0 10px; font-size: 16px; }
#home-original-maps .homap-place-list { display: grid; gap: 8px; }
#home-original-maps .homap-place-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 1px solid #d9dee6; border-radius: 10px; background: white; color: #173b48; text-align: left; cursor: pointer; }
#home-original-maps .homap-place-row:hover { background: #e5f8f5; border-color: #148b84; }
#home-original-maps .homap-place-row__name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; }
#home-original-maps .homap-place-row__type { flex: none; padding: 3px 6px; border-radius: 5px; background: #e5f8f5; font-size: 12px; }
/* Dedicated detail pages grow with the document. The homepage instead owns a
   bounded column, so scroll the whole rail rather than clipping its body. */
@media (min-width: 1024px) {
 #home-original-maps #beaches-explorer-sidebar > .duchy-explorer-sidebar__head { position: sticky; top: 0; z-index: 3; }
 #home-original-maps #explorer-map-panel > .explorer-panel__head { position: sticky; top: 0; z-index: 3; }
 #home-original-maps .duchy-explorer-sidebar,
 #home-original-maps .explorer-map-panel {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
 }
 #home-original-maps .duchy-explorer-sidebar__body,
 #home-original-maps .explorer-map-panel__body,
 #home-original-maps .settlements-map-sidebar__body,
 #home-original-maps .beaches-explorer-sidebar__body,
 #home-original-maps .walks-explorer-sidebar__body {
  flex: 0 0 auto !important;
  height: auto !important;
  overflow: visible !important;
 }
 #home-original-maps .duchy-explorer-sidebar > .duchy-explorer-sidebar__head,
 #home-original-maps .explorer-map-panel > .explorer-panel__head {
  flex: 0 0 auto;
 }
 #home-original-maps.is-expanded {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
 }
 #home-original-maps.is-expanded > #map-tabs,
 #home-original-maps.is-expanded > .homap-toolbar { flex: 0 0 auto; }
 #home-original-maps.is-expanded > #home-explorer-panes {
  flex: 1 1 0;
  min-height: 0;
 }
 #home-original-maps.is-expanded .home-explorer-pane,
 #home-original-maps.is-expanded .home-explorer-pane > .duchy-explorer-wrap {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
 }
}
@media (max-width: 1023px) {
 .homap .home-explorer-pane > .duchy-explorer-wrap { display: block !important; height: auto !important; max-height: none !important; overflow: visible !important; }
 .homap .duchy-explorer-canvas { height: 340px !important; overflow: hidden; border-radius: 14px 14px 0 0 !important; }
 .homap .explorer-map-shell { height: auto !important; display: block !important; }
 .homap .explorer-map-stage { height: 340px !important; }
 .homap .home-explorer-pane[data-home-map-pane="parishes"] .explorer-map-canvas { height: auto !important; overflow: visible; }
 .homap .duchy-explorer-sidebar, .homap .explorer-map-panel { height: 460px !important; max-height: 460px !important; border-left: 0 !important; border-top: 2px solid #0b0d12 !important; border-radius: 0 0 14px 14px !important; }
 .homap .duchy-explorer-sidebar.is-showing-detail { height: auto !important; max-height: none !important; }
 .homap .duchy-explorer-sidebar.is-showing-detail > .duchy-explorer-sidebar__body { overflow: visible !important; flex: none !important; }
 #map:has(.homap) .xtab { white-space: normal; font-size: 12px; line-height: 1.3; padding: 10px 5px; }
 .homap .duchy-explorer-sidebar::before, .homap .explorer-map-panel::before, .homap .duchy-explorer-grip { display: none !important; }
 .homap.is-expanded { padding: 8px; }
 .homap.is-expanded .home-explorer-pane > .duchy-explorer-wrap { height: auto !important; }
 .homap.is-expanded .duchy-explorer-canvas, .homap.is-expanded .explorer-map-stage { height: 52dvh !important; }
 .homap.is-expanded .home-explorer-pane[data-home-map-pane="parishes"] .explorer-map-canvas { height: auto !important; }
 .homap-next { scroll-margin-top: 160px; }
 .homap-actions > * { flex: 1 1 140px; text-align: center; }
}

/* Phones and tablets, homepage maps only (Gavin, 13 Oct 2026: "the chrome section (black zoom etc) and
 * the sat/map need fixing so the site looks cleaner"). The dark centred bar becomes a slim white stack
 * bottom right in the site's outline style; Map/Satellite sits top left; the credits line is smaller.
 * Cousin Jack no longer sits over the homepage maps, so the corner is free. */
@media (max-width: 900px) {
	#home-original-maps .duchy-map-chrome-stack,
	#home-original-maps .hub-explorer-gmaps-stack {
		left: auto !important;
		right: 10px !important;
		top: auto !important;
		bottom: 26px !important;
		transform: none !important;
		flex-direction: column !important;
		padding: 0 !important;
		gap: 0 !important;
		background: #fff !important;
		border: 2px solid #13294b !important;
		border-radius: 12px !important;
		box-shadow: 2px 2px 0 #13294b !important;
		overflow: hidden;
	}

	#home-original-maps .hub-explorer-gmaps-stack__btn {
		width: 36px !important;
		height: 36px !important;
		min-width: 36px !important;
		min-height: 36px !important;
		color: #13294b !important;
		background: #fff !important;
		border-radius: 0 !important;
	}

	#home-original-maps .hub-explorer-gmaps-stack__btn + .hub-explorer-gmaps-stack__btn {
		border-top: 1px solid #dfe5ee;
	}

	#home-original-maps .hub-explorer-gmaps-stack__btn:hover,
	#home-original-maps .hub-explorer-gmaps-stack__btn:active {
		background: #fff3cc !important;
	}

	#home-original-maps .hub-explorer-gmaps-stack__btn svg {
		width: 16px !important;
		height: 16px !important;
	}

	#home-original-maps .duchy-map-chrome-layers,
	#home-original-maps .hub-explorer-layers-btn {
		left: 10px !important;
		top: auto !important;
		bottom: 26px !important;
		width: 44px !important;
		height: 44px !important;
		border: 2px solid #13294b !important;
		border-radius: 10px !important;
		box-shadow: 2px 2px 0 #13294b !important;
		overflow: hidden;
	}

	#home-original-maps .leaflet-control-attribution {
		font-size: 9px !important;
		line-height: 1.3;
		max-width: 75%;
		padding: 0 4px;
	}
}
