.annotated {
  position: relative;
  margin: 1rem 0;
}

.annotated img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-primary);
  background: #000;
}

.marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: var(--accent-primary);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 0 0 4px rgba(22, 200, 234, 0.25);
}

.marker[aria-pressed="true"],
.marker:hover {
  background: var(--highlight);
  color: #1a1404;
}

.annotation-panel {
  margin-top: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-secondary);
  border: 1px solid var(--border-primary);
}

.annotation-panel[hidden] {
  display: none;
}

.shot-button {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 12px;
}

.shot-button img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.8rem;
}

.gallery-grid.list {
  grid-template-columns: 1fr;
}

.gallery-grid.list .shot-card {
  display: grid;
  grid-template-columns: 12rem 1fr;
}

.gallery-grid.list .shot-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  height: 100%;
}

.shot-card {
  background: var(--surface-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.shot-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: left top;
  background: #000;
}

.shot-card .meta {
  padding: 0.7rem 0.8rem 0.85rem;
}

.shot-card h3 {
  margin: 0;
  font-size: 1rem;
}

dialog {
  width: min(72rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  background: #070708;
  color: var(--text-primary);
  padding: 0;
  box-shadow: var(--shadow-card);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.lightbox-bar,
.search-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
}

.lightbox-stage {
  background: #000;
  display: grid;
  place-items: center;
  min-height: 16rem;
  overflow: auto;
}

.lightbox-stage img {
  max-height: 72vh;
  width: auto;
  max-width: 100%;
  transform: scale(var(--zoom, 1));
  transform-origin: center top;
}

.lightbox-caption {
  padding: 0.8rem 1rem 1rem;
  color: var(--text-secondary);
}

#search-dialog {
  width: min(40rem, calc(100vw - 2rem));
}

#search-input {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0.2rem 0;
}

#search-input:focus {
  box-shadow: none;
}

.search-results {
  max-height: 60vh;
  overflow: auto;
  padding: 0.4rem;
}

.search-group h3 {
  margin: 0.6rem 0.4rem 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.search-results a {
  display: block;
  padding: 0.55rem 0.6rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
}

.search-results a[aria-selected="true"],
.search-results a:hover {
  background: var(--surface-selected);
}

.search-results p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.icon-btn {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-primary);
}
