/* styles.css — Digiroid shared stylesheet */

/* ─── Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Syne:wght@400;500;700;800&family=Sono:wght@300;400;500;600&family=Caveat:wght@500;700&display=swap');

/* ─── Design tokens ─────────────────────────────────────── */
:root {
  --cream:        #f5f0e8;
  --cream-dark:   #ede7d9;
  --ink:          #1a1714;
  --ink-muted:    #5a5550;
  --ink-ghost:    #9a9490;
  --amber:        #d4830a;
  --amber-light:  #f5c96a;
  --amber-pale:   #fdf3dc;
  --red-warm:     #c0392b;
  --green-muted:  #3d6b4f;

  --card-shadow:  0 4px 24px rgba(26,23,20,.08), 0 1px 4px rgba(26,23,20,.04);
  --card-hover:   0 16px 48px rgba(26,23,20,.14), 0 4px 12px rgba(26,23,20,.08);

  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    20px;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-ui:      'Syne', sans-serif;
  --font-mono:    'Sono', monospace;
  --font-hand:    'Caveat', cursive;

  --transition:   all .22s cubic-bezier(.4,0,.2,1);
}

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

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-ui);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ─── Grain overlay ─────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ─── Utility ───────────────────────────────────────────── */
.hidden { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: var(--transition);
  line-height: 1;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover {
  background: #2e2a26;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(26,23,20,.2);
}

.btn-amber {
  background: var(--amber);
  color: #fff;
}
.btn-amber:hover {
  background: #b8720a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(212,131,10,.3);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border: 1.5px solid var(--cream-dark);
}
.btn-ghost:hover {
  border-color: var(--ink-ghost);
  color: var(--ink);
}

.btn-danger {
  background: var(--red-warm);
  color: #fff;
}

/* ─── Top nav ───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245,240,232,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-dark);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-mark {
  width: 34px;
  height: 34px;
  background: var(--ink);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-mark svg {
  fill: var(--cream);
  width: 18px;
  height: 18px;
}

.nav-wordmark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -.01em;
}

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

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cream-dark);
}

/* ─── Auth screen ───────────────────────────────────────── */
#auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.auth-hero-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
  font-weight: 600;
}

.auth-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 16px;
  max-width: 560px;
}

.auth-subtitle {
  font-size: .95rem;
  color: var(--ink-muted);
  max-width: 400px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.google-btn:hover {
  border-color: #aaa;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.google-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.auth-features {
  display: flex;
  gap: 32px;
  margin-top: 60px;
  flex-wrap: wrap;
  justify-content: center;
}

.auth-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--ink-muted);
  max-width: 120px;
  text-align: center;
}

.auth-feature-icon {
  width: 40px;
  height: 40px;
  background: var(--amber-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

/* ─── Dashboard ─────────────────────────────────────────── */
#dashboard-screen {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px;
}

.dash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--ink);
}

.dash-subtitle {
  font-size: .85rem;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* Albums grid */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.album-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--cream-dark);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  cursor: pointer;
}

.album-card:hover {
  box-shadow: var(--card-hover);
  transform: translateY(-3px);
}

.album-card-thumb {
  height: 160px;
  background: var(--cream-dark);
  position: relative;
  overflow: hidden;
}

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

.album-card-thumb-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: .3;
}

.album-card-body {
  padding: 16px;
}

.album-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-card-desc {
  font-size: .78rem;
  color: var(--ink-muted);
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.album-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.album-card-code {
  font-family: var(--font-mono);
  font-size: .7rem;
  background: var(--amber-pale);
  color: var(--amber);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: .04em;
}

.album-card-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  transition: var(--transition);
  color: var(--ink-muted);
  background: var(--cream);
}
.icon-btn:hover { background: var(--cream-dark); color: var(--ink); }
.icon-btn.danger:hover { background: #fdecea; color: var(--red-warm); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-muted);
  grid-column: 1 / -1;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: .4;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 8px;
}

/* ─── Modal ─────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26,23,20,.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .18s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(26,23,20,.25);
  animation: slideUp .22s cubic-bezier(.4,0,.2,1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--ink-muted);
  transition: var(--transition);
}
.modal-close:hover { background: var(--cream-dark); color: var(--ink); }

.modal-body { padding: 24px 28px; }
.modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form fields */
.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--ink);
  transition: var(--transition);
  outline: none;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--amber);
  background: #fff;
}

.field-hint {
  font-size: .72rem;
  color: var(--ink-ghost);
  margin-top: 5px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Code preview badge in field */
.code-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: .75rem;
  background: var(--amber-pale);
  color: var(--amber);
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 6px;
  font-weight: 600;
}

/* ─── Editor screen ─────────────────────────────────────── */
#editor-screen {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.editor-breadcrumb {
  font-size: .75rem;
  color: var(--ink-ghost);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-breadcrumb a {
  color: var(--ink-muted);
  transition: var(--transition);
}
.editor-breadcrumb a:hover { color: var(--amber); }

.editor-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--ink);
}

.editor-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.share-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--amber-pale);
  border: 1px solid var(--amber-light);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--amber);
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: var(--transition);
}
.share-badge:hover { background: var(--amber-light); }

/* Meta edit panel */
.meta-panel {
  background: #fff;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  box-shadow: var(--card-shadow);
}

@media (max-width: 600px) {
  .meta-panel { grid-template-columns: 1fr; }
}

.meta-panel .field { margin-bottom: 0; }

