/*
 * KP Grundramme 0.3.11 – oprydningsversion
 *
 * Princip:
 *   Astra ejer struktur, header/footer, sidetitler og responsive grundlayout.
 *   KP Grundramme tilføjer kun KPhoto-fællesregler.
 *
 * Bevidst fjernet fra 0.2.x:
 *   - Fotoarkiv-specifik H1/margin/padding
 *   - mobil-logo-crop og særskilt mobil-headerhøjde
 *   - hamburger-gradient og mobilmenu-specialregler
 *   - gentagne footer-overrides fra diagnoseforløbet
 */

/* Den tidligere godkendte KPhoto-indholdsbredde. */
.ast-container {
  width: 80vw !important;
  max-width: 3600px !important;
}

@media (max-width: 1200px) and (min-width: 768px) {
  .ast-container {
    width: 85vw !important;
    max-width: none !important;
  }
}

@media (max-width: 767px) {
  .ast-container {
    width: 85vw !important;
    max-width: none !important;
  }
}

/* KPhoto-identitet – ikke sidespecifikt layout. */
body.kp-grundramme #primary {
  font-family: Helvetica, Arial, sans-serif;
  color: black;
}

body.kp-grundramme a[href],
body.kp-grundramme button:not(:disabled),
body.kp-grundramme [role="button"]:not([aria-disabled="true"]),
body.kp-grundramme .fa-card-link {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
body.kp-grundramme :focus:not(:focus-visible) { outline: none; }
body.kp-grundramme :focus-visible:not(.envirabox-thumbs, .envirabox-thumbs *) {
  outline: 3px solid #adffff!important;
  outline-offset: 3px!important;
  box-shadow: none!important;
}

.menu-icon {
  width: 16px;
  height: 16px;
  margin-right: 5px;
  display: inline-block;
  vertical-align: middle;
}

/* Godkendt fælles luft mellem KPhoto-logo og områdetitel. */
body.kp-grundramme #masthead .site-logo-img,
body.kp-grundramme #masthead .custom-logo-link {
  margin-right: 28px !important;
}

/* Desktop sticky som tidligere; Astra styrer tablet/mobil. */
body.kp-grundramme #masthead {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}
body.kp-grundramme .ast-header-breadcrumb {
  position: sticky;
  top: 102px;
  left: 0;
  width: 100%;
}
@media (max-width: 1024px) {
  body.kp-grundramme #masthead,
  body.kp-grundramme .ast-header-breadcrumb {
    position: static;
  }
}

/* Kompakt fælles footer uden at overtage Astras layoutmodel. */
body.kp-grundramme .site-footer .site-below-footer-wrap,
body.kp-grundramme .site-footer .ast-builder-grid-row-container-inner,
body.kp-grundramme .site-footer .ast-builder-grid-row {
  min-height: 36px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
body.kp-grundramme .site-footer .ast-builder-grid-row {
  align-items: center !important;
}
body.kp-grundramme .site-footer .site-footer-section,
body.kp-grundramme .site-footer .ast-footer-copyright {
  text-align: center !important;
}
body.kp-grundramme .site-footer .ast-footer-copyright,
body.kp-grundramme .site-footer p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Tablet: den rettelse fra 0.2.2, der fjernede scroll/footer-problemet. */
@media (max-width: 1200px) and (min-width: 768px) {
  body.kp-grundramme .site-footer .site-below-footer-wrap,
  body.kp-grundramme .site-footer .ast-builder-grid-row-container-inner,
  body.kp-grundramme .site-footer .ast-builder-grid-row {
    min-height: 0 !important;
  }
}

body.kp-grundramme.kp-gr-footer-flow {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
body.kp-grundramme.kp-gr-footer-flow #page {
  display: flex !important;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 100vh;
  min-height: var(--kp-gr-visible-height, 100dvh) !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
body.kp-grundramme.kp-gr-footer-flow #page > #content {
  flex: 1 0 auto;
  min-height: 0;
}
body.kp-grundramme.kp-gr-footer-flow #page > #colophon {
  flex: 0 0 auto;
  margin-top: auto !important;
  margin-bottom: 0 !important;
}

/*
 * Telefon bruges kun i landscape (Lightbox undtaget).
 * Brug Astras eksisterende desktop-header i stedet for en særskilt hamburger-header.
 * Ingen logo-crop, H1-override eller Fotoarkiv-specialafstand her.
 */
