/* Photo-first production skin: loaded after existing page styles. */
:root {
  --skin-bg: #030507;
  --skin-bg-soft: #080d14;
  --skin-panel: rgba(8, 13, 20, 0.78);
  --skin-panel-solid: #101827;
  --skin-glass: rgba(8, 13, 20, 0.64);
  --skin-popover: rgba(8, 13, 20, 0.94);
  --skin-line: rgba(255, 255, 255, 0.14);
  --skin-line-soft: rgba(255, 255, 255, 0.08);
  --skin-text: #f8fafc;
  --skin-dim: rgba(248, 250, 252, 0.72);
  --skin-muted: rgba(248, 250, 252, 0.48);
  --skin-blue: #7dd3fc;
  --skin-orange: #f97316;
  --skin-pink: #ec4899;
  --skin-green: #34d399;
  --skin-amber: #fbbf24;
  --skin-danger: #fb7185;
  --skin-radius: 8px;
  --skin-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  --bg: var(--skin-bg);
  --bg-alt: var(--skin-bg-soft);
  --bg-accent: var(--skin-panel-solid);
  --bg-overlay: rgba(3, 5, 7, 0.86);
  --border: var(--skin-line);
  --border-hover: rgba(255, 255, 255, 0.24);
  --text: var(--skin-text);
  --text-dim: var(--skin-dim);
  --text-muted: var(--skin-muted);
  --accent: var(--skin-blue);
  --accent-light: #dff6ff;
  --primary: var(--skin-text);
  --primary-text: #111827;
  --radius: var(--skin-radius);
  --radius-lg: var(--skin-radius);
}

body.photo-first-skin {
  background: var(--skin-bg);
  color: var(--skin-text);
  color-scheme: dark;
}

.photo-first-skin a {
  text-underline-offset: 0.2em;
}

.photo-first-skin button,
.photo-first-skin input,
.photo-first-skin textarea,
.photo-first-skin select {
  border-radius: var(--skin-radius);
}

.photo-first-skin input,
.photo-first-skin textarea,
.photo-first-skin select {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--skin-line);
  color: var(--skin-text);
}

.photo-first-skin select,
.photo-first-skin select option,
.photo-first-skin select optgroup {
  background-color: var(--skin-panel-solid);
  color: var(--skin-text);
}

.photo-first-skin select option:checked {
  background-color: #164e63;
}

.photo-first-skin input:focus,
.photo-first-skin textarea:focus,
.photo-first-skin select:focus {
  border-color: rgba(125, 211, 252, 0.76) !important;
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.12) !important;
  outline: none !important;
}

.photo-first-skin .menu-toggle,
.photo-first-skin #masonryMenuToggle {
  width: 44px;
  height: 44px;
  background: var(--skin-glass);
  border-color: var(--skin-line);
  border-radius: var(--skin-radius);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--skin-shadow);
}

.photo-first-skin .sidebar,
.photo-first-skin .admin-sidebar,
.photo-first-skin .setup-sidebar {
  background: rgba(3, 5, 7, 0.94);
  border-color: var(--skin-line-soft);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.photo-first-skin .sidebar-nav a,
.photo-first-skin .nav-item,
.photo-first-skin .auth-btn {
  border-radius: var(--skin-radius);
  color: var(--skin-dim);
  letter-spacing: 0.04em;
}

.photo-first-skin .sidebar-nav a:hover,
.photo-first-skin .sidebar-nav a.active,
.photo-first-skin .nav-item:hover,
.photo-first-skin .nav-item.active,
.photo-first-skin .auth-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--skin-text);
}

.photo-first-skin .hero {
  min-height: clamp(60vh, 68vh, 78vh);
  align-items: flex-end;
  justify-content: flex-start;
  padding: 6rem clamp(1rem, 4vw, 3rem) clamp(4rem, 10vh, 7rem);
  text-align: left;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.18),
      rgba(0, 0, 0, 0.08) 36%,
      rgba(0, 0, 0, 0.88)
    ),
    radial-gradient(ellipse at 30% 20%, #1a2230 0%, #0a0d12 60%, #05070a 100%);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  border-bottom: 1px solid var(--skin-line-soft);
}