/* Photos section */
.photos-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
}

.section-subtitle {
  font-size: .78rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Drive info bar */
.drive-info {
  background: var(--amber-pale);
  border: 1px solid var(--amber-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .8rem;
  color: var(--amber);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.drive-info strong {
  color: var(--ink);
}

/* Photos grid in editor */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.photo-item {
  background: #fff;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--card-shadow);
}

.photo-item:hover {
  border-color: var(--amber-light);
  box-shadow: var(--card-hover);
}

.photo-item-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--cream-dark);
  position: relative;
}

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

.photo-item:hover .photo-item-img img {
  transform: scale(1.04);
}

.photo-item-body {
  padding: 12px;
}

.photo-item-title {
  font-weight: 700;
  font-size: .82rem;
  color: var(--ink);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-item-desc {
  font-size: .75rem;
  color: var(--ink-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-item-edit-btn {
  width: 100%;
  margin-top: 10px;
  padding: 7px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: var(--transition);
  font-family: var(--font-ui);
}
.photo-item-edit-btn:hover { background: var(--ink); color: #fff; }

/* Import progress bar */
.import-progress {
  margin: 16px 0;
  background: var(--cream-dark);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}

.import-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--amber-light));
  border-radius: 99px;
  transition: width .3s ease;
}

/* Selectable photo during import — checkbox overlay */
.photo-item-select {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 2px solid var(--amber);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
}

.photo-item.selected .photo-item-select {
  background: var(--amber);
}

.photo-item-img { position: relative; }

/* Import mode toolbar */
.import-toolbar {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.import-toolbar-label {
  font-size: .82rem;
  font-weight: 600;
}

.import-toolbar-actions {
  display: flex;
  gap: 8px;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--cream) 25%, var(--cream-dark) 50%, var(--cream) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Toast ─────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.toast {
  background: var(--ink);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(26,23,20,.25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn .2s ease;
  max-width: 320px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.success { border-left: 3px solid #52b788; }
.toast.error   { border-left: 3px solid var(--red-warm); }
.toast.info    { border-left: 3px solid var(--amber); }

/* ─── Album public view ─────────────────────────────────── */
#album-view {
  min-height: 100vh;
}

.album-hero {
  padding: 64px 24px 48px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.album-hero-label {
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-bottom: 14px;
}

.album-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 14px;
}

.album-hero-desc {
  font-size: .95rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

/* Scrapbook canvas */
.scrapbook {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

/* Row: a horizontal group of polaroids */
.scrapbook-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px 40px;
  padding: 24px 0;
  position: relative;
}

.scrapbook-row + .scrapbook-row {
  border-top: 1px dashed var(--cream-dark);
}

/* Individual polaroid */
.polaroid {
  background: #fff;
  padding: 10px 10px 44px;
  box-shadow: 0 8px 28px rgba(26,23,20,.09), 0 2px 6px rgba(26,23,20,.04);
  position: relative;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.175,.885,.32,1.275),
              box-shadow .3s ease;
  flex-shrink: 0;
}

.polaroid:hover {
  transform: scale(1.06) rotate(0deg) !important;
  box-shadow: 0 24px 56px rgba(26,23,20,.16), 0 6px 16px rgba(26,23,20,.08);
  z-index: 20;
}

.polaroid-tape {
  position: absolute;
  height: 18px;
  width: 56px;
  background: rgba(212,131,10,.18);
  top: -9px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  border-left: 2px dashed rgba(255,255,255,.35);
  border-right: 2px dashed rgba(255,255,255,.35);
}

.polaroid-photo {
  overflow: hidden;
  background: var(--cream-dark);
}

.polaroid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

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

.polaroid-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.polaroid-caption span {
  font-family: var(--font-hand);
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Size variants */
.polaroid.size-sm .polaroid-photo { width: 148px; height: 148px; }
.polaroid.size-md .polaroid-photo { width: 188px; height: 188px; }
.polaroid.size-lg .polaroid-photo { width: 230px; height: 172px; }

/* Photo detail modal (album view) */
.photo-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(26,23,20,.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}

.photo-detail-card {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  animation: slideUp .22s ease;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.photo-detail-img-wrap {
  background: var(--ink);
  max-height: 50vh;
  overflow: hidden;
  flex-shrink: 0;
}

.photo-detail-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-detail-body {
  padding: 24px 28px;
  overflow-y: auto;
}

.photo-detail-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.photo-detail-desc {
  font-size: .88rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

.photo-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  transition: var(--transition);
}
.photo-detail-close:hover { background: rgba(255,255,255,.25); }

/* Album end marker */
.album-end {
  text-align: center;
  padding: 40px;
  color: var(--ink-ghost);
}

.album-end-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.album-end-dot {
  width: 5px;
  height: 5px;
  background: var(--cream-dark);
  border-radius: 50%;
}

.album-end-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: .9rem;
}

/* Loading / error states for album page */
.page-center {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.page-center-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: .5;
}

.page-center-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.page-center-sub {
  font-size: .88rem;
  color: var(--ink-muted);
}

/* ─── Spinner ───────────────────────────────────────────── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--cream-dark);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav { padding: 0 16px; }
  #dashboard-screen,
  #editor-screen { padding: 24px 16px 60px; }
  .dash-header,
  .editor-header { flex-direction: column; align-items: flex-start; }
  .scrapbook-row { gap: 24px 28px; }
}
