:root{--site-header-height: 58px;--background: #f7f7f5;--surface: #fff;--ink: #181818;--muted: #777;--line: #dededb;--hover: #f0f0ed;--accent: #4f88e4;--accent-soft: #edf3fd;color:var(--ink);background:var(--background);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none}*{box-sizing:border-box}html,body{min-height:100%}body{margin:0;background:var(--background);-webkit-font-smoothing:antialiased}button{color:inherit;font:inherit}svg{display:block;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7}.app-shell{min-height:100vh;min-height:100dvh;padding-top:var(--site-header-height)}.sidebar{position:fixed;z-index:30;inset:var(--site-header-height) auto 0 0;display:flex;width:300px;flex-direction:column;color:var(--ink);border-right:1px solid var(--line);background:var(--surface)}.sidebar-title{display:flex;min-height:54px;align-items:center;padding:12px 18px;gap:12px}.sidebar-title strong{font-size:19px;font-weight:700}.icon-button{display:grid;width:34px;height:34px;place-items:center;padding:0;border:0;border-radius:5px;background:transparent;cursor:pointer}.icon-button:hover{background:var(--hover)}.icon-button svg{width:18px}.sidebar-close{display:none;margin-left:auto}.category-nav{flex:1;min-height:0;overflow:auto;padding:0 8px 18px;scrollbar-color:#ccc transparent;scrollbar-width:thin}.category-block{margin-bottom:1px}.category-button{display:flex;width:100%;align-items:center;gap:7px;padding:8px 9px;border:0;border-radius:5px;color:#444;background:transparent;cursor:pointer;text-align:left}.category-button:hover{color:var(--accent);background:var(--accent-soft)}.category-block.is-open>.category-button{color:var(--accent);background:var(--accent-soft)}.category-icon{display:none}.category-name{flex:1;font-size:16px;font-weight:600}.category-total,.collection-count{color:#888;font-size:13px;font-variant-numeric:tabular-nums}.category-chevron{width:11px;color:#aaa;transition:transform .15s ease}.category-block.is-open .category-chevron{color:var(--accent);transform:rotate(90deg)}.collection-list{display:none;margin:2px 0 7px 8px;padding-left:10px;border-left:1px solid var(--line)}.category-block.is-open .collection-list{display:block}.collection-button{display:flex;width:100%;align-items:center;gap:7px;padding:6px 8px;border:0;border-radius:4px;color:#777;background:transparent;cursor:pointer;text-align:left}.collection-button:hover{color:var(--accent);background:var(--accent-soft)}.collection-button.is-active{color:#fff;background:var(--accent)}.collection-button.is-active .collection-count{color:#ffffffc7}.collection-name{flex:1;overflow:hidden;font-size:15px;line-height:1.45;text-overflow:ellipsis;white-space:nowrap}.sidebar-scrim{display:none}.main-content{min-height:calc(100vh - var(--site-header-height));min-height:calc(100dvh - var(--site-header-height));margin-left:300px}.menu-button{display:none}.content{display:flex;flex-direction:column;height:calc(100vh - var(--site-header-height));height:calc(100dvh - var(--site-header-height));padding:0}.viewer-card{position:relative;flex:1;min-height:0;overflow:hidden;border:1px solid #cfcfcb;border-top:3px solid var(--accent);background:#090909}#mirador,#mirador>div{width:100%;height:100%}.viewer-loading{position:absolute;z-index:8;inset:0;display:grid;place-items:center;align-content:center;color:#eee;background:#111}.viewer-loading[hidden]{display:none}.viewer-loading strong{margin:12px 0 4px;font-size:16px;font-weight:550}.viewer-loading span{color:#aaa;font-size:14px}.spinner{width:24px;height:24px;border:2px solid #333;border-top-color:#ddd;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.error-state{padding:40px;text-align:center}.error-state[hidden]{display:none}.error-state h2{font-size:21px;font-weight:550}.error-state p{color:var(--muted);font-size:14px}@media(max-width:920px){.sidebar{width:min(300px,88vw);transform:translate(-105%);transition:transform .2s ease}body.sidebar-open .sidebar{transform:translate(0)}.sidebar-close,.menu-button{display:grid}.sidebar-scrim{position:fixed;z-index:29;inset:var(--site-header-height) 0 0;width:100%;border:0;background:#00000059;opacity:0;pointer-events:none;transition:opacity .2s}body.sidebar-open .sidebar-scrim{display:block;opacity:1;pointer-events:auto}.main-content{margin-left:0}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}

.site-header {
  position: fixed;
  z-index: 31;
  inset: 0 0 auto;
  height: var(--site-header-height);
  color: #fff;
  background: var(--accent);
}
.site-header-inner {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 8px 16px;
}
.site-logo {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 238px;
}
.site-logo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 42px;
  object-fit: contain;
}
.site-logo:focus-visible,
.site-header .menu-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.site-header .menu-button {
  flex: 0 0 34px;
  margin-left: auto;
}
.site-header .menu-button:hover {
  background: #ffffff26;
}