@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  body.kp-grundramme #ast-mobile-header {
    display: none !important;
  }
  body.kp-grundramme #ast-desktop-header {
    display: block !important;
  }

  /* Header og footer skal være gennemgående over viewporten. */
  body.kp-grundramme #masthead,
  body.kp-grundramme #colophon {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
  }
}

/* Telefon-landscape har ingen mobil/off-canvas-menu. */
@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  body.kp-grundramme .ast-mobile-popup-drawer,
  body.kp-grundramme .ast-mobile-popup-drawer.active {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/*
 * 0.3.5 – headeroptimering på telefon i landscape.
 * Logoets størrelse fra 0.3.4 bevares. Den faktiske Astra header-row får
 * en fast kompakt højde, og alle tre headersektioner centreres vertikalt.
 */
@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  body.kp-grundramme #masthead .ast-primary-header-bar,
  body.kp-grundramme #masthead .site-primary-header-wrap,
  body.kp-grundramme #masthead .site-primary-header-wrap > .ast-builder-grid-row {
    height: 68px !important;
    min-height: 68px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body.kp-grundramme #masthead .site-primary-header-wrap > .ast-builder-grid-row {
    align-items: center !important;
  }

  body.kp-grundramme #masthead .site-header-section {
    height: 68px !important;
    min-height: 68px !important;
    display: flex !important;
    align-items: center !important;
  }

  body.kp-grundramme #masthead .ast-builder-menu,
  body.kp-grundramme #masthead .main-header-menu,
  body.kp-grundramme #masthead .site-header-primary-section-left,
  body.kp-grundramme #masthead .site-header-primary-section-center,
  body.kp-grundramme #masthead .site-header-primary-section-right {
    align-items: center !important;
  }

  body.kp-grundramme #masthead .custom-logo-link,
  body.kp-grundramme #masthead .site-logo-img {
    line-height: 1 !important;
  }

  body.kp-grundramme #masthead .custom-logo,
  body.kp-grundramme #masthead .site-logo-img img {
    width: auto !important;
    max-width: none !important;
    max-height: 54px !important;
    object-fit: contain !important;
  }
}


/*
 * 0.3.7 – finpudsning af øverste ramme på telefon i landscape.
 * 0.3.5-headerens 68 px højde bevares.
 */
@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  /* En let lodret beskæring af logoets eksisterende 54 px billede. */
  body.kp-grundramme #masthead .custom-logo-link {
    height: 50px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
  }

  body.kp-grundramme #masthead .custom-logo,
  body.kp-grundramme #masthead .site-logo-img img {
    height: 54px !important;
    max-height: 54px !important;
    width: auto !important;
    flex: 0 0 auto;
  }

  /* Områdenavnet (Arkiv/Galleri) har optisk centrum lidt lavt. */
  body.kp-grundramme #masthead .site-title {
    transform: translateY(-3px) !important;
  }

  /* Breadcrumb-båndet går gennem hele viewporten, mens teksten følger containeren. */
  body.kp-grundramme .ast-header-breadcrumb {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    min-height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body.kp-grundramme .ast-header-breadcrumb .ast-container {
    min-height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-wrapper,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.2 !important;
  }
}


/*
 * 0.3.7 – mobil-landscape: lavere breadcrumb og lidt tættere Primary Menu.
 * Den godkendte headerhøjde, logo-størrelse og vertikale centrering fra 0.3.6
 * ændres ikke.
 */
@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  /* Astra lægger luft på flere breadcrumb-lag; nulstil dem samlet. */
  body.kp-grundramme .ast-header-breadcrumb,
  body.kp-grundramme .ast-header-breadcrumb .ast-container,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-wrapper,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-inner {
    min-height: 28px !important;
    height: 28px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
  }

  body.kp-grundramme .ast-header-breadcrumb .ast-container,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-wrapper,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-inner {
    display: flex !important;
    align-items: center !important;
  }

  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.1 !important;
  }

  /* Lidt mindre vandret luft, så der senere er plads til Galleri. */
  body.kp-grundramme #ast-desktop-header .main-header-menu > .menu-item > .menu-link {
    padding-left: 9px !important;
    padding-right: 9px !important;
  }
}


