:root {
  color-scheme: light;
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-soft: #eef3f1;
  --ink: #172226;
  --muted: #66757a;
  --line: #d8e0dd;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --blue: #2563eb;
  --amber: #b7791f;
  --shadow: 0 18px 45px rgba(23, 34, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--line);
}

.title-block {
  min-width: 0;
}

.kicker {
  margin: 0 0 6px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  font-weight: 800;
  line-height: 1;
}

h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  line-height: 1.08;
}

.summary-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 220px;
}

.summary-panel span,
.gallery-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.controls {
  display: grid;
  gap: 14px;
  padding: 18px 0;
}

.day-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(174px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.day-button {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.day-button:hover,
.day-button:focus-visible,
.segmented button:hover,
.segmented button:focus-visible,
.photo-button:focus-visible,
.icon-button:focus-visible,
.nav-button:focus-visible,
.lightbox-actions a:focus-visible {
  border-color: var(--teal);
  outline: 3px solid rgba(15, 118, 110, 0.18);
  outline-offset: 2px;
}

.day-button:hover {
  transform: translateY(-1px);
}

.day-button.is-active {
  border-color: var(--teal);
  background: #e8f4f1;
  box-shadow: inset 0 -3px 0 var(--teal);
}

.day-button strong,
.day-button span {
  display: block;
}

.day-button strong {
  font-size: 0.98rem;
  line-height: 1.18;
}

.day-button span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  width: min(100%, 520px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 4px;
}

.segmented button {
  flex: 1 1 86px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.segmented button.is-active {
  background: var(--teal);
  color: #ffffff;
}

.search-field {
  display: grid;
  grid-template-columns: auto minmax(150px, 280px);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.search-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 11px;
}

.search-field input:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(15, 118, 110, 0.18);
}

.gallery-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0 16px;
}

#galleryCount {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.photo-card {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(23, 34, 38, 0.06);
  overflow: hidden;
}

.photo-button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.photo-button img,
.photo-button video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.photo-card:hover .photo-button img,
.photo-card:hover .photo-button video {
  transform: scale(1.035);
}


.photo-card.is-video .photo-button {
  background: #101820;
  cursor: pointer;
}

.video-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 6px;
  background: rgba(7, 14, 16, 0.82);
  color: #ffffff;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.photo-button.has-missing-thumbnail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #172226, #0f766e);
}

.photo-card.is-video .photo-button.has-missing-thumbnail::after {
  content: "Geen thumbnail";
  position: absolute;
  left: 10px;
  bottom: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
}
.photo-card figcaption {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 0.85rem;
}

.photo-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-person {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 6px;
  padding: 3px 7px;
  background: #eef6ff;
  color: var(--blue);
  font-weight: 800;
}

.photo-person[data-person="Laura"] {
  background: #fff5df;
  color: var(--amber);
}

.empty-state {
  margin: 26px 0 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(7, 14, 16, 0.92);
  color: #ffffff;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-bar,
.lightbox-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 14px 18px;
}

.lightbox-meta {
  min-width: 0;
}

.lightbox-meta strong,
.lightbox-meta span {
  display: block;
}

.lightbox-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(72vw, 900px);
}

.lightbox-meta span,
.lightbox-actions span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.icon-button,
.nav-button,
.lightbox-actions a {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
}

.icon-button {
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
}

.nav-button {
  position: fixed;
  top: 50%;
  width: 50px;
  height: 64px;
  transform: translateY(-50%);
  font-size: 2.5rem;
  line-height: 1;
}

.nav-button-left {
  left: 18px;
}

.nav-button-right {
  right: 18px;
}

.lightbox-figure {
  display: grid;
  place-items: center;
  margin: 0;
  min-height: 0;
  padding: 0 82px;
}

.lightbox-figure img,
.lightbox-figure video {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 146px);
  object-fit: contain;
  box-shadow: var(--shadow);
  background: #000000;
}

.lightbox-actions a {
  min-height: 38px;
  padding: 8px 12px;
  font-weight: 750;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding-top: 14px;
  }

  .topbar,
  .gallery-header,
  .control-row {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-panel {
    justify-content: flex-start;
    min-width: 0;
  }

  .day-strip {
    grid-auto-columns: minmax(150px, 72vw);
  }

  .segmented,
  .search-field {
    width: 100%;
  }

  .search-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  
.photo-card.is-video .photo-button {
  background: #101820;
  cursor: pointer;
}

.video-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 6px;
  background: rgba(7, 14, 16, 0.82);
  color: #ffffff;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.photo-button.has-missing-thumbnail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #172226, #0f766e);
}

.photo-card.is-video .photo-button.has-missing-thumbnail::after {
  content: "Geen thumbnail";
  position: absolute;
  left: 10px;
  bottom: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
}
.photo-card figcaption {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .nav-button {
    top: auto;
    bottom: 70px;
    width: 48px;
    height: 48px;
    transform: none;
  }

  .nav-button-left {
    left: 12px;
  }

  .nav-button-right {
    right: 12px;
  }

  .lightbox-figure {
    padding: 0 10px 52px;
  }
}


