:root {
  --paper: #eef1ec;
  --panel: #f8faf6;
  --ink: #171c19;
  --ink-soft: #2f3732;
  --muted: #66706a;
  --line: #d3dbd2;
  --accent-dark: #2f4d40;
  --body-font: "Aptos", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-font: Georgia, "Times New Roman", serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-font);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 77, 64, 0.32);
  outline-offset: 3px;
}

.photos-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(211, 219, 210, 0.9);
  background: rgba(248, 250, 246, 0.94);
  box-shadow: 0 8px 24px rgba(23, 28, 25, 0.06);
  backdrop-filter: blur(18px);
}

.photos-header-inner {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 12px 0;
}

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

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.photos-title h1 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 42px;
  font-weight: 650;
  line-height: 0.98;
}

.photos-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.photos-nav-button,
.photos-icon-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(23, 28, 25, 0.05);
}

.photos-nav-button {
  border-radius: 999px;
  padding: 0 16px;
}

.photos-icon-link {
  width: 42px;
  padding: 0;
  border-radius: 50%;
}

.photos-icon-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.photos-icon-link.is-current {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #ffffff;
}

.photos-nav-button:hover,
.photos-icon-link:hover {
  border-color: rgba(47, 77, 64, 0.58);
  transform: translateY(-1px);
}

.photos-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 54px;
}

.photos-board {
  display: grid;
  grid-auto-rows: 8px;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.photo-post {
  display: block;
  width: 100%;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(211, 219, 210, 0.94);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(23, 28, 25, 0.08);
}

.photo-post-link {
  display: block;
  width: 100%;
  background: #e2e7df;
}

.photo-post img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 11px;
}

.photo-tags span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(211, 219, 210, 0.9);
  border-radius: 999px;
  background: rgba(238, 241, 236, 0.82);
  color: var(--ink-soft);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.photos-state {
  display: block;
  grid-column: 1 / -1;
  grid-row: span 4;
  width: 100%;
  margin: 0;
  border: 1px dashed rgba(47, 77, 64, 0.3);
  border-radius: 8px;
  background: rgba(248, 250, 246, 0.74);
  color: var(--muted);
  padding: 28px;
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.photos-load-more {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.photos-load-more[hidden] {
  display: none;
}

.photos-load-more.is-sentinel {
  min-height: 1px;
  margin-top: 0;
}

.photos-load-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(47, 77, 64, 0.2);
  border-top-color: var(--accent-dark);
  border-radius: 50%;
  animation: photos-spin 700ms linear infinite;
}

.photos-load-spinner[hidden] {
  display: none;
}

.photos-load-more button {
  min-height: 36px;
  border: 1px solid var(--accent-dark);
  border-radius: 999px;
  background: var(--accent-dark);
  color: #ffffff;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 900;
}

.photos-load-more button[hidden] {
  display: none;
}

@keyframes photos-spin {
  to {
    transform: rotate(360deg);
  }
}

.photos-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 28, 25, 0.48);
  backdrop-filter: blur(10px);
}

.photos-auth-overlay[hidden] {
  display: none;
}

.photos-auth-dialog {
  position: relative;
  width: min(440px, 92vw);
  border: 1px solid rgba(211, 219, 210, 0.96);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 32px 90px rgba(23, 28, 25, 0.34);
}

.photos-auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.photos-auth-form {
  display: grid;
  gap: 12px;
  padding: 28px;
}

.photos-auth-form h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 30px;
}

.photos-auth-form p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.photos-auth-form label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.photos-auth-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 13px;
  font-size: 16px;
}

.photos-auth-form button {
  min-height: 44px;
  border: 1px solid var(--accent-dark);
  border-radius: 999px;
  background: var(--accent-dark);
  color: #ffffff;
  font-weight: 900;
}

@media (min-width: 620px) {
  .photos-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 940px) {
  .photos-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .photos-header-inner,
  .photos-shell {
    width: calc(100% - 20px);
  }

  .photos-header-inner {
    min-height: 76px;
    gap: 10px;
  }

  .photos-title h1 {
    font-size: 30px;
  }

  .photos-nav {
    gap: 6px;
  }

  .photos-nav-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }

  .photos-icon-link {
    width: 38px;
    min-height: 38px;
  }

  .photos-shell {
    padding-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photos-load-spinner {
    animation: none;
  }
}
