﻿/* ═══════════════════════════════════════════════════════════════════════════
   styles.css — FRAMES Gallery v2
   Dark minimalist Gen Z aesthetic
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg: #080808;
  --surface: #0f0f0f;
  --surface-2: #161616;
  --surface-3: #1e1e1e;
  --text: #f2f2f2;
  --text-muted: #666666;
  --text-faint: #2e2e2e;
  --accent: #c8f33b;
  --accent-dark: #a8d020;
  --border: #1a1a1a;
  --border-mid: #272727;
  --error: #ff4b4b;

  --radius: 5px;
  --radius-lg: 12px;
  --header-h: 58px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

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

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-mid);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   GATE
   ═══════════════════════════════════════════════════════════════════════════ */
.gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

.gate-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 85%, rgba(200, 243, 59, .05) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 15%, rgba(200, 243, 59, .04) 0%, transparent 70%);
  pointer-events: none;
}

.gate-content {
  position: relative;
  text-align: center;
  animation: fadeUp .9s var(--ease) both;
}

.gate-logo {
  font-size: clamp(52px, 11vw, 100px);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 10px;
  text-shadow: 0 0 80px rgba(200, 243, 59, .12);
}

.gate-tagline {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 52px;
}

.gate-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gate-input-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  overflow: hidden;
  width: 300px;
  max-width: 88vw;
  transition: border-color .15s, box-shadow .15s;
}

.gate-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 243, 59, .08);
}

.gate-input {
  flex: 1;
  background: var(--surface);
  color: var(--text);
  border: none;
  outline: none;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: .06em;
}

.gate-input::placeholder {
  color: var(--text-faint);
  letter-spacing: .12em;
}

.gate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--surface);
  color: var(--text-muted);
  border-left: 1px solid var(--border-mid);
  transition: color .15s, background .15s;
  flex-shrink: 0;
}

.gate-btn:hover {
  color: var(--accent);
  background: var(--surface-2);
}

.gate-error {
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--error);
  min-height: 16px;
  text-transform: uppercase;
}

.gate.shake .gate-input-wrap {
  animation: shake .45s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════════════════════ */
.app {
  min-height: 100vh;
  padding-top: var(--header-h);
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(8, 8, 8, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--text);
  user-select: none;
  flex-shrink: 0;
}

/* Mobile hamburger — hidden on desktop */
.header-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--text-muted);
  border-radius: var(--radius);
  border: 1px solid var(--border-mid);
  margin-left: auto;
  flex-shrink: 0;
  transition: color .15s, border-color .15s;
}

.header-menu-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* Nav drawer — inline on desktop, dropdown on mobile */
.header-nav-drawer {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}

/* Page links (Timeline / Occasions) */
.header-page-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.page-link {
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}

.page-link:hover {
  color: var(--text);
}

.page-link.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-mid);
}

/* Year nav */
.year-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
}

.year-nav::-webkit-scrollbar {
  display: none;
}

.year-pill {
  flex-shrink: 0;
  padding: 5px 13px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--text-muted);
  border: 1px solid var(--border-mid);
  background: transparent;
  transition: color .15s, border-color .15s, background .15s;
}

.year-pill:hover {
  color: var(--text);
  border-color: var(--text-faint);
}

.year-pill.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

/* Upload button */
.btn-upload {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: background .15s, transform .15s;
}

.btn-upload:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-upload:active {
  transform: translateY(0);
}

/* Primary button */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

.btn-primary:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 24px 100px;
}

.gallery-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 55vh;
}

.gallery-empty {
  text-align: center;
  padding: 110px 0;
}

.gallery-empty-icon {
  font-size: 44px;
  color: var(--border-mid);
  margin-bottom: 18px;
  line-height: 1;
}

.gallery-empty-text {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 2;
  letter-spacing: .04em;
}

/* ─── Occasions page ─────────────────────────────────────────────────────── */
.occasions-header {
  margin-bottom: 52px;
}

.occasions-title {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
}

.occasions-sub {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: 10px;
}

.occasion-section {
  margin-bottom: 72px;
  animation: fadeUp .5s var(--ease) both;
}

.occasion-section-header {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.occasion-section-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1;
}

.occasion-section-count {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .12em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding-bottom: 3px;
}

/* ─── Year sections ──────────────────────────────────────────────────────── */
.year-section {
  margin-bottom: 88px;
  animation: fadeUp .55s var(--ease) both;
}

.year-section-header {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.year-section-title {
  font-size: clamp(60px, 9vw, 112px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .88;
}

.year-section-count {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .12em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding-bottom: 4px;
}

/* ─── Month sub-section ──────────────────────────────────────────────────── */
.month-section {
  margin-top: 40px;
}

.month-section-heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.month-section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Masonry grid ───────────────────────────────────────────────────────── */
.gallery-grid {
  columns: 4 210px;
  column-gap: 10px;
}

/* ─── Media card ─────────────────────────────────────────────────────────── */
.gallery-card {
  break-inside: avoid;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface-2);
}

.gallery-card-img,
.gallery-card-video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .45s var(--ease), opacity .3s;
  opacity: 0;
}

