
/* Private UI fix patch. No Map masthead or Aion/Dipper artwork selectors. */
.codex-home-report { display: none; }
body[data-codex-route="home"] .codex-home-report,
body[data-codex-route="collection"] .codex-home-report {
  display: flex; align-items: baseline; gap: .45rem; position: absolute;
  z-index: 9; top: 3px; inset-inline-end: max(.75rem,env(safe-area-inset-right));
  max-width: min(calc(100% - 1.5rem), 43rem); color: inherit;
  font: 500 clamp(.65rem,.9vw,.8rem)/1.22 CodexGeometric, sans-serif;
  text-align: end; text-underline-offset: .16em; padding: .18rem .32rem;
}
.codex-home-report:focus-visible,.codex-viewer-rights button:focus-visible,.codex-rights-instructions:focus-visible {
  outline: 2px solid #e5bd73; outline-offset: 2px;
}
@media (max-width: 640px) {
  body[data-codex-route="home"] .codex-home-report,
  body[data-codex-route="collection"] .codex-home-report {
    position: relative; inset: auto; display: flex;
    max-width: none; margin: .18rem .7rem; justify-content: end;
  }
}
#screen > .object-screen, #screen > .object-screen .object-study,
#screen > .object-screen .object-study > :is(.reading-space,.visual) {
  box-sizing: border-box; min-width: 0; max-inline-size: 100%;
}
#screen > .object-screen .object-study > .reading-space {
  overflow-wrap: anywhere; padding-inline-end: clamp(8px,1.7vw,24px) !important;
}
#screen > .object-screen .reading-space :is(article,section,figure,ul,ol,table) {
  box-sizing: border-box; min-inline-size: 0; max-inline-size: 100%;
}
#screen > .object-screen .reading-space :is(img,svg,canvas,video) {
  max-inline-size: 100%; height: auto;
}
#screen > .object-screen .reading-space :is(.codex-facts-table,table) {
  table-layout: fixed; width: 100%; overflow-wrap: anywhere;
}
#screen > .object-screen.codex-viewer-collapsed .object-study > .reading-space {
  grid-column: 1 / -1 !important; width: 100%; max-inline-size: none;
  margin: 0; padding-inline: clamp(8px,2vw,26px) !important;
}
#screen > .object-screen.codex-viewer-collapsed .object-study > .visual { display: none !important; }
#screen > .object-screen .page-heading {
  display: flex; flex-wrap: wrap; gap: .48rem 1.25rem; align-items: center;
}
#screen > .object-screen .page-heading > div:first-child { flex: 1 1 16rem; min-inline-size: 0; overflow-wrap: anywhere; }
.codex-dossier-actions { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
#screen > .object-screen .codex-dossier-actions .codex-viewer-toggle,
#screen > .object-screen .codex-dossier-actions .codex-open-map {
  position: static !important; inset: auto !important; transform: none !important;
  display: inline-flex !important; flex-direction: row !important; gap: .4rem;
  padding: .36rem .65rem; border: 1px solid #aa8b55; border-radius: 4px;
  background: transparent; color: inherit; box-shadow: none;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  font: 600 .92rem/1.15 Interface, sans-serif;
}
#screen > .object-screen .codex-dossier-actions :is(button,a):focus-visible {
  outline: 2px solid #e5bd73; outline-offset: 2px;
}
@media (max-width: 760px) {
  #screen > .object-screen .object-study > .reading-space { grid-column: 1 / -1 !important; grid-row: 2 !important; }
  #screen > .object-screen.codex-viewer-collapsed .object-study > .reading-space { grid-row: 1 !important; }
}
.image-viewport,.codex-mdp-gallery { position: relative; }
.codex-viewer-rights {
  position: absolute; top: .5rem; left: .5rem; z-index: 15; width: max-content;
  color: #fff7e7; max-inline-size: calc(100% - 1rem);
}
.codex-viewer-rights > button {
  list-style: none; display: grid; place-items: center; min-width: 36px; min-height: 36px;
  border-radius: 50%; border: 0; background: transparent; color: inherit;
  padding: 0; cursor: pointer;
}
.codex-viewer-rights > button > span[aria-hidden=true] {
  box-sizing: border-box; display: inline-grid; width: 22px; height: 22px; place-items: center;
  border: 1px solid #fff6; border-radius: 50%; background: #191c22b0;
  color: inherit; font: 600 13px/1 sans-serif; pointer-events: none;
}
.codex-viewer-rights > button::-webkit-details-marker { display: none; }
.codex-viewer-rights > .codex-rights-instructions {
  display: none; position: absolute; top: 100%; left: 0;
  box-sizing: border-box; width: min(18rem,75vw); padding: .65rem .75rem;
  border: 1px solid #a8895a; border-radius: 4px; background: #11161ded;
  color: #fff4e0; line-height: 1.4; text-decoration: underline;
}
.codex-viewer-rights > .codex-rights-instructions:not([hidden]) { display: block; }
.codex-contact { max-width: 52rem; margin-inline: auto; }
.codex-contact-form { display: grid; gap: 1rem; }
.codex-contact-form label { display: grid; gap: .35rem; }
.codex-contact [hidden] { display: none !important; }
.codex-contact-form :is(input,textarea,select) {
  max-inline-size: 100%; width: 100%; box-sizing: border-box; color: inherit;
  background: transparent; border: 1px solid #a8895a; border-radius: 4px; padding: .55rem .65rem;
}
.codex-contact-form option { color: #111; background: #fff; }
.codex-contact-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.codex-contact-actions button { border: 1px solid #a8895a; border-radius: 4px; padding: .45rem .65rem; color: inherit; }
.codex-contact-actions button:disabled { opacity: .45; cursor: not-allowed; }
.codex-ring-halo { fill: none !important; stroke: none !important; }
.codex-geo-site-anchor { fill: #e4c587; stroke: #332918; stroke-width: 1.5; pointer-events: none; }
.codex-obj-token.is-active { outline: 2px solid #f4d698; outline-offset: 2px; }
.codex-map-viewport { touch-action: none; }
@media (max-width: 700px) {
  .codex-map-dossier-panel { top: auto; width: 100%; min-height: 0; height: 55%; border-left: 0; border-top: 1px solid #c9a66b88; }
}

/* The visible toggle is a gallery command, not a heading or an image overlay. */
#screen > .object-screen .visual .image-command-line {
  flex-wrap: wrap;
  min-inline-size: 0;
}
#screen > .object-screen .visual .image-command-line .codex-toggle-in-gallery {
  position: static !important; inset: auto !important; transform: none !important;
  display:inline-flex !important; flex:0 0 auto; flex-direction:row !important;
  align-items:center; gap:4px; min-height:26px; white-space:nowrap;
  border:1px solid color-mix(in srgb,currentColor 32%,transparent); border-radius:3px;
  padding:3px 7px; background:transparent; color:inherit; box-shadow:none;
  font:600 12px/1.15 Interface,CodexGeometric,sans-serif; cursor:pointer;
}
#screen > .object-screen .visual .image-command-line .codex-toggle-in-gallery:hover {
  background:color-mix(in srgb,currentColor 10%,transparent);
}
#screen > .object-screen .codex-viewer-toggle .codex-toggle-label {
  writing-mode:horizontal-tb; font:inherit; letter-spacing:.025em;
}
#screen > .object-screen .codex-viewer-toggle .codex-toggle-arrow { font:inherit; }
#screen > .object-screen .codex-viewer-toggle:focus-visible {
  outline:2px solid #e5bd73; outline-offset:2px;
}

/* copyright hover size */
.codex-viewer-rights > .codex-rights-instructions { font-size:11px; line-height:1.4; }
