:root {
  --bg: #141414;
  --text: #f0f0ec;
  --muted: #9a9a92;
  --panel: #242422;
  --line: #2e2e2a;
  --bg-rgb: 20, 20, 20;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

.site-header {
  padding: 1.75rem 1.5rem 1rem;
  border-bottom: 1px solid var(--line);
}

.site-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  font-weight: 650;
}

.site-header p {
  margin: 0;
  color: var(--muted);
}

main {
  padding: 1rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.row h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  word-break: break-word;
}

.strip-wrap {
  position: relative;
}

.strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #4a4a44 transparent;
  cursor: grab;
  /* Vertical page scroll by default; JS takes over when gesture is clearly horizontal */
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  user-select: none;
  -webkit-user-select: none;
}

.strip.is-dragging {
  cursor: grabbing;
}

.strip-more {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0.5rem;
  width: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.35rem;
  background: linear-gradient(
    to right,
    rgba(var(--bg-rgb), 0) 0%,
    rgba(var(--bg-rgb), 0.85) 45%,
    var(--bg) 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.strip-wrap.has-more-right .strip-more {
  opacity: 1;
}

.strip-more-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.82);
  color: #f7f7f5;
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.card {
  flex: 0 0 auto;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: inherit;
  text-align: left;
  font: inherit;
  color: inherit;
  text-decoration: none;
}

.card:focus-visible {
  outline: 2px solid #f0f0ec;
  outline-offset: 3px;
}

.card-media {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  background: var(--panel);
  border-radius: 6px;
  overflow: hidden;
}

.card img {
  display: block;
  max-height: 280px;
  max-width: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.label {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(30, 90, 180, 0.88);
  color: #f7f7f5;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  pointer-events: none;
}

.card[data-label="Original"] .label {
  background: rgba(30, 130, 70, 0.9);
}

.empty {
  color: var(--muted);
}

/* PhotoSwipe caption pills */
.bm-pswp-caption {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  z-index: 10;
  pointer-events: none;
}

.lb-pill {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(30, 90, 180, 0.95);
}

.lb-pill.is-original {
  background: rgba(30, 130, 70, 0.95);
}

.lb-pill.is-edit {
  background: rgba(30, 90, 180, 0.95);
}

.lb-pos {
  color: rgba(242, 242, 240, 0.8);
  font-size: 0.9rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.pswp__img {
  border-radius: 6px;
}

@media (max-width: 700px) {
  .site-header {
    padding: 1rem 0.75rem 0.75rem;
  }

  main {
    padding: 0.75rem 0.5rem 2rem;
    gap: 1.25rem;
  }

  .row h2 {
    margin: 0 0 0.5rem;
    padding: 0 0.25rem;
    font-size: 0.95rem;
  }

  .strip {
    gap: 0.5rem;
    padding-bottom: 0.25rem;
  }

  .card img {
    max-height: none;
    /* Leave a peek of the next image so edits are obvious */
    max-width: 82vw;
    width: auto;
    height: auto;
  }

  .strip-more {
    width: 3.25rem;
    bottom: 0.25rem;
  }

  .strip-more-arrow {
    width: 2rem;
    height: 2rem;
    font-size: 1.35rem;
  }

  .bm-pswp-caption {
    bottom: 0.85rem;
  }
}