.gallery-card-img.loaded,
.gallery-card-video.loaded {
  opacity: 1;
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .3s var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
  gap: 6px;
}

.gallery-card:hover .gallery-card-img,
.gallery-card:hover .gallery-card-video {
  transform: scale(1.04);
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-card-caption {
  font-size: 11px;
  color: #fff;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  line-height: 1.4;
}

/* Video badge */
.video-badge {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, .6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 8px;
}

/* Skeleton shimmer */
.gallery-card-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--surface-3);
  animation: pulse 1.6s ease-in-out infinite;
}

/* ── Spinners ────────────────────────────────────────────────────────────── */
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-mid);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

.spinner-sm {
  width: 16px;
  height: 16px;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(8, 8, 8, .3);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-box {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 940px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  animation: modalIn .3s var(--ease) both;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  transition: color .15s, background .15s;
}

.modal-close:hover {
  color: var(--text);
  background: var(--surface-3);
}

/* ─── Photo modal ──────────────────────────────────────────────────────── */
.photo-modal-box {
  max-width: 1100px;
}

.photo-modal-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  max-height: calc(100vh - 40px);
}

.photo-modal-image-wrap {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 360px;
}

.photo-modal-img,
.photo-modal-video {
  width: 100%;
  max-height: calc(100vh - 40px);
  object-fit: contain;
  display: block;
}

.photo-modal-video {
  height: 100%;
}

.photo-modal-info {
  display: flex;
  flex-direction: column;
  padding: 28px 22px 22px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  max-height: calc(100vh - 40px);
}

.photo-modal-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.photo-year-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 100px;
}

.photo-month-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--text-muted);
  background: var(--surface-3);
  border: 1px solid var(--border-mid);
  padding: 3px 10px;
  border-radius: 100px;
}

.photo-occasion-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--accent);
  background: rgba(200, 243, 59, .07);
  border: 1px solid rgba(200, 243, 59, .18);
  padding: 3px 10px;
  border-radius: 100px;
}

.photo-date {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: .04em;
}

.photo-caption {
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 6px;
}

.photo-uploader {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: .06em;
  margin-bottom: 24px;
}

/* ─── Comments ──────────────────────────────────────────────────────────── */
.comments-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.comments-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.comments-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  margin-bottom: 16px;
  min-height: 48px;
  max-height: 220px;
  padding-right: 2px;
}

.comments-loader {
  display: flex;
  justify-content: center;
  padding: 14px 0;
}

.comment-item {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 10px 12px;
  animation: fadeUp .25s var(--ease) both;
}

.comment-item[role="listitem"] {}

.comment-author {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  letter-spacing: .04em;
}

.comment-body {
  font-size: 13px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.55;
  word-break: break-word;
}

.comment-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 5px;
  letter-spacing: .06em;
}

.comments-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 300;
  font-style: italic;
  padding: 4px 0;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.comment-input,
.comment-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 300;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  resize: none;
}

.comment-input:focus,
.comment-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(200, 243, 59, .07);
}

.comment-input::placeholder,
.comment-textarea::placeholder {
  color: var(--text-faint);
}

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-comment-submit {
  background: var(--surface-3);
  color: var(--text);
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  border: 1px solid var(--border-mid);
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-comment-submit:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-comment-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UPLOAD MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.upload-modal-box {
  max-width: 520px;
  overflow-y: auto;
  max-height: calc(100vh - 40px);
}

.upload-heading {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
  padding: 26px 26px 0;
  margin-bottom: 20px;
}

.upload-form {
  padding: 0 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Drop zone */
.drop-zone {
  border: 1.5px dashed var(--border-mid);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  overflow: hidden;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--accent);
  background: rgba(200, 243, 59, .025);
}

.drop-placeholder {
  text-align: center;
  padding: 24px;
  pointer-events: none;
}

.drop-icon {
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.drop-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 5px;
}

.drop-subtext {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.drop-limits {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: .06em;
}

/* Preview area — thumbnail strip */
.drop-preview-area {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
  align-items: flex-start;
}

.preview-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-3);
  flex-shrink: 0;
}

.preview-thumb img,
.preview-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-thumb-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.preview-thumb-remove:hover {
  background: rgba(255, 75, 75, .85);
}

.preview-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 8px;
  color: #fff;
  text-align: center;
  background: rgba(0, 0, 0, .55);
  padding: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Compress status */
.compress-status {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: .06em;
  text-align: center;
  animation: fadeUp .2s var(--ease) both;
}

/* Upload fields */
.upload-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.optional {
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  font-size: 10px;
  color: var(--text-faint);
}