/* When a same-origin hero photo is available, it is injected as the first
   background layer via the --hero-image custom property (set in JS). */
.photo-first-skin .hero.has-hero-image {
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.05) 40%,
      rgba(0, 0, 0, 0.78)
    ),
    var(--hero-image) center / cover no-repeat,
    radial-gradient(ellipse at 30% 20%, #1a2230 0%, #0a0d12 60%, #05070a 100%);
}

.photo-first-skin .hero-content {
  max-width: 920px;
  margin: 0;
}

.photo-first-skin .hero-eyebrow {
  color: var(--skin-blue);
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}

.photo-first-skin .hero-title {
  max-width: 900px;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 500;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.photo-first-skin .hero-subtitle {
  max-width: 46rem;
  color: var(--skin-dim);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.6;
}

body.photo-first-skin > main {
  position: relative;
  z-index: 2;
  margin-top: -3rem;
  padding-top: 0;
}

.photo-first-skin .section-header {
  padding: 0 clamp(1rem, 3vw, 2rem) 1rem;
}

.photo-first-skin .section-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: 0;
}

.photo-first-skin .gallery-cards {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 0.75rem;
}

.photo-first-skin .gallery-card {
  overflow: hidden;
  border-color: var(--skin-line);
  border-radius: var(--skin-radius);
  background: var(--skin-panel-solid);
  box-shadow: var(--skin-shadow);
}

.photo-first-skin .gallery-card:hover {
  border-color: rgba(125, 211, 252, 0.42);
  transform: translateY(-3px);
}

.photo-first-skin .thumb-wrapper {
  min-height: clamp(220px, 28vw, 360px);
}

.photo-first-skin .card-overlay {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 58%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
  padding: 1rem;
}

.photo-first-skin .card-title {
  letter-spacing: 0;
  text-transform: none;
}

.photo-first-skin .card-desc,
.photo-first-skin .meta {
  color: var(--skin-dim);
}

.photo-first-skin .site-footer {
  background: var(--skin-glass);
  border-top: 1px solid var(--skin-line-soft);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

body.gallery-page.photo-first-skin {
  background: var(--skin-bg);
}

.gallery-page.photo-first-skin .masonry-nav,
.gallery-page.photo-first-skin .viewer-controls,
.gallery-page.photo-first-skin .keyboard-hint {
  background: var(--skin-glass);
  border: 1px solid var(--skin-line);
  border-radius: var(--skin-radius);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.gallery-page.photo-first-skin .masonry-nav {
  top: 0.75rem;
  left: auto;
  right: 1rem;
  width: auto;
  padding: 0.65rem 0.85rem;
}

.gallery-page.photo-first-skin .gallery-header {
  padding: 5.75rem clamp(1rem, 3vw, 2rem) 1rem;
}

.gallery-page.photo-first-skin .gallery-header h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  letter-spacing: 0;
  text-transform: none;
}

.gallery-page.photo-first-skin #masonryView .photo-grid {
  padding: 0.65rem;
  border-top-color: var(--skin-line-soft);
}

.gallery-page.photo-first-skin .photo-card,
.gallery-page.photo-first-skin .photo-grid .photo-card {
  overflow: hidden;
  border-radius: 5px;
  background: var(--skin-panel-solid);
}

.gallery-page.photo-first-skin .photo-card img {
  border-radius: 5px;
}

