/* ============================================
   APERTURE — Photo Gallery Design System
   Palette: warm gallery wall, not AI-default cream
   ============================================ */

:root {
  --paper: #ECE7DD;       /* warm gallery wall */
  --paper-deep: #DDD5C7;  /* recessed panels */
  --ink: #1F1C18;         /* near-black warm charcoal */
  --ink-soft: #4A453E;    /* secondary text */
  --rule: #C9BFAE;        /* hairline dividers */
  --accent: #A8431F;      /* darkroom safelight red-orange */
  --accent-soft: #C8704A;
  --white: #FAF8F4;

  --serif: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ---------- Layout shell ---------- */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .shell { padding: 0 20px; }
}

/* ---------- Header / nav: film-strip motif ---------- */

.site-header {
  position: relative;
  background: var(--ink);
  color: var(--white);
  padding: 28px 0 0;
  overflow: hidden;
}

.film-strip {
  height: 14px;
  background: var(--ink);
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent 0px, transparent 10px,
      var(--paper) 10px, var(--paper) 16px
    );
  background-position: 8px 4px;
  background-size: 26px 6px;
  background-repeat: repeat-x;
  opacity: 0.85;
}

.site-header .shell {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.brand-title {
  font-family: var(--display);

  font-weight: 600;
  font-size: 32px;
  letter-spacing: 0.01em;
  color: var(--white);
}

.brand span {
  color: var(--accent-soft);
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav a {
  opacity: 0.75;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: opacity 0.2s, border-color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  opacity: 1;
  border-color: var(--accent-soft);
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--rule);
}

.hero .eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 18px;
  max-width: 14ch;
}

.hero p {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0;
}

/* ---------- Album grid (contact-sheet style) ---------- */

.albums-section {
  padding: 56px 0 80px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.section-label .tick {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: 3px 8px;
  border-radius: 2px;
}

.section-label h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

.section-label .rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.album-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 14px 14px 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.album-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -10px rgba(31, 28, 24, 0.25);
}

.album-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-deep);
  margin-bottom: 14px;
}

.album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-thumb .perf {
  position: absolute;
  left: 0; right: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--white) 0 4px, transparent 4px 12px);
}
.album-thumb .perf.top { top: 0; }
.album-thumb .perf.bottom { bottom: 0; }

.album-thumb .empty-state {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.album-card h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 4px;
}

.album-card .meta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.empty-gallery {
  padding: 60px 24px;
  text-align: center;
  border: 1px dashed var(--rule);
  color: var(--ink-soft);
  font-size: 15px;
}

/* ---------- Photo grid (inside album view) ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.photo-item {
  display: flex;
  flex-direction: column;
}

.photo-frame {
  cursor: pointer;
  overflow: hidden;
  background: var(--paper-deep);
  aspect-ratio: 1;
  border: 1px solid var(--rule);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.photo-frame:hover img {
  transform: scale(1.06);
}

.album-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 36px;
}

.album-header h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 8px;
}

.back-link {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 22px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s;
  margin-bottom: 20px;
}

.back-link:hover { background: #8a3418; text-decoration: none; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 60px 48px 60px;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
  padding: 12px;
  opacity: 0.7;
  transition: opacity 0.2s;
  font-family: var(--sans);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-close { top: 20px; right: 28px; font-size: 22px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); font-size: 36px; }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); font-size: 36px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-family: var(--mono);
  font-size: 13px;
  opacity: 0.7;
}

/* ---------- About page ---------- */

.about-content {
  padding: 56px 0 80px;
  max-width: 640px;
}

.about-content h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 24px;
}

.about-content p {
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 18px;
}

/* ---------- Contact page ---------- */

.contact-content {
  padding: 56px 0 80px;
  max-width: 560px;
}

.contact-content h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 16px;
}

.contact-content > p {
  color: var(--ink-soft);
  margin-bottom: 36px;
}

.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent-soft);
  outline-offset: 1px;
}

.field textarea { resize: vertical; min-height: 140px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 13px 32px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  border-radius: 999px;
}

