/* ══════════════════════════════════════════════════════════════════════
   Gallery Detail — Full-page centered column (profile-public pattern)
   ══════════════════════════════════════════════════════════════════════ */

#screenGallery-detail.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  overflow-y: auto;
  padding: 0 20px 60px;
}

.gd-container {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 16px;
}

/* ── Header (owner + companion) ───────────────────────────────────── */

.gd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.gd-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--bg3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--dim);
}
.gd-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gd-header-info { min-width: 0; }

.gd-header-owner {
  font-size: 14px;
  color: var(--cream);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.gd-header-owner:hover { color: var(--rose); }

.gd-header-companion {
  font-size: 11px;
  color: var(--muted);
}

/* ── Meta (title + description) ───────────────────────────────────── */

.gd-meta {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.gd-title {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--cream);
  margin: 0 0 4px;
  line-height: 1.3;
}

.gd-desc {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.5;
}

/* ── Image grid ───────────────────────────────────────────────────── */

.gd-image-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.gd-image-wrap {
  /* Each image + its reaction row */
}

.gd-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.1s;
}
.gd-image:hover { transform: scale(1.005); }

.gd-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Reaction row (per image) ─────────────────────────────────────── */

.gd-react-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px 0 10px;
  position: relative;
}

/* ── Add reaction "+" button ──────────────────────────────────────── */

.gd-add-react {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px dashed var(--border2);
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.gd-add-react:hover {
  border-color: var(--rose-20);
  color: var(--rose);
  background: var(--rose-bg);
}

/* ── Emoji popover ────────────────────────────────────────────────── */

.gd-emoji-popover {
  position: absolute;
  bottom: 100%;
  left: 0;
  z-index: 100;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 32px var(--shadow-lg);
  animation: gdPopIn 0.15s ease;
  margin-bottom: 6px;
}

@keyframes gdPopIn {
  from { opacity: 0; transform: translateY(6px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gd-emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 240px;
}

.gd-emoji-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: var(--bg3);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  position: relative;
}
.gd-emoji-btn:hover {
  background: var(--cream-08);
  transform: scale(1.1);
}
.gd-emoji-btn.active {
  border-color: var(--rose);
  background: var(--rose-bg);
}
.gd-emoji-btn.locked {
  opacity: 0.35;
  cursor: not-allowed;
}
.gd-emoji-btn.locked::after {
  content: '\1F512';
  font-size: 8px;
  position: absolute;
  bottom: -2px;
  right: -2px;
}

/* ── Footer (actions + stats) ─────────────────────────────────────── */

.gd-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}

.gd-actions {
  display: flex;
  gap: 8px;
}

.gd-like-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: var(--rose-bg);
  color: var(--rose);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.gd-like-btn:hover { background: var(--rose-15); }
.gd-like-btn.liked { background: var(--rose); color: #fff; }
.gd-like-btn.liked:hover { background: var(--rose-d); }
.gd-like-btn svg { width: 14px; height: 14px; }

.gd-report-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.gd-report-btn:hover { color: var(--cream); border-color: var(--muted2); }

.gd-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.gd-share-btn:hover { color: var(--cream); border-color: var(--muted2); }
.gd-share-btn svg { width: 14px; height: 14px; }

.gd-discord-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: #5865f2;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.gd-discord-btn:hover { background: #4752c4; }
.gd-discord-btn svg { width: 14px; height: 14px; }

.gd-stats {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
  align-items: center;
}

.gd-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}
.gd-stat svg { width: 13px; height: 13px; }

.gd-time { font-size: 11px; color: var(--muted); }

/* ── Empty / loading ──────────────────────────────────────────────── */

.gd-empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 60px 20px;
}

.gd-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--muted);
  font-size: 14px;
}
