.preview-menu-close {
  position: absolute; top: 10px; right: 12px; z-index: 5;
  background: white; color: #222; border: 1px solid #ddd; border-radius: 4px;
  font-size: 22px; width: 36px; height: 36px; cursor: pointer;
}
body.preview-menu-open { overflow: hidden }
#MENU_AS_CONTAINER_TOGGLE { left: max(0px, calc((100vw - 320px) / 2)) !important }
#MENU_AS_CONTAINER_EXPANDABLE_MENU { max-height: calc(100vh - 24px); overflow-y: auto }
.restored-embed { isolation: isolate; }
.restored-embed a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px }
.migration-instagram { display: inline-block; padding: 12px; text-decoration: underline; }
#MENU_AS_CONTAINER_EXPANDABLE_MENU li:has(> ul) [data-testid="linkElement"]:not([href]) {
  cursor: pointer;
}

#SITE_HEADER:has(.comaccess-desktop-nav) { z-index: 1000; }
.comaccess-desktop-menu { position: relative; z-index: 10; overflow: visible; }
.comaccess-desktop-nav { height: 100%; font: var(--fnt, 16px/1.4 Lato, sans-serif); color: #333; }
.comaccess-desktop-nav > ul {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-inline: 10px;
  gap: 8px;
}
.comaccess-desktop-nav li { list-style: none; }
.comaccess-desktop-nav details { position: relative; }
.comaccess-desktop-nav summary, .comaccess-desktop-nav > ul > li > a {
  display: block;
  padding: 10px 4px;
  color: inherit;
  white-space: nowrap;
}
.comaccess-desktop-nav summary { cursor: pointer; list-style: none; }
.comaccess-desktop-nav summary::-webkit-details-marker { display: none; }
.comaccess-desktop-nav details[open] > summary,
.comaccess-desktop-nav [aria-current="page"],
.comaccess-desktop-nav :is(a, summary):hover { color: #0086c9; }
.comaccess-desktop-nav details > ul {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  min-width: max-content;
  max-height: 65vh;
  overflow: auto;
  background: #fff;
  box-shadow: 0 4px 16px #0003;
  padding: 6px 0;
}
.comaccess-desktop-nav > ul > li:nth-last-child(-n+2) details > ul { left: auto; right: 0; }
.comaccess-desktop-nav details a { display: block; padding: 8px 14px; color: inherit; }
.comaccess-desktop-nav details a:is(:hover,:focus-visible) { background: #eee; }
.comaccess-desktop-nav :is(a, summary):focus-visible { outline: 2px solid #0086c9; }

/* Keep the mobile shortcuts above imported page overlays. */
body > #QUICK_ACTION_BAR {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  height: auto;
  z-index: 2147483000;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  background: white;
  pointer-events: auto;
}
body > #QUICK_ACTION_BAR #QUICK_ACTION_BARactionsContainer { min-height: 59px; pointer-events: auto; }
body > #QUICK_ACTION_BAR a[data-quick-action="action"] { pointer-events: auto; touch-action: manipulation; }
body > #QUICK_ACTION_BAR a[data-quick-action="action"] > * { pointer-events: none; }
body.preview-menu-open > #QUICK_ACTION_BAR { display: none; }

body.gallery-dialog-open { overflow: hidden; }
dialog.comaccess-gallery-dialog { position: fixed; inset: 0; margin: auto; border: 0; padding: 52px 12px 20px; width: min(1120px, 96vw); max-width: 96vw; max-height: 94dvh; color: #fff; background: #14151b; border-radius: 16px; }
dialog.comaccess-gallery-dialog[open] { display: flex; align-items: center; gap: 8px; }
.comaccess-gallery-dialog::backdrop { background: rgb(0 0 0 / .8); }
.comaccess-gallery-dialog figure { margin: 0; flex: 1; min-width: 0; text-align: center; }
.comaccess-gallery-dialog img { display: block; width: 100%; max-height: 72dvh; object-fit: contain; }
.comaccess-gallery-dialog figcaption { padding-top: 12px; font: 14px/1.5 Arial, sans-serif; }
.comaccess-gallery-dialog button { flex-shrink: 0; width: 44px; min-height: 44px; border: 1px solid #687080; border-radius: 50%; background: #252936; color: #fff; cursor: pointer; font: 30px/1 Arial, sans-serif; }
.comaccess-gallery-dialog button[hidden] { display: none; }
.comaccess-gallery-dialog .gallery-close { position: absolute; top: 6px; right: 12px; }
.comaccess-gallery-dialog button:focus-visible { outline: 3px solid #4ca4ff; outline-offset: 3px; }