.btn:hover { background: #8a3418; color: #ffffff; }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }

.alert {
  padding: 14px 18px;
  border: 1px solid var(--rule);
  font-size: 14.5px;
  margin-bottom: 24px;
}

.alert.success { border-color: #5C7A4F; background: #EEF2EA; color: #3A5030; }
.alert.error { border-color: var(--accent); background: #F5E9E2; color: var(--accent); }

/* ---------- Admin ---------- */

.admin-shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

.admin-shell h1 {
  font-family: var(--serif);
  font-size: 32px;
  margin-bottom: 8px;
}

.admin-sub {
  color: var(--ink-soft);
  margin-bottom: 36px;
}

.login-box {
  max-width: 400px;
  margin: 80px auto;
  padding: 40px 32px;
  background: var(--white);
  border: 1px solid var(--rule);
}

.login-box h1 {
  font-family: var(--serif);
  font-size: 26px;
  margin-bottom: 28px;
  text-align: center;
}

.panel {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 28px;
  margin-bottom: 28px;
}

.panel h2 {
  font-family: var(--serif);
  font-size: 20px;
  margin: 0 0 20px;
}

.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 13px;
}

.admin-bar a {
  color: #ffffff;
  background: var(--accent);
  padding: 8px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
  border-radius: 999px;
}
.admin-bar a:hover { background: #8a3418; }

.album-manage-grid {
  display: grid;
  gap: 14px;
}

.album-manage-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--rule);
  background: var(--white);
}

.album-manage-row .thumb-sm {
  width: 56px;
  height: 56px;
  object-fit: cover;
  background: var(--paper-deep);
  flex-shrink: 0;
}

.album-manage-row .info {
  flex: 1;
}

.album-manage-row .info strong { font-family: var(--serif); font-size: 16px; }
.album-manage-row .info span { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.album-manage-row .actions {
  display: flex;
  gap: 10px;
}

.btn-sm {
  font-size: 11px;
  padding: 8px 18px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--sans);
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
  border-radius: 999px;
}

.btn-sm:hover { background: #8a3418; color: #ffffff; }
.btn-sm.danger { background: #8a1a1a; }
.btn-sm.danger:hover { background: #c00; color: #ffffff; }

.manage-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.manage-photo-item {
  position: relative;
  border: 1px solid var(--rule);
  padding-bottom: 12px;
  background: var(--white);
}

.manage-photo-item .thumb-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.manage-photo-item .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-caption-form {
  padding: 8px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-caption-form .caption-field {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
}

.photo-caption-form button {
  align-self: flex-end;
}

.manage-photo-item .del-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(31,28,24,0.85);
  color: var(--white);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.manage-photo-item .del-btn:hover { background: var(--accent); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Focus visibility (accessibility) ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================
   PHOTO CAPTIONS
   ============================================ */

.photo-caption {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 8px 2px 0;
  line-height: 1.4;
}

.lightbox-caption {
  position: absolute;
  bottom: 56px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--white);
  opacity: 0.85;
  padding: 0 60px;
}

.caption-field {
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  background: var(--white);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
}

.caption-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}

.caption-row button {
  flex-shrink: 0;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 40px 0 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  color: var(--ink);
  background: var(--white);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.page-link.prev,
.page-link.next {
  padding: 0 14px;
}

.page-link:hover:not(.disabled):not(.current) {
  border-color: var(--accent-soft);
  color: var(--accent);
}

.page-link.current {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.page-link.disabled {
  opacity: 0.35;
  cursor: default;
}

/* ============================================
   BLOG
   ============================================ */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 32px 0;
}

.blog-card {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 28px;
}

.blog-card .blog-date {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.blog-card h2 {
  font-family: var(--serif);
  font-size: 28px;
  margin: 8px 0 10px;
}

.blog-card h2 a {
  transition: color 0.2s;
}

.blog-card h2 a:hover {
  color: var(--accent);
}

.blog-card .blog-excerpt {
  color: var(--ink-soft);
  line-height: 1.7;
}

.blog-card .read-more {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}

.blog-post-header {
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 32px;
}

.blog-post-header .blog-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.blog-post-header h1 {
  font-family: var(--display);

  font-size: 44px;
  margin: 10px 0 0;
}

.blog-post-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 56px;
  white-space: pre-wrap;
}

.empty-gallery.blog {
  margin: 40px 0;
}

/* ============================================
   WAV / AUDIO SHARING
   ============================================ */

.audio-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 32px 0 48px;
}

.audio-card {
  border: 1px solid var(--rule);
  background: var(--white);
  padding: 20px 24px;
}

.audio-card h3 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0 0 4px;
}

.audio-card .audio-caption {
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 14px;
}

.audio-card audio {
  width: 100%;
}

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.play-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.play-btn:hover { background: var(--accent); }

.player .seek {
  flex: 1;
  min-width: 0;
}

.player .time-label {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  min-width: 84px;
  text-align: right;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.volume-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.volume-row .volume {
  width: 120px;
}

.volume-row .volume-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  min-width: 40px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--rule);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  border: none;
}

@media (max-width: 480px) {
  .player .time-label { display: none; }
  .volume-row .volume { width: 90px; }
}

/* Admin: audio + blog forms reuse .panel/.field/.btn from admin styles */

.audio-manage-row,
.post-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.audio-manage-row:last-child,
.post-manage-row:last-child {
  border-bottom: none;
}

.audio-manage-row .info,
.post-manage-row .info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.audio-manage-row .info span,
.post-manage-row .info span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}

/* ============================================
   TITLE PAGE BANNER (homepage only)
   ============================================ */

.title-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--ink);
  line-height: 0;
}