/*
 * 0.3.10 – breadcrumb-finish på telefon i landscape.
 * Bevar 0.3.7-højden og menu-spacing, men lad kun Astras yderste
 * breadcrumb-bånd eje baggrunden. Indre lag er transparente og hele
 * breadcrumb-kæden centreres lodret i de 28 px.
 */
@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  body.kp-grundramme .ast-header-breadcrumb .ast-container,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-wrapper,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-inner,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
  }

  body.kp-grundramme .ast-header-breadcrumb .ast-container,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-wrapper,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-inner,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs {
    height: 28px !important;
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs {
    line-height: 28px !important;
  }
}


/*
 * 0.3.10 – kontrolleret breadcrumb-finjustering fra 0.3.8-baseline.
 * Side-/containerbredder røres ikke. Gradient og menu-spacing bevares.
 * Kun mobil-landscape: 26 px breadcrumb, tynde afgrænsninger og reel
 * vertikal centrering af breadcrumb-indholdet.
 */
@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  /* Øverste sorte afgrænsning kommer fra headerens nederste kant. */
  body.kp-grundramme .ast-primary-header-bar {
    border-bottom-width: 1px !important;
  }

  /* Nederste afgrænsning tilhører breadcrumb-båndet. */
  body.kp-grundramme .ast-header-breadcrumb {
    height: 26px !important;
    min-height: 26px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-bottom-width: 1px !important;
    box-sizing: border-box !important;
  }

  body.kp-grundramme .ast-header-breadcrumb .ast-container,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-wrapper,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-inner,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs {
    height: 26px !important;
    min-height: 26px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  /* Lad flex centrere teksten; undgå 28 px line-height fra 0.3.8. */
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs a,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs span {
    line-height: 1.2 !important;
  }
}

/*
 * 0.3.11 – mobil-landscape: breadcrumb-båndet reduceres moderat fra
 * 26 px til 22 px. Header, indholds-/containerbredde, breadcrumb-font,
 * Fotoarkiv-H1 og footer er uændrede.
 */
@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  body.kp-grundramme .ast-header-breadcrumb,
  body.kp-grundramme .ast-header-breadcrumb .ast-container,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-wrapper,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs-inner,
  body.kp-grundramme .ast-header-breadcrumb .ast-breadcrumbs {
    height: 22px !important;
    min-height: 22px !important;
  }
}


/*
 * 0.3.12 FORSØG – mobil-landscape: sticky KPhoto-topzone.
 * Header (68 px) og breadcrumb (22 px) fastholdes. Tablet/desktop er urørt.
 */
@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  body.kp-grundramme #masthead {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
  }

  body.kp-grundramme .ast-header-breadcrumb {
    position: sticky !important;
    top: 68px !important;
    z-index: 9998 !important;
  }
}

/*
 * 0.3.13 FORSØG – mobil-landscape: kompakt footer.
 * Footeren forbliver viewport-bred; kun dens vertikale højde/padding reduceres.
 */
@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  body.kp-grundramme .site-footer .site-below-footer-wrap,
  body.kp-grundramme .site-footer .ast-builder-grid-row-container-inner,
  body.kp-grundramme .site-footer .ast-builder-grid-row {
    height: 32px !important;
    min-height: 32px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  body.kp-grundramme .site-footer .ast-builder-grid-row,
  body.kp-grundramme .site-footer .site-footer-section {
    align-items: center !important;
  }
  body.kp-grundramme .site-footer .site-footer-section,
  body.kp-grundramme .site-footer .ast-footer-copyright,
  body.kp-grundramme .site-footer .ast-footer-copyright p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.15 !important;
  }
}

/*
 * 0.3.14 – fælles breadcrumb-baggrund på alle enheder.
 * Helt opak mørkegrå gradient: lysest til venstre, mørkest til højre.
 * Højde, typografi, placering og øvrig breadcrumb-geometri røres ikke.
 */
body.kp-grundramme .ast-header-breadcrumb {
  background-color: #4A4A4A !important;
  background-image: none !important;
}


/*
 * 0.3.16 – breadcrumb-gradient finjusteret.
 * Venstre slutværdi bevares; højre side lysnes til ca. 80 % sort (#4A4A4A).
 * Baggrunden er fortsat helt opak; ingen ændring af geometri.
 */