.archive-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.archive-header-back-button,
.archive-header-contacts-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.archive-header-back-button {
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid #ffffff99;
  color: #25466d;
  background: #fff;
}

.archive-header-back-button:hover {
  background: #f6f8fc;
}

.archive-header-contacts-button {
  padding: 8px 18px;
  color: #fff;
  background: #0879d1;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.archive-header-contacts-button:hover {
  background: #0665b0;
}

.archive-header-back-button__arrow {
  width: 8px;
  height: 8px;
  box-sizing: border-box;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(-135deg);
}

@media (max-width: 640px) {
  .site-header-inner {
    gap: 8px;
  }

  .archive-header-actions {
    gap: 6px;
  }

  .archive-header-back-button,
  .archive-header-contacts-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    font: inherit;
  }

  .archive-header-back-button__text,
  .archive-header-contacts-button__text {
    display: none;
  }

  .archive-header-contacts-button__icon {
    display: block;
  }
}

.archive-header-contacts-button__icon {
  display: none;
  width: 16px;
  height: 16px;
}

.archive-header-contacts-button__phone {
  display: none;
  font-size: 18px;
  line-height: 1;
  font-family: Arial, sans-serif;
  font-weight: 400;
}

@media (max-width: 640px) {
  .archive-header-back-button,
  .archive-header-contacts-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    font: inherit;
  }

  .archive-header-back-button__text,
  .archive-header-contacts-button__text {
    display: none;
  }

  .archive-header-contacts-button__phone {
    display: block;
  }
}

.menu-button__icon {
  display: flex;
  width: 16px;
  height: 14px;
  flex-direction: column;
  justify-content: space-between;
}

.menu-button__icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.site-header .menu-button {
  display: none;
}

@media (max-width: 920px) {
  .site-header .menu-button {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    margin-left: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #0879d1;
    cursor: pointer;
  }

  .site-header .menu-button:hover {
    background: #0665b0;
  }
}

.archive-contacts-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 20px 80px #0003;
}

.archive-contacts-dialog::backdrop {
  background: #0007;
}

.archive-contacts-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.archive-contacts-dialog__header h2 {
  margin: 0;
  font-size: 20px;
}

.archive-contacts-dialog__header .icon-button {
  flex: 0 0 34px;
  font-size: 22px;
}

.archive-contacts-dialog__content {
  font-size: 14px;
  line-height: 1.6;
}

.archive-contacts-dialog__content p {
  margin: 0 0 14px;
}

.archive-contacts-dialog__content a {
  color: var(--accent);
}

.archive-contacts-dialog__social {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .archive-contacts-dialog {
    width: calc(100% - 20px);
    padding: 18px;
  }
}

/* Keep the page counter without the image filename beside it. */
#mirador .mirador-canvas-label {
  display: none;
}