.gallery-page.photo-first-skin .masonry-caption-row,
.gallery-page.photo-first-skin .caption-row,
.gallery-page.photo-first-skin .thumbnail-strip {
  background: var(--skin-glass);
  border-color: var(--skin-line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

/* EXIF search popovers sit directly over the photo wall, so they need a more
   opaque surface (not translucent glass), stronger blur, and elevation so the
   busy imagery behind them stops competing with labels, chips, and values. */
.gallery-page.photo-first-skin .viewer-exif-hints,
.gallery-page.photo-first-skin .masonry-exif-hints {
  background: var(--skin-popover);
  border-color: var(--skin-line);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: var(--skin-shadow);
}

.gallery-page.photo-first-skin .masonry-caption-row,
.gallery-page.photo-first-skin .caption-row {
  margin: 0.75rem;
  border-radius: var(--skin-radius);
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  box-shadow: var(--skin-shadow);
}

.gallery-page.photo-first-skin .search-mode-switch,
.gallery-page.photo-first-skin .toolbar .search-mode-switch,
.gallery-page.photo-first-skin .viewer .search-mode-switch {
  border-color: var(--skin-line);
  border-radius: var(--skin-radius);
  overflow: hidden;
}

.gallery-page.photo-first-skin .search-mode-switch button[aria-pressed="true"],
.gallery-page.photo-first-skin
  .toolbar
  .search-mode-switch
  button[aria-pressed="true"],
.gallery-page.photo-first-skin
  .viewer
  .search-mode-switch
  button[aria-pressed="true"] {
  background: var(--skin-text);
  color: #111827;
}

.gallery-page.photo-first-skin .tag-pill,
.gallery-page.photo-first-skin .exif-value-chip,
.gallery-page.photo-first-skin .masonry-exif-hints .exif-hints-chips button,
.gallery-page.photo-first-skin .viewer-exif-hints .exif-hints-chips button {
  border: 1px solid var(--skin-line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--skin-dim);
}

/* Hover + selected states for EXIF value chips. The shared skin loads after
   styles.css and its base chip rule out-specifies styles.css's
   `.exif-value-chip.selected`, so the selected state must be redefined here or
   selected chips look identical to unselected ones. Uses --skin-blue (brass in
   the Dark Room viewer, the default accent elsewhere) so it adapts per page. */
.gallery-page.photo-first-skin .exif-value-chip:hover {
  border-color: var(--skin-blue);
  background: rgba(255, 255, 255, 0.14);
  color: var(--skin-text);
}

.gallery-page.photo-first-skin .exif-value-chip.selected {
  border-color: var(--skin-blue);
  background: var(--skin-blue);
  color: #111827;
}

.gallery-page.photo-first-skin .tag-pill.priority-high {
  background: rgba(52, 211, 153, 0.14);
  color: #d1fae5;
}

.contact-page.photo-first-skin {
  min-height: 100vh;
  background:
    linear-gradient(
      90deg,
      rgba(3, 5, 7, 0.18),
      rgba(3, 5, 7, 0.92) 58%,
      rgba(3, 5, 7, 0.98)
    ),
    url("../images/backgrounds/contact-bg.jpg") center / cover no-repeat fixed;
}

.contact-page.photo-first-skin .contact-container {
  justify-content: flex-end;
  padding: clamp(5rem, 10vh, 8rem) clamp(1rem, 5vw, 5rem) 2rem;
}

.contact-page.photo-first-skin .contact-card,
.photo-first-skin .auth-modal,
.photo-first-skin .token-box {
  max-width: 520px;
  background: var(--skin-glass);
  border-color: var(--skin-line);
  border-radius: var(--skin-radius);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--skin-shadow);
}

.contact-page.photo-first-skin .contact-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0;
}

.contact-page.photo-first-skin .submit-btn,
.photo-first-skin button.primary,
.photo-first-skin .btn-primary,
.photo-first-skin .auth-submit,
.photo-first-skin .token-box button {
  background: var(--skin-text);
  color: #111827;
  border: 1px solid var(--skin-text);
  border-radius: var(--skin-radius);
  letter-spacing: 0.04em;
}

.photo-first-skin button.secondary,
.photo-first-skin .btn-secondary,
.photo-first-skin button.ghost,
.photo-first-skin button.icon-btn {
  border-color: var(--skin-line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--skin-text);
  border-radius: var(--skin-radius);
}

.photo-first-skin button.danger {
  border-color: rgba(251, 113, 133, 0.46);
  color: var(--skin-danger);
}