/*
 * 0.3.17 – breadcrumb-gradient: tydeligere, fortsat helt opak.
 * Venstre #707070 → højre #4A4A4A. Ingen geometriske ændringer.
 */

/* 0.3.18 – breadcrumb-gradient: afdæmpet kontrast, helt opak.
 * Venstre #5C5C5C → højre #3F3F3F. Ingen geometriske ændringer.
 */


/* 0.3.19 – breadcrumb: ensfarvet, helt opak mørkegrå (#4A4A4A).
 * Ingen ændring af geometri.
 */


/*
 * 0.3.32 – KPhotos egen "Gå til toppen".
 * Rent fixed overlay: påvirker ikke #page, content eller footer-flow.
 * Endeligt ikon kan senere standardiseres sammen med KPhotos øvrige symboler.
 */
body.kp-grundramme .kp-scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10020;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(45, 45, 45, 0.82);
  color: #fff;
  font: inherit;
  font-size: 22px;
  line-height: 38px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms linear;
}

body.kp-grundramme .kp-scroll-top.is-visible {
  opacity: 0.82;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

body.kp-grundramme .kp-scroll-top:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  body.kp-grundramme .kp-scroll-top {
    right: 14px;
    bottom: 14px;
    width: 34px;
    height: 34px;
    font-size: 20px;
    line-height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.kp-grundramme .kp-scroll-top { transition: none; }
}

/* 0.3.33: fælles lokale symboler, touchmål og hjælp. */
body.kp-grundramme #ast-scroll-top { display:none !important; }
body.kp-grundramme :is(#masthead,.ast-header-breadcrumb,#primary,.kph-screen,.kpg-screen,.kp-gr-tools) {
  -webkit-user-select:none; user-select:none; -webkit-touch-callout:none;
}
body.kp-grundramme :is(input,textarea,select,[contenteditable="true"]) { -webkit-user-select:text;user-select:text;-webkit-touch-callout:default; }
body.kp-grundramme img { -webkit-user-drag:none; }
.kp-gr-icon { width:20px;height:20px;display:inline-block;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none; }
body.kp-grundramme .kp-gr-symbol { display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:8px;border:0;background:transparent;color:inherit;line-height:1;cursor:pointer; }
body.kp-grundramme [data-kp-history][aria-disabled="true"] { opacity:.32;cursor:default;filter:grayscale(1); }
body.kp-grundramme .kp-gr-symbol[hidden] { display:none!important; }
body.kp-grundramme .kp-gr-symbol:active:not([aria-disabled="true"]) { opacity:.6; }
.kp-gr-tools { position:fixed;left:max(12px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom));z-index:2147483100;display:flex;border-radius:8px;background:rgba(45,45,45,.82);color:white; }
.kp-gr-dialog { position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(440px,90vw);max-height:85dvh;overflow:auto;padding:24px;color:#fff;background:#292929;border:1px solid #777;border-radius:12px;font:16px/1.5 Helvetica,Arial,sans-serif; }
.kp-gr-dialog::backdrop { background:#0009; }
.kp-gr-dialog h2 { color:inherit;font:600 21px Helvetica,Arial,sans-serif;margin:0 44px 22px 0; }
.kp-gr-dialog .kp-gr-close { position:absolute;right:6px;top:6px; }
.kp-gr-dialog dl { display:grid;grid-template-columns:auto 1fr;gap:12px 20px;margin:0; }
.kp-gr-dialog dd { margin:0; }.kp-gr-dialog dt { font-weight:bold; }
.kp-gr-dialog input { margin-right:10px; }.kp-gr-dialog p { margin:18px 0 0; }
.kp-gr-tooltip { position:fixed;z-index:2147483647;max-width:calc(100vw - 16px);padding:6px 10px;border-radius:5px;background:#222;color:white;font:14px/1.4 Helvetica,Arial,sans-serif;pointer-events:none; }
.kp-gr-tooltip[hidden] { display:none; }
@media(hover:hover) { body.kp-grundramme .kp-gr-symbol:hover:not([aria-disabled="true"]) { background:#8882; } }
@media(max-width:767px),(max-height:600px) { .kp-gr-icon { width:18px;height:18px; } }
@media(pointer:coarse) { body.kp-grundramme .kp-scroll-top { width:44px;height:44px;line-height:44px; } }

body.kpg-plan-page .kp-scroll-top { z-index:100010; }

/* 0.3.34: only one fullscreen icon; shared SVG display must not reveal both. */
body.kp-grundramme .kph-fullscreen .kph-icon-contract { display:none!important; }
body.kp-grundramme .kph-fullscreen .kph-icon-expand { display:block!important; }
body.kp-grundramme .kph-fullscreen[data-active="true"] .kph-icon-expand { display:none!important; }
body.kp-grundramme .kph-fullscreen[data-active="true"] .kph-icon-contract { display:block!important; }
/* Replace Home's separate pseudo-element tooltip with the shared tooltip. */
body.kp-grundramme .kph-fullscreen::after { content:none!important;display:none!important; }
body.kp-grundramme .kp-gr-tooltip { background:#333;color:#fff;border:0;box-shadow:none;font:400 14px/1.4 Helvetica,Arial,sans-serif;text-shadow:none; }
body.kp-grundramme .kp-gr-dialog,
body.kp-grundramme .kp-gr-dialog :is(h2,p,label,dt,dd) { color:#fff;background:transparent;text-shadow:none;font-family:Helvetica,Arial,sans-serif; }
body.kp-grundramme .kp-gr-dialog { background:#333;border:0; }
body.kp-grundramme .kp-gr-dialog label { font-weight:400;line-height:1.5; }
body.kp-grundramme .kp-gr-dialog .kp-gr-reset { background:#555;color:#fff;border:1px solid #888;border-radius:5px;padding:10px 14px;margin-top:18px;font:400 15px/1.4 Helvetica,Arial,sans-serif;cursor:pointer; }
body.kp-grundramme .kp-gr-dialog input[type="checkbox"] { accent-color:#fff; }

/* 0.3.35: settings completed; retain the position for future PWA setup. */
body.kp-grundramme .kp-gr-tools .kp-gr-symbol:disabled {
  opacity:.32;cursor:default;background:transparent;filter:grayscale(1);
}

/* 0.3.36: quieter assistance controls; clear focus/hover feedback remains. */
body.kp-grundramme .kp-gr-tools { background:rgba(65,65,65,.42);color:rgba(255,255,255,.65); }
body.kp-grundramme .kp-gr-tools[hidden] { display:none!important; }
body.kp-grundramme .kp-gr-tools .kp-gr-symbol:focus-visible { color:#fff; }
body.kp-grundramme .kph-fullscreen { background:rgba(65,65,65,.3); }
body.kp-grundramme .kph-fullscreen svg { stroke:rgba(255,255,255,.65); }
body.kp-grundramme .kp-scroll-top { color:#adffff;background:rgba(65,65,65,.42);border-radius:6px; }
body.kp-grundramme .kp-scroll-top.is-visible { opacity:.72; }
body.kp-grundramme .kp-scroll-top:focus-visible { opacity:1; }
.kp-gr-help-content hr { height:0;border:0;border-top:1px solid rgba(255,255,255,.3);margin:20px 0; }
@media(hover:hover) {
  body.kp-grundramme .kp-gr-tools .kp-gr-symbol:hover:not(:disabled) { color:#fff; }
  body.kp-grundramme .kp-scroll-top.is-visible:hover { opacity:1; }
}

/* 0.3.37: keep the short top tooltip on one line. */
body.kp-grundramme .kp-gr-tooltip[data-kp-top="true"] { white-space:nowrap; }

/* 0.3.38: Home information, keyboard focus, and help inside Envira. */
body.kp-grundramme .kp-gr-info-launcher {
  position:static;transform:none;background:transparent;color:inherit;
}
body.kp-grundramme .kp-gr-info-launcher:focus-visible { color:#fff; }
body.kp-grundramme .kp-gr-info-dialog { width:min(430px,90vw);padding:0;overflow:hidden; }
body.kp-grundramme .kp-gr-info-dialog h2 { margin-left:20px; }
body.kp-grundramme .kp-gr-info-dialog nav { display:flex;justify-content:center;align-items:center;gap:32px;padding:22px 54px 22px 18px;background:#888; }
body.kp-grundramme .kp-gr-info-dialog nav a { color:#adffff;text-decoration:none;white-space:nowrap; }
body.kp-grundramme .kp-gr-info-dialog nav a:hover { text-decoration:underline; }
body.kp-grundramme .kp-gr-info-dialog .kp-gr-info-footer { padding:4px 12px;text-align:center;background:#ccc; }
body.kp-grundramme .kp-gr-info-dialog .kp-gr-info-footer p { color:inherit;font:inherit;line-height:1.3;margin:0; }
body.kp-grundramme .kp-gr-info-footer .ast-footer-copyright { display:block!important; }
/* Class-based focus survives plugin styles that suppress :focus outlines. */
body.kp-grundramme .kp-gr-key-focus {
  outline:3px solid #adffff!important;outline-offset:3px!important;
  box-shadow:none!important;
}
body.kp-grundramme .kp-gr-focus-card {
  outline:3px solid #adffff!important;outline-offset:-3px!important;
  box-shadow:none!important;
}
body.kp-grundramme .envirabox-container .kp-gr-lightbox-tools {
  display:flex!important;position:fixed!important;z-index:2147483647!important;
  opacity:1!important;visibility:visible!important;pointer-events:auto!important;
}
body.kp-grundramme .envirabox-container .kp-gr-lightbox-tools[hidden] { display:none!important; }
body.kp-grundramme .envirabox-container .kp-gr-lightbox-tools .kp-gr-symbol { color:rgba(255,255,255,.75); }

/* 0.3.39: focus follows the photo, not the padded masonry cell. */
body.kp-grundramme .envira-gallery-item img.kp-gr-focus-image {
  outline:3px solid #adffff!important;outline-offset:-3px!important;box-shadow:none!important;
}
body.kp-grundramme .envira-gallery-item a:has(img.kp-gr-focus-image) { outline:none!important;box-shadow:none!important; }
body.kp-grundramme #masthead span.custom-logo-link { cursor:default; }
/* The non-linked section title must retain KPhoto cyan, not Astra's text grey. */
body.kp-grundramme #masthead .site-title,
body.kp-grundramme #masthead .site-title > span { color:#adffff!important; }
body.kp-grundramme #masthead a.kp-gr-home-control { color:#000!important; }
body.kp-grundramme #masthead a.kp-gr-home-control:hover,
body.kp-grundramme #masthead a.kp-gr-home-control:focus-visible { color:var(--kp-gr-header-focus-color,#efc34c)!important; }
/* Share the existing KPhoto gold with all active header symbols. */
body.kp-grundramme #masthead { --kp-gr-header-focus-color:#efc34c; }
body.kp-grundramme #masthead [data-kp-history]:not([aria-disabled="true"]):hover,
body.kp-grundramme #masthead [data-kp-history]:not([aria-disabled="true"]):focus-visible {
  color:var(--kp-gr-header-focus-color)!important;
}
/* One focus ring: black in the header, cyan elsewhere. Icon colour is separate. */
body.kp-grundramme #masthead :focus-visible,
body.kp-grundramme #masthead .kp-gr-key-focus { position:relative;outline:none!important;box-shadow:none!important; }
/* Compact visual ring; preserve the full-height click/touch target. */
body.kp-grundramme #masthead :focus-visible::before,
body.kp-grundramme #masthead .kp-gr-key-focus::before {
  content:"";position:absolute;box-sizing:border-box;pointer-events:none;
  left:2px;right:2px;top:50%;height:32px;max-height:100%;
  transform:translateY(-50%);border:2px solid #000;border-radius:3px;
  background:transparent;
}
body.kp-grundramme .kp-gr-focus-card :focus,
body.kp-grundramme .kp-gr-focus-card :focus-visible { outline:none!important;box-shadow:none!important; }
/* Restored focus after closing a dialog is logical, not a request for a ring. */
html.kp-gr-focus-idle body.kp-grundramme :focus:not(.envirabox-thumbs *) {
  outline:none!important;box-shadow:none!important;
}
html.kp-gr-focus-idle body.kp-grundramme #masthead :focus::before { content:none!important; }
body.kp-grundramme .kp-gr-dialog .kp-gr-tooltip {
  color:#fff!important;background:#333!important;border:0!important;
  box-shadow:none!important;font:400 14px/1.4 Helvetica,Arial,sans-serif!important;
}
/* Shared popup surfaces: opaque title band, translucent grey content. */
body.kp-grundramme .kp-gr-dialog { padding:0;background:rgba(51,51,51,.8); }
body.kp-grundramme .kp-gr-dialog-header {
  position:relative;min-height:56px;box-sizing:border-box;
  padding:16px 60px 16px 24px;
  background:linear-gradient(to bottom right,#454545 0%,#737373 100%);
  border-radius:12px 12px 0 0;
}
body.kp-grundramme .kp-gr-dialog-header h2 { margin:0;line-height:1.25; }
body.kp-grundramme .kp-gr-dialog .kp-gr-help-content { padding:24px; }
body.kp-grundramme .kp-gr-dialog > p { margin:0;padding:20px 24px 24px; }
body.kp-grundramme .kp-gr-dialog > label { display:block;padding:24px 24px 0; }
/* Info retains its deliberately title-free menu and existing footer. */
body.kp-grundramme .kp-gr-info-dialog .kp-gr-dialog-header {
  min-height:0;height:0;padding:0;background:none;z-index:1;
}
body.kp-grundramme .kp-gr-info-dialog nav { background:rgba(51,51,51,.8)!important; }
body.kp-grundramme .kp-gr-info-dialog { background:transparent; }
/* Envira can focus a thumbnail when opening by Enter. Its active image border
   already indicates the selection; do not add a clipped outer focus outline. */
body.kp-grundramme .envirabox-thumbs:focus,
body.kp-grundramme .envirabox-thumbs :focus { outline:none!important;box-shadow:none!important; }
body.kp-grundramme .kp-gr-hover-help {
  position:fixed;inset:auto;margin:0;z-index:2147483647;
  width:min(440px,calc(100vw - 16px));max-height:calc(100dvh - 24px);overflow:auto;
  border:0;border-radius:12px;box-shadow:0 8px 28px #0005;
}
body.kp-grundramme .envirabox-container .kp-gr-tooltip {
  color:#fff!important;background:#333!important;border:0!important;
  font:400 14px/1.4 Helvetica,Arial,sans-serif!important;text-shadow:none!important;
}

/* 0.3.53: Tablet uses one persistent, horizontal header in both orientations.
 * CSS acts before the deferred script and also while Astra handles rotation.
 */
@media (min-width: 600px) and (min-height: 601px) and (any-pointer: coarse) {
  body.kp-grundramme #ast-mobile-header,
  body.kp-grundramme .ast-mobile-popup-drawer,
  body.kp-grundramme #masthead .ast-button-wrap {
    display: none !important;
  }
  body.kp-grundramme #ast-desktop-header { display: block !important; }
  body.kp-grundramme #ast-desktop-header .ast-builder-menu,
  body.kp-grundramme #ast-desktop-header .main-header-bar-navigation,
  body.kp-grundramme #ast-desktop-header .main-navigation {
    display: block !important;
    width: auto !important;
  }
  body.kp-grundramme #ast-desktop-header .main-header-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: auto !important;
    background: transparent !important;
    border: 0 !important;
  }
  body.kp-grundramme #ast-desktop-header .main-header-menu > .menu-item {
    width: auto !important;
    flex: 0 0 auto;
    border: 0 !important;
  }
  body.kp-grundramme #ast-desktop-header .main-header-menu > .menu-item > a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    white-space: nowrap;
    border: 0 !important;
    background: transparent !important;
  }
}
@media (orientation: portrait) and (min-width: 600px) and (min-height: 601px) and (any-pointer: coarse) {
  body.kp-grundramme #ast-desktop-header .site-primary-header-wrap {
    width: 96% !important;
    max-width: none !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  body.kp-grundramme #ast-desktop-header .ast-builder-grid-row {
    grid-template-columns: auto auto !important;
    column-gap: 12px !important;
  }
  body.kp-grundramme #ast-desktop-header .site-header-section { min-width: 0; }
  body.kp-grundramme #ast-desktop-header .site-header-primary-section-right { justify-content: flex-end; }
  body.kp-grundramme #ast-desktop-header .site-logo-img,
  body.kp-grundramme #ast-desktop-header .custom-logo-link { margin-right: 12px !important; }
  body.kp-grundramme #ast-desktop-header .site-title {
    font-size: clamp(24px, 3.5vw, 36px) !important;
  }
  body.kp-grundramme #ast-desktop-header .main-header-menu > .menu-item > a {
    font-size: 16px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    min-width: 36px;
  }
}
