*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #faf9f7;
  --text-muted: #999;
  --max-width: 640px;
  --radius: 6px;
}

html, body {
  height: 100%;
}

body {
  background-color: var(--bg);
  color: #1a1a1a;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* DOG PROGRESS BAR — commented out pending redesign

#dog-progress { ... }
#dog-runner { ... }
.dog-icon { ... }
@keyframes dog-roll { ... }

END DOG PROGRESS BAR */

/* ── Main layout ── */

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  padding: 24px 16px 72px;
  gap: 48px;
}

/* ── Photo ── */

#photo-container {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  /* Fixed height so landscape and portrait photos occupy identical space.
     Portrait fills the height; landscape fills the width and is centered
     vertically, gaining natural breathing room above and below. */
  height: 76dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  border-radius: var(--radius);
  /* Skeleton shown while loading */
  background: linear-gradient(90deg, #ebe9e5 25%, #f5f3f0 50%, #ebe9e5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

#photo-container.photo-loaded {
  background: none;
  animation: none;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

#photo {
  display: block;
  /* Fill the fixed-height container; object-fit:contain keeps aspect ratio.
     Portrait images fill top-to-bottom; landscape images fill side-to-side
     and are vertically centered with empty space above and below. */
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#photo.visible {
  opacity: 1;
}

#hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
}

#hint.hidden {
  opacity: 0;
}

/* ── Log ── */

.log {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.log p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Desktop ── */

@media (min-width: 768px) {
  main {
  padding: 48px 24px 96px;
    gap: 56px;
  }

  .log p {
    font-size: 15px;
  }
}
