.photo-viewport {
  position: relative;
  overflow: hidden;
  min-height: 80px;
  height: 180px;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: contain;
}
.photo-viewport.photo-dragging {
  cursor: grabbing;
}
.photo-viewport img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.photo-viewport:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.race-photos .photo-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  min-width: 32px;
  height: 28px;
}
.photo-reset svg {
  flex: none;
}
.photo-viewport.photo-error {
  height: auto !important;
  min-height: 40px;
  cursor: default;
  touch-action: auto;
}
.photo-error p {
  padding: 10px;
}
@media (pointer: coarse) {
  .race-photos .photo-reset {
    min-width: 44px;
    min-height: 44px;
  }
}
.race-photos .photo-controls {
  min-height: 30px;
}
.photo-mobile-open {
  display: none;
}
.race-photos .photo-controls .photo-mobile-open,
.photo-fullscreen-actions button {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #53616f;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #eaf0f6;
  padding: 7px 12px;
  font-size: 12px;
  line-height: 1.2;
}
.photo-mobile-open:focus:not(:focus-visible),
.photo-fullscreen-actions button:focus:not(:focus-visible) {
  outline: none;
}
@media (max-width: 760px) {
  .race-photos .photo-mobile-open {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .race-photos .photo-desktop-open,
  .race-photos .photo-reset {
    display: none;
  }
  .race-photos .photo-viewport {
    touch-action: pan-y;
    cursor: zoom-in;
  }
}
.photo-fullscreen {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
  border: 0;
  border-radius: 0;
  background: #080c12;
  color: #f0f3f7;
  box-sizing: border-box;
  overflow: hidden;
  overscroll-behavior: none;
}
.photo-fullscreen[open] {
  display: flex;
  flex-direction: column;
}
.photo-fullscreen::backdrop {
  background: #080c12;
}
.photo-fullscreen-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 10px;
  padding: 6px 10px;
  flex: none;
  border-bottom: 1px solid #293541;
}
.photo-fullscreen-toolbar strong {
  font-size: 13px;
  font-weight: 500;
}
.photo-fullscreen-actions {
  display: flex;
  gap: 5px;
  margin-left: auto;
}
.photo-fullscreen-actions button {
  min-width: 44px;
  min-height: 44px;
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 999px;
}
.photo-fullscreen-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}
.photo-fullscreen-stage img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  pointer-events: none;
  -webkit-user-drag: none;
}
.photo-fullscreen-stage p {
  padding: 20px;
  text-align: center;
}
@media (pointer: coarse) {
  .race-photos .photo-controls {
    min-height: 44px;
  }
}
