:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #173c34;
  background: #000;
  font-synthesis: none;
  --map-inset: 20px;
  --dock-width: 154px;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; color: inherit; font: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, #viewer:focus-visible {
  outline: 2px solid #aa6f18;
  outline-offset: 3px;
}
#viewer { position: absolute; inset: 0; outline-offset: -4px; }
.panel {
  background: #fffdf6f7;
  border: 1px solid #d9d8c7;
  border-radius: 12px;
  box-shadow: 0 5px 24px #173c3420;
}
.identity {
  position: absolute;
  left: max(var(--map-inset), env(safe-area-inset-left));
  top: max(var(--map-inset), env(safe-area-inset-top));
  right: max(var(--map-inset), env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.wordmark, .making-of {
  padding: 8px 11px;
  border: 1px solid #d9d8c7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px #173c3420;
}
.wordmark {
  margin: 0;
  color: #000;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 780;
  letter-spacing: -.055em;
  line-height: 1.1;
}
.making-of {
  color: #173c34;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  pointer-events: auto;
}
.making-of:hover { background: #f1f4eb; }
.identity-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.map-interface {
  position: absolute;
  left: max(var(--map-inset), env(safe-area-inset-left));
  right: max(var(--map-inset), env(safe-area-inset-right));
  bottom: max(var(--map-inset), env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: var(--dock-width) minmax(0, 1fr) var(--dock-width);
  grid-template-areas: "credit highlights dock";
  align-items: end;
  gap: 6px 12px;
  pointer-events: none;
}
.map-interface > * { pointer-events: auto; }
.credit {
  grid-area: credit;
  justify-self: start;
  padding: 4px 7px;
  border-radius: 5px;
  background: #fffdf6f5;
  color: #40574c;
  font-size: 10px;
  text-underline-offset: 2px;
}
.map-dock { grid-area: dock; display: grid; gap: 6px; pointer-events: none; }
.map-dock > * { pointer-events: auto; }
.map-indicator-slot { height: 82px; }
#map-indicator {
  width: 100%;
  height: 100%;
  border: 1px solid #d9d8c7;
  border-radius: 10px;
  background: #f4f0e6f5;
  box-shadow: 0 3px 18px #173c3420;
  overflow: hidden;
}
.embed .map-indicator-slot { display: none; }
.controls { display: flex; padding: 2px; border-radius: 9px; }
.controls button {
  flex: 1;
  height: 34px;
  padding: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 19px;
  line-height: 1;
}
.controls button:hover { background: #e9eddd; }

.highlights {
  --thumbnail-width: 112px;
  --thumbnail-gap: 5px;
  --arrow-size: 36px;
  --rail-gap: 8px;
  --rail-padding: 6px;
  grid-area: highlights;
  justify-self: center;
  display: grid;
  grid-template-columns: var(--arrow-size) minmax(0, 1fr) var(--arrow-size);
  align-items: center;
  gap: var(--rail-gap);
  min-width: 0;
  width: min(100%, calc(5 * var(--thumbnail-width) + 4 * var(--thumbnail-gap) + 2 * var(--arrow-size) + 2 * var(--rail-gap) + 2 * var(--rail-padding) + 2px));
  padding: var(--rail-padding);
  border: 1px solid #d9d8c7;
  border-radius: 13px;
  background: #fffdf6eb;
  box-shadow: 0 4px 16px #173c3426;
  pointer-events: none;
}
.highlights[hidden] { display: none; }
.highlight-arrow {
  display: grid;
  place-items: center;
  width: var(--arrow-size);
  height: var(--arrow-size);
  padding: 0;
  border: 1px solid #d9d8c7;
  border-radius: 50%;
  background: #fffdf6f7;
  pointer-events: auto;
}
.highlight-arrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transform: translateX(-1px) rotate(45deg);
}
#highlights-previous::before { transform: translateX(1px) rotate(-135deg); }
.highlight-arrow:hover:not(:disabled) { background: #e5ead9; }
.highlight-arrow:disabled { opacity: .55; cursor: default; }
.highlight-cards {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--thumbnail-width);
  gap: var(--thumbnail-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  pointer-events: auto;
}
.highlight-cards::-webkit-scrollbar { display: none; }
.highlight-cards li { scroll-snap-align: start; }
.highlight-cards a {
  display: block;
  overflow: hidden;
  border: 2px solid #fffdf6;
  border-radius: 8px;
  background: #e8dcc4;
}
.highlight-cards a:hover { border-color: #e5ead9; }
.highlight-cards a:focus-visible { outline-offset: -4px; }
.highlight-cards a[aria-current] { border-color: #eebd59; }
.highlight-cards img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
  object-fit: cover;
}

#notice {
  position: absolute;
  top: max(var(--map-inset), env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  background: #173c34ee;
  color: #fffdf6;
  padding: 10px 17px;
  border-radius: 9px;
  font-size: 12px;
  pointer-events: none;
  max-width: calc(100% - 32px);
  text-align: center;
}
#notice:empty { display: none; }
.noscript {
  position: absolute;
  inset: 40% 10%;
  padding: 20px;
  background: #fffdf6;
  text-align: center;
}

@media (max-width: 680px) {
  :root { --map-inset: 10px; --dock-width: 122px; }
  .map-interface {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "dock" "highlights" "credit";
  }
  .map-dock { justify-self: end; width: var(--dock-width); }
  .map-indicator-slot { height: 58px; }
  .highlights { --thumbnail-width: 94px; --rail-gap: 5px; --rail-padding: 4px; }
  #notice { top: calc(max(var(--map-inset), env(safe-area-inset-top)) + 46px); }
}
@media (pointer: coarse) {
  .highlights { --arrow-size: 40px; }
  .controls button { height: 38px; }
}
@media (max-height: 500px) {
  .map-interface { grid-template-areas: "highlights dock" "credit dock"; grid-template-columns: minmax(0, 1fr) var(--dock-width); }
  .highlights { --thumbnail-width: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