.required {
  color: var(--accent);
  font-weight: 700;
}

.form-input {
  background: var(--surface-2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 13px;
  font-size: 13px;
  outline: none;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(200, 243, 59, .07);
}

.form-input::placeholder {
  color: var(--text-faint);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-input[type=number]::-webkit-outer-spin-button,
.form-input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.form-input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.form-error {
  font-size: 11px;
  color: var(--error);
  letter-spacing: .04em;
  min-height: 16px;
  flex: 1;
}

/* Upload progress */
.upload-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-progress-bar-track {
  background: var(--surface-3);
  border-radius: 100px;
  height: 3px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width .3s var(--ease);
}

.upload-progress-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .06em;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(.96) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

@keyframes pulse {

  0%,
  100% {
    opacity: .35;
  }

  50% {
    opacity: .6;
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  18% {
    transform: translateX(-8px);
  }

  36% {
    transform: translateX(7px);
  }

  54% {
    transform: translateX(-5px);
  }

  72% {
    transform: translateX(4px);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── ≤900px: collapse year nav, show hamburger ─────────────────────────── */
@media (max-width: 900px) {
  .header-menu-toggle {
    display: flex;
  }

  /* Hide nav drawer by default; shown when .open */
  .header-nav-drawer {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(8, 8, 8, .97);
    border-bottom: 1px solid var(--border-mid);
    backdrop-filter: blur(16px);
    padding: 14px 20px 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    z-index: 99;
  }

  .header-nav-drawer.open {
    display: flex;
    animation: fadeUp .2s var(--ease) both;
  }

  .header-page-links {
    flex-wrap: wrap;
  }

  .year-nav {
    flex-wrap: wrap;
    max-width: 100%;
    overflow-x: visible;
  }

  /* Upload button: icon only on very small screens handled below */
  .header-inner {
    gap: 8px;
  }
}

/* ─── ≤600px: full-screen bottom sheet modals ───────────────────────────── */
@media (max-width: 600px) {
  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-box {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 96vh;
    border-bottom: none;
  }

  .photo-modal-box {
    max-width: 100%;
  }

  .photo-modal-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow-y: auto;
  }

  .photo-modal-image-wrap {
    min-height: 200px;
    max-height: 40vh;
  }

  .photo-modal-img,
  .photo-modal-video {
    max-height: 40vh;
  }

  .photo-modal-info {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: none;
    padding: 18px;
  }

  .comments-list {
    max-height: 160px;
  }

  .gallery-grid {
    columns: 2 140px;
    column-gap: 7px;
  }

  .gallery-card {
    margin-bottom: 7px;
  }

  .year-section-title {
    font-size: clamp(48px, 13vw, 72px);
  }

  .page {
    padding: 32px 14px 80px;
  }

  .upload-heading {
    padding: 20px 18px 0;
  }

  .upload-form {
    padding: 0 18px 22px;
  }

  .upload-fields-row {
    grid-template-columns: 1fr;
  }

  .btn-upload span {
    display: none;
  }

  .btn-upload {
    padding: 8px 10px;
  }
}

@media (max-width: 380px) {
  .gallery-grid {
    columns: 1 200px;
  }

  o {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: none;
    padding: 20px;
  }

  .comments-list {
    max-height: 180px;
  }

  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-box {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 96vh;
    border-bottom: none;
  }

  .gallery-grid {
    columns: 2 150px;
    column-gap: 8px;
  }

  .gallery-card {
    margin-bottom: 8px;
  }

  .year-section-title {
    font-size: clamp(52px, 14vw, 80px);
  }

  .header-inner {
    padding: 0 16px;
    gap: 10px;
  }

  .gallery-main {
    padding: 36px 16px 80px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    columns: 2 130px;
    column-gap: 6px;
  }

  .gallery-card {
    margin-bottom: 6px;
  }

  .upload-heading {
    padding: 22px 20px 0;
    font-size: 18px;
  }

  .upload-form {
    padding: 0 20px 22px;
  }

  .header-logo {
    font-size: 16px;
  }

  o {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: none;
    padding: 20px;
  }

  .comments-list {
    max-height: 180px;
  }

  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-box {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 96vh;
    border-bottom: none;
  }

  .gallery-grid {
    columns: 2 150px;
    column-gap: 8px;
  }

  .gallery-card {
    margin-bottom: 8px;
  }

  .year-section-title {
    font-size: clamp(52px, 14vw, 80px);
  }

  .header-inner {
    padding: 0 16px;
    gap: 10px;
  }

  .gallery-main {
    padding: 36px 16px 80px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    columns: 2 130px;
    column-gap: 6px;
  }

  .gallery-card {
    margin-bottom: 6px;
  }

  .upload-heading {
    padding: 22px 20px 0;
    font-size: 18px;
  }

  .upload-form {
    padding: 0 20px 22px;
  }

  .header-logo {
    font-size: 16px;
  }
}