@charset "UTF-8";
html:has(body.tile-grid-page),
body.tile-grid-page {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body.tile-grid-page {
  font-family: Arial, Helvetica, sans-serif;
}

.gallery-wrapper {
  width: 100%;
  height: 100vh;
  overflow: auto;
  display: flex;
  user-select: none;
  -webkit-user-select: none;
}
.gallery-wrapper img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}
.gallery-wrapper {
  justify-content: safe center;
  align-items: safe center;
}

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(19, var(--bsk-cell, 100px));
  grid-auto-rows: var(--bsk-cell, 100px);
  gap: 0;
  position: relative;
}

.box-item {
  width: var(--bsk-cell, 100px);
  height: var(--bsk-cell, 100px);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.box-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.box-item.is-merged {
  width: 100%;
  height: 100%;
}

.box-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  display: none;
}

body.tile-grid--show-numbers .box-number {
  display: flex;
}

.center-box {
  grid-column: var(--bsk-center-col-start, 9)/span 3;
  grid-row: var(--bsk-center-row-start, 9)/span 3;
  width: calc(var(--bsk-cell, 100px) * 3);
  height: calc(var(--bsk-cell, 100px) * 3);
  align-self: center;
  justify-self: center;
}
.center-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s;
  z-index: 9999;
}
.lightbox.active {
  visibility: visible;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox-content button.close {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}
.lightbox-content button.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}
.lightbox-content button.prev {
  left: 0.5rem;
}
.lightbox-content button.next {
  right: 0.5rem;
}

.lightbox-inner {
  background: #111;
  border-radius: 0.6rem;
  padding: 0.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-inner img.main-img {
  max-width: calc(100vw - 90px);
  max-height: calc(100vh - 150px);
  display: block;
  margin-bottom: 8px;
}

.thumb-bar {
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  background: #222;
  padding: 4px 8px;
  border-radius: 0.4rem;
}
.thumb-bar img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  opacity: 0.6;
  cursor: pointer;
  border: 2px solid transparent;
}
.thumb-bar img.active, .thumb-bar img:hover {
  opacity: 1;
  border-color: #fff;
}

.lightbox-post {
  background: #fff;
  color: #1e1e1e;
  border-radius: 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  width: min(1600px, 96vw);
  height: 88vh;
  padding: 0;
}
.lightbox-post button.close {
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.3rem;
  line-height: 1;
  color: #1e1e1e;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  text-shadow: none;
  z-index: 2;
}
.lightbox-post button.close:hover, .lightbox-post button.close:focus-visible {
  background: #f2f2f2;
}
.lightbox-post .lightbox-post-content {
  width: 100%;
  height: 100%;
}
.lightbox-post .lightbox-post-content .lightbox-post-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

#clock-wrapper {
  width: var(--bsk-cell, 100px);
  height: var(--bsk-cell, 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

#clock {
  font-family: "Courier New", Courier, monospace;
  font-size: 20px;
  line-height: 1;
  display: flex;
  gap: 2px;
}

.digit-box {
  padding: 2px 4px;
  border-radius: 3px;
  background-color: hsl(0, 0%, 85%);
  transition: background-color 0.4s ease;
}

.digit {
  color: #333;
}

.fade-in {
  animation: fadeColor 0.5s ease-out forwards;
}

@keyframes fadeColor {
  0% {
    transform: scale(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.box-item.plain-white {
  background: #fff;
  cursor: default;
}
.box-item.plain-white img {
  display: none;
}

/* ----------------------------------------------------------------------
   "Jump to topic" arrival effects (behavior=jump, target=topic). Toggled
   per tile in the editor; applied/removed by grid-v2.js as inline transforms
   + the classes below. Transitions live on .box-item so both the apply and
   the reset (next visitor interaction) animate. Visual only — no data change.
   ---------------------------------------------------------------------- */
.box-item {
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.4s ease, opacity 0.4s ease, box-shadow 0.3s ease;
}

.box-item.jump-dim {
  filter: grayscale(0.7) brightness(0.9);
  opacity: 0.4;
}

.box-item.jump-lift {
  z-index: 5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.box-item.jump-border {
  z-index: 6;
  animation: bsk-jump-border-pulse 1.2s ease-in-out infinite;
}

@keyframes bsk-jump-border-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px var(--jump-border-color, #d63638), 0 0 6px 2px var(--jump-border-color, #d63638);
  }
  50% {
    box-shadow: 0 0 0 4px var(--jump-border-color, #d63638), 0 0 18px 6px var(--jump-border-color, #d63638);
  }
}
@media (prefers-reduced-motion: reduce) {
  .box-item.jump-border {
    animation: none;
    box-shadow: 0 0 0 3px var(--jump-border-color, #d63638);
  }
}
/* ----------------------------------------------------------------------
   Screen-reader / SEO sitemap. Standard visually-hidden pattern: present
   in the DOM and accessibility tree, invisible to sighted users. Becomes
   visible when focused via keyboard Tab so keyboard users can find it.
   ---------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tile-grid-sitemap:focus-within {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  clip: auto;
  background: #fff;
  border: 2px solid #d63638;
  padding: 1rem;
  max-width: 90vw;
  max-height: 80vh;
  overflow: auto;
  z-index: 9500;
  margin: 0;
}

/* ----------------------------------------------------------------------
   Minimap / overview toggle
   ---------------------------------------------------------------------- */
.tile-grid-minimap-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.tile-grid-minimap-toggle:hover {
  background: rgba(0, 0, 0, 0.9);
}
.tile-grid-minimap-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

body.tile-grid--minimap .gallery-wrapper {
  overflow: hidden;
  position: relative;
}
body.tile-grid--minimap .grid-gallery {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--minimap-scale, 0.4));
  transform-origin: center center;
  transition: transform 0.3s ease;
}
body.tile-grid--minimap .box-item.is-off-grid {
  display: none;
}

.tile-grid-topic-overlay {
  background: rgba(214, 54, 56, 0.18);
  border: 3px solid #d63638;
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease;
}
.tile-grid-topic-overlay:hover {
  background: rgba(214, 54, 56, 0.35);
}

.tile-grid-topic-label {
  background: #d63638;
  color: #fff;
  padding: 4px 10px;
  border-radius: 0 0 4px 4px;
  font-family: var(--global-body-font-family, Arial, sans-serif);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