.photo-first-skin form,
.photo-first-skin .form-card,
.photo-first-skin .option-card,
.photo-first-skin .db-config-section,
.photo-first-skin .deploy-progress,
.photo-first-skin .preflight-item,
.photo-first-skin .admin-panel .gallery-card,
.photo-first-skin .storage-notice,
.photo-first-skin .ai-toggle-row,
.photo-first-skin .cloud-settings,
.photo-first-skin .ai-saved-summary {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--skin-line-soft);
  border-radius: var(--skin-radius);
}

.photo-first-skin .admin-main,
.photo-first-skin .setup-main {
  max-width: none;
  background:
    linear-gradient(180deg, rgba(125, 211, 252, 0.05), transparent 18rem),
    var(--skin-bg);
}

.photo-first-skin .panel-header,
.photo-first-skin #panel-photos .panel-header,
.photo-first-skin .setup-header {
  border-bottom-color: var(--skin-line-soft);
}

.photo-first-skin .panel-header h2,
.photo-first-skin .setup-header h1 {
  letter-spacing: 0;
  font-weight: 500;
}

.photo-first-skin .data-table th,
.photo-first-skin .data-table td,
.photo-first-skin .summary-item {
  border-color: var(--skin-line-soft);
}

.photo-first-skin .data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.045);
}

.photo-first-skin .status-badge,
.photo-first-skin .data-table .status-badge,
.photo-first-skin .option-badge,
.photo-first-skin .group-tag,
.photo-first-skin .selection-badge {
  border: 1px solid var(--skin-line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--skin-dim);
}

.photo-first-skin .status-badge.active,
.photo-first-skin .data-table .status-badge.active,
.photo-first-skin .option-badge.recommended {
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(52, 211, 153, 0.13);
  color: #d1fae5;
}

.photo-first-skin .status-badge.pending,
.photo-first-skin .data-table .status-badge.pending {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.13);
  color: #fef3c7;
}

.photo-first-skin .photo-action-bar {
  background: var(--skin-glass);
  border-color: var(--skin-line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.photo-first-skin .photo-action-bar .filter-pills button,
.photo-first-skin .sub-option {
  border-color: var(--skin-line-soft);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.photo-first-skin .photo-action-bar .filter-pills button.active,
.photo-first-skin .sub-option.selected,
.photo-first-skin .option-card.selected {
  border-color: rgba(125, 211, 252, 0.44);
  background: rgba(125, 211, 252, 0.12);
  color: var(--skin-text);
}

.photo-first-skin .photo-card,
.photo-first-skin #photoGrid .photo-card {
  overflow: hidden;
  border-color: var(--skin-line-soft);
  border-radius: var(--skin-radius);
  background: rgba(255, 255, 255, 0.045);
}

.photo-first-skin .step-number {
  border-color: var(--skin-line);
  background: rgba(255, 255, 255, 0.06);
}

.photo-first-skin .step-item.active .step-number {
  background: var(--skin-blue);
  border-color: var(--skin-blue);
  color: #082f49;
}

.photo-first-skin .step-item.completed .step-number {
  background: var(--skin-green);
  border-color: var(--skin-green);
}

.photo-first-skin .alert-success,
.photo-first-skin .connection-status.success,
.photo-first-skin .deploy-event.success {
  color: #d1fae5;
}

.photo-first-skin .alert-error,
.photo-first-skin .connection-status.error,
.photo-first-skin .deploy-event.error,
.photo-first-skin .form-error {
  color: var(--skin-danger);
}

@media (max-width: 768px) {
  .photo-first-skin .hero {
    padding: 6rem 1rem 18rem;
  }

  body.photo-first-skin > main {
    margin-top: -16rem;
  }

  .gallery-page.photo-first-skin .masonry-nav {
    /* Links collapse into the hamburger menu on mobile; hide the empty pill */
    display: none;
  }

  .gallery-page.photo-first-skin .masonry-caption-row,
  .gallery-page.photo-first-skin .caption-row {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    margin: 0.5rem;
  }

  .contact-page.photo-first-skin .contact-container {
    justify-content: center;
    padding-inline: 1rem;
  }
}
