:root {
  color-scheme: dark;
  background: #010410;
  color: #d6e5f6;
  font: 14px/1.4 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; overscroll-behavior: none; }
.sr-only {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.logo-cycle {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #010410;
  cursor: pointer;
  touch-action: pinch-zoom;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.logo-cycle picture, .logo-cycle picture img, #light-field {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.logo-cycle picture img { object-fit: cover; object-position: 63% 50%; }
@media (max-aspect-ratio: 6/5) {
  .logo-cycle picture img { object-position: center; }
}
@media (max-aspect-ratio: 6/13) {
  .logo-cycle picture[data-source] {
    border-image: var(--portrait-field) 12 0 / calc(50dvh - 108.333vw + 2px) 0 stretch;
  }
  .logo-cycle picture[data-source] img { object-fit: contain; }
}
/* On panoramic screens keep the full emblem, blending into the source's own field. */
@media (min-aspect-ratio: 5/2) {
  .logo-cycle picture[data-source] {
    border-image: var(--field) 0 12 / 0 calc(50vw - 88.84dvh + 2px) stretch;
  }
  .logo-cycle picture img {
    object-fit: contain;
    object-position: center;
  }
}
.logo-cycle[data-mode="laz0r"] { cursor: crosshair; }
.logo-cycle:is([data-mode="drag-test"], [data-mode="spotlight"]) { cursor: grab; }
.logo-cycle:is([data-mode="drag-test"], [data-mode="spotlight"]):active { cursor: grabbing; }
:focus-visible { outline: 2px solid #99ceff; outline-offset: 2px; }
.logo-cycle:focus-visible { outline-offset: -4px; }
.view-nav {
  position: fixed;
  z-index: 1;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  padding: 3px;
  border: 1px solid #7188a34d;
  border-radius: 28px;
  background: #06101de6;
}
.view-nav a, .action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 22px;
  color: #bdcede;
  font: 500 12px/1.2 system-ui, sans-serif;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.view-nav a { padding: 0 clamp(10px, 3vw, 17px); }
.view-nav a[aria-current="page"] { background: #1e334a; color: #f1f9ff; }
.view-nav a:hover, .action:hover, .action:focus-visible { background: #16263b; color: white; }
.view-bar {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  left: max(20px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.caption { display: grid; gap: 2px; font-size: 12px; color: #a0b4ce; text-shadow: 0 1px 6px #000; }
#source-caption { color: #d8e8f9; font-weight: 600; }
.caption span:empty { display: none; }
.actions { display: flex; gap: 6px; }
.action { gap: 9px; padding: 0 14px; background: #07101ce6; border: 1px solid #72879e66; pointer-events: auto; }
#reset-source { width: 44px; padding: 0; }
@media (max-width: 520px) {
  .view-nav { top: max(7px, env(safe-area-inset-top)); }
  .view-bar { right: max(12px, env(safe-area-inset-right)); left: max(12px, env(safe-area-inset-left)); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .view-nav { left: max(12px, env(safe-area-inset-left)); top: max(7px, env(safe-area-inset-top)); transform: none; }
}