.title-banner img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 380px;
  object-fit: cover;
  object-position: center 35%;
}

.title-banner-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 18px 32px 20px;
  background: linear-gradient(to top, rgba(31,28,24,0.78) 0%, rgba(31,28,24,0) 100%);
  width: 100%;
}

.title-banner-name {
  font-family: var(--display);

  font-weight: 600;
  font-size: 44px;
  color: var(--white);
  margin: 0;
  letter-spacing: 0.01em;
}

.title-banner-copyright {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(250,248,244,0.75);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .title-banner img { max-height: 220px; }
  .title-banner-overlay { padding: 14px 20px 16px; }
  .title-banner-name { font-size: 30px; }
}

/* ============================================
   FEATURED IMAGES
   ============================================ */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0 48px;
}

.featured-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.featured-thumb {
  overflow: hidden;
  aspect-ratio: 3/2;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  position: relative;
}

.featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
  pointer-events: none;
}

.featured-card:hover .featured-thumb img {
  transform: scale(1.04);
}

.featured-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
}

/* Fullscreen featured image page */

body.featured-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.featured-full {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 48px;
  width: 100%;
  box-sizing: border-box;
}

.featured-full-img-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.featured-full-img-wrap img {
  max-width: 100%;
  max-height: calc(100vh - 180px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.featured-full-info {
  width: 100%;
  max-width: 760px;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.featured-full-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

.featured-full-caption {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}

.featured-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  gap: 12px;
}

.featured-nav-link {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 22px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-nav-link:hover { background: #8a3418; color: #ffffff; }
.featured-nav-link.back { background: var(--accent); flex-shrink: 0; }

/* Star button in manage-album */

.star-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(31,28,24,0.75);
  color: var(--ink-soft);
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.star-btn:hover { background: rgba(31,28,24,0.95); color: gold; }
.star-btn.starred { background: rgba(31,28,24,0.85); color: gold; }

/* Admin featured manage grid */

.featured-manage-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.featured-manage-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.featured-manage-item:last-child { border-bottom: none; }

.featured-manage-item img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--rule);
}

.featured-manage-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.featured-manage-info span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.featured-manage-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .featured-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .featured-full-img-wrap img { max-height: calc(100vh - 320px); }
  .featured-nav-link { max-width: 35%; }
}

.featured-full-discussion {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  margin-top: 8px;
  max-width: 680px;
  white-space: pre-wrap;
}

/* ============================================
   FEATURED ENTRIES (single-page layout)
   ============================================ */

.featured-entries {
  display: flex;
  flex-direction: column;
  gap: 72px;
  margin: 32px 0 64px;
}

.featured-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.featured-entry-img-wrap {
  width: 100%;
  text-align: center;
}

.featured-entry-img-wrap img {
  max-width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  cursor: default;
}

.featured-entry-body {
  width: 100%;
  max-width: 640px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.featured-entry-title {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.featured-entry-caption {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}

.featured-entry-discussion {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  margin-top: 4px;
}

@media (max-width: 640px) {
  .featured-entries { gap: 48px; }
  .featured-entry-img-wrap img { max-height: 70vh; }
}

.featured-entry-prompt {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 8px;
  letter-spacing: 0.03em;
}

.featured-entry-img-wrap a {
  display: block;
  cursor: zoom-in;
}

.featured-entry-img-wrap a:hover img {
  opacity: 0.92;
  transition: opacity 0.2s;
}

/* ============================================
   PHOTO PAGE (dedicated full image + discussion)
   ============================================ */

.photo-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 32px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-page-img-wrap {
  width: 100%;
  text-align: center;
}

.photo-page-img-wrap img {
  max-width: 100%;
  max-height: 82vh;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.photo-page-body {
  width: 100%;
  max-width: 680px;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.photo-page-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.photo-page-caption {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}

.photo-page-discussion {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
}

.photo-page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  gap: 12px;
}

.photo-nav-btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  padding: 12px 26px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
  border-radius: 999px;
}

.photo-nav-btn:hover { background: #8a3418; color: #ffffff; }
.photo-nav-btn.back { background: var(--accent); }
.photo-nav-btn.back:hover { background: #8a3418; }

.photo-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

@media (max-width: 640px) {
  .photo-page { padding: 20px 16px 48px; }
  .photo-page-img-wrap img { max-height: 65vh; }
  .photo-nav-btn { padding: 10px 14px; font-size: 10px; }
}
