/* ═══════════════════════════════════════════════════════════
   upTown Art Galerie — Workshop Galerie
   ═══════════════════════════════════════════════════════════ */

:root {
  --uta-teal: #1a7a8a;
  --uta-teal-deep: #146068;
  --uta-teal-light: #e8f4f6;
  --uta-teal-glow: rgba(26, 122, 138, 0.12);
  --uta-sage: #6b7d60;
  --uta-sage-light: #eef1ec;
  --uta-peach: #e8c490;
  --uta-black: #1a1a18;
  --uta-white: #ffffff;
  --uta-off-white: #f7f6f2;
  --uta-grey-100: #edecea;
  --uta-grey-200: #e0ddd8;
  --uta-grey-300: #c8c5be;
  --uta-grey-500: #8a8780;
  --uta-grey-700: #4a4843;
}

.uta-container,
.uta-container *,
.uta-container *::before,
.uta-container *::after {
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.uta-container {
  color: var(--uta-black);
}

.gal-lightbox,
.gal-lightbox *,
.gal-confirm-overlay,
.gal-confirm-overlay *,
.gal-crop-overlay,
.gal-crop-overlay * {
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}


/* ═══════════════════════════════════════════════════════════
   Gemeinsame Bausteine
   ═══════════════════════════════════════════════════════════ */

.uta-container {
  max-width: 960px;
  width: 100%;
  margin: auto;
}

.uta-accent-line {
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--uta-peach) 15%, var(--uta-teal) 40%, var(--uta-sage) 60%, var(--uta-teal) 85%, transparent 100%);
  border-radius: 2px;
  opacity: 0.5;
}

.uta-header {
  text-align: center;
  padding: 32px 20px 24px;
}

.uta-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--uta-teal);
  margin: 0 0 8px 0;
}

.uta-header-desc {
  font-size: 1rem;
  font-weight: 400;
  color: var(--uta-grey-500);
  line-height: 1.5;
  margin: 0 0 6px 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.uta-header-sub {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--uta-sage);
}


/* ═══════════════════════════════════════════════════════════
   Profil-Badge (kompakt, rechtsbündig unter Header)
   ═══════════════════════════════════════════════════════════ */

.gal-profile-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0 20px 8px;
  position: relative;
}

.gal-profile {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  background: var(--uta-white);
  border: 1px solid var(--uta-grey-200);
  border-radius: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: default;
}

.gal-profile-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--uta-teal);
  color: var(--uta-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.gal-profile-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--uta-black);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gal-profile-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--uta-grey-500);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.gal-profile-edit-btn:hover {
  color: var(--uta-teal);
}

.gal-profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--uta-white);
  border: 1px solid var(--uta-grey-200);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 10;
  animation: galProfileDrop 0.15s ease;
}

@keyframes galProfileDrop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gal-profile-dropdown .gal-field label {
  font-size: 0.78rem;
}
.gal-profile-dropdown .gal-field input {
  padding: 8px 10px;
  font-size: 0.85rem;
}

.gal-profile-form-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.gal-profile-form-save {
  padding: 7px 14px;
  background: var(--uta-teal);
  color: var(--uta-white);
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s ease;
}

.gal-profile-form-save:hover {
  background: var(--uta-teal-deep);
}

.gal-profile-form-cancel {
  padding: 7px 12px;
  background: none;
  border: 1px solid var(--uta-grey-300);
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--uta-grey-700);
  transition: all 0.2s ease;
}

.gal-profile-form-cancel:hover {
  background: var(--uta-grey-100);
}

/* ═══════════════════════════════════════════════════════════
   Upload-Bereich
   ═══════════════════════════════════════════════════════════ */

.gal-upload {
  padding: 0 20px 24px;
}

.gal-upload-toggle {
  width: 100%;
  padding: 18px 24px;
  border: 2px dashed var(--uta-teal);
  border-radius: 14px;
  background: var(--uta-teal-light);
  color: var(--uta-teal-deep);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
}

.gal-upload-toggle:hover {
  background: var(--uta-teal);
  color: var(--uta-white);
  border-style: solid;
}

.gal-upload-toggle:hover svg {
  stroke: var(--uta-white);
}

.gal-upload-toggle svg {
  stroke: var(--uta-teal-deep);
  transition: stroke 0.25s ease;
}

/* ─── Formular ─── */
.gal-form {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: galSlideIn 0.35s ease;
}

@keyframes galSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Foto-Upload ─── */
.gal-photo-zone {
  position: relative;
  border: 2px dashed var(--uta-grey-200);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s ease;
  background: var(--uta-white);
}

.gal-photo-zone:hover,
.gal-photo-zone.gal-drag {
  border-color: var(--uta-teal);
}

.gal-photo-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.gal-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--uta-grey-500);
  font-size: 0.95rem;
  text-align: center;
}

.gal-photo-placeholder svg {
  stroke: var(--uta-grey-300);
}

.gal-photo-preview {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}

.gal-photo-change {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gal-photo-zone:hover .gal-photo-change {
  opacity: 1;
}

/* ─── Formularfelder ─── */
.gal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gal-field label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--uta-teal-deep);
}

.gal-req {
  color: #c44;
}

.gal-opt {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.7rem;
  color: var(--uta-grey-300);
}

.gal-field input,
.gal-field textarea {
  padding: 14px 16px;
  border: 2px solid var(--uta-grey-200);
  border-radius: 10px;
  font-size: 1rem;
  background: var(--uta-white);
  color: var(--uta-black);
  transition: border-color 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

.gal-field input:focus,
.gal-field textarea:focus {
  outline: none;
  border-color: var(--uta-teal);
}

.gal-field input::placeholder,
.gal-field textarea::placeholder {
  color: var(--uta-grey-300);
  font-weight: 300;
}

.gal-field input.gal-err,
.gal-field textarea.gal-err {
  border-color: #c44;
}

.gal-field textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.gal-charcount {
  font-size: 0.72rem;
  color: var(--uta-grey-300);
  text-align: right;
}

/* ─── Social Media Felder ─── */
.gal-social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gal-social-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--uta-white);
  border: 2px solid var(--uta-grey-200);
  border-radius: 10px;
  padding: 2px 8px 2px 12px;
  transition: border-color 0.2s ease;
}

.gal-social-row:focus-within {
  border-color: var(--uta-teal);
}

.gal-social-icon {
  flex-shrink: 0;
  color: var(--uta-grey-500);
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.gal-social-icon--detected {
  color: var(--uta-teal);
}

.gal-social-row input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  padding: 12px 4px;
  min-width: 0;
  font-family: inherit;
}

.gal-social-row input::placeholder {
  color: var(--uta-grey-300);
}

.gal-social-remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--uta-grey-300);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.gal-social-remove:hover {
  background: #fce4ec;
  color: #c44;
}

.gal-social-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  border: 2px dashed var(--uta-grey-200);
  border-radius: 10px;
  background: transparent;
  color: var(--uta-grey-500);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.gal-social-add:hover {
  border-color: var(--uta-teal);
  color: var(--uta-teal-deep);
}

.gal-social-add:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--uta-grey-200);
  color: var(--uta-grey-300);
}

/* ─── Consent Checkbox ─── */
.gal-consent {
  padding: 16px;
  background: var(--uta-teal-light);
  border-radius: 10px;
  border: 1px solid var(--uta-teal-glow);
}

.gal-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--uta-grey-700);
  line-height: 1.5;
  cursor: pointer;
}

.gal-checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  accent-color: var(--uta-teal);
}

/* ─── Form Actions ─── */
.gal-form-actions {
  display: flex;
  gap: 12px;
}

.gal-submit {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 10px;
  background: var(--uta-teal);
  color: var(--uta-white);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.gal-submit:hover {
  background: var(--uta-teal-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--uta-teal-glow);
}

.gal-submit:active {
  transform: scale(0.98);
}

.gal-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.gal-delete {
  padding: 16px 20px;
  border: 2px solid #c44;
  border-radius: 10px;
  background: var(--uta-white);
  color: #c44;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.gal-delete:hover {
  background: #c44;
  color: var(--uta-white);
}

.gal-delete:active {
  transform: scale(0.98);
}

/* ─── Status-Nachricht ─── */
.gal-status {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 14px 18px;
  border-radius: 10px;
  display: none;
}

.gal-status.gal-ok {
  display: block;
  background: var(--uta-sage-light);
  color: var(--uta-sage);
  border: 1px solid var(--uta-sage);
}

.gal-status.gal-fail {
  display: block;
  background: #fce4ec;
  color: #c44;
  border: 1px solid #c44;
}

.gal-status.gal-wait {
  display: block;
  background: var(--uta-teal-light);
  color: var(--uta-teal-deep);
  border: 1px solid var(--uta-teal);
}

.gal-spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2.5px solid var(--uta-teal);
  border-top-color: transparent;
  border-radius: 50%;
  animation: galSpin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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


/* ═══════════════════════════════════════════════════════════
   Galerie-Grid (Card-Based)
   ═══════════════════════════════════════════════════════════ */

/* ─── Toolbar: Suche + Sortierung ─── */
.gal-toolbar {
  display: flex;
  gap: 12px;
  padding: 16px 20px 0;
  align-items: center;
}

.gal-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--uta-white);
  border: 2px solid var(--uta-grey-200);
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color 0.2s ease;
}

.gal-search-wrap:focus-within {
  border-color: var(--uta-teal);
}

.gal-search-wrap svg {
  flex-shrink: 0;
  stroke: var(--uta-grey-300);
}

.gal-search {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  padding: 12px 4px;
  font-family: inherit;
  color: var(--uta-black);
}

.gal-search::placeholder {
  color: var(--uta-grey-300);
}

.gal-sort-wrap {
  flex-shrink: 0;
}

.gal-sort {
  padding: 12px 14px;
  border: 2px solid var(--uta-grey-200);
  border-radius: 10px;
  background: var(--uta-white);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--uta-grey-700);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8780' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  transition: border-color 0.2s ease;
}

.gal-sort:focus {
  outline: none;
  border-color: var(--uta-teal);
}

.gal-sort:disabled {
  opacity: 0.5;
  cursor: default;
  background-image: none;
}

.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 20px 24px;
}

/* ─── Pagination ─── */
.gal-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0 20px 32px;
  flex-wrap: wrap;
}

.gal-page-btn {
  min-width: 40px;
  height: 40px;
  border: 2px solid var(--uta-grey-200);
  border-radius: 8px;
  background: var(--uta-white);
  color: var(--uta-grey-700);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.gal-page-btn:hover {
  border-color: var(--uta-teal);
  color: var(--uta-teal-deep);
}

.gal-page-btn--active {
  background: var(--uta-teal);
  border-color: var(--uta-teal);
  color: var(--uta-white);
}

.gal-page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.gal-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--uta-grey-300);
}

.gal-empty svg {
  stroke: var(--uta-grey-200);
  margin-bottom: 12px;
}

.gal-empty p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--uta-grey-500);
}

/* ─── Galerie-Karte ─── */
.gal-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.gal-card--mine {
  outline: 2px solid var(--uta-teal);
  outline-offset: 2px;
}

.gal-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--uta-teal);
  transition: width 0.3s ease;
  z-index: 2;
}

.gal-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.gal-card:hover::after {
  width: 100%;
}

.gal-card-img,
.gal-top-card-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  background: var(--uta-grey-100);
}

.gal-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
  pointer-events: none;
}

.gal-card-body > * {
  pointer-events: auto;
}

.gal-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--uta-white);
  margin: 0 0 4px 0;
  background: rgba(0,0,0,0.45);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
}

.gal-card-message {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  background: rgba(0,0,0,0.45);
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
  max-width: 100%;
}

.gal-card-socials {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.gal-card-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--uta-white);
  transition: all 0.2s ease;
  text-decoration: none;
}

.gal-card-social-link:hover {
  background: rgba(255,255,255,0.4);
}

/* ─── Like-Button ─── */
.gal-like-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: none;
  border-radius: 20px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 3;
  transition: all 0.2s ease;
  line-height: 1;
}

.gal-like-btn:hover {
  background: rgba(0,0,0,0.7);
  color: var(--uta-white);
}

.gal-like-btn.gal-liked {
  color: #e25555;
}

.gal-like-btn.gal-liked:hover {
  color: #c44;
}

.gal-like-btn svg {
  flex-shrink: 0;
}

.gal-like-count {
  min-width: 0;
}

.gal-like-btn--lb {
  position: absolute;
  top: auto;
  bottom: 24px;
  right: 24px;
  padding: 10px 16px;
  font-size: 0.9rem;
  gap: 6px;
  z-index: 5;
}

.gal-like-btn--lb svg {
  width: 18px;
  height: 18px;
}

.gal-like-btn--own {
  pointer-events: none;
  cursor: default;
  color: #e25555;
}

@keyframes galLikePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.gal-like-pop {
  animation: galLikePop 0.35s ease;
}

/* ─── Fliegende Herzen (TikTok-Style) ─── */
.gal-lb-hearts {
  position: absolute;
  bottom: 80px;
  right: 30px;
  width: 60px;
  height: 300px;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

.gal-floating-heart {
  position: absolute;
  bottom: 0;
  left: 50%;
  color: #e25555;
  opacity: 0;
  animation: galHeartFloat linear forwards;
  transform: translateX(-50%) scale(var(--float-scale, 1));
  filter: drop-shadow(0 0 4px rgba(226, 85, 85, 0.4));
}

.gal-floating-heart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.gal-floating-heart-name {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gal-floating-heart:nth-child(3n+1) { color: #ff6b8a; }
.gal-floating-heart:nth-child(3n+2) { color: #e25555; }
.gal-floating-heart:nth-child(3n)   { color: #ff8fa3; }

@keyframes galHeartFloat {
  0% {
    opacity: 0;
    bottom: 0;
    transform: translateX(-50%) scale(var(--float-scale, 1)) translateX(0);
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) scale(var(--float-scale, 1)) translateX(var(--float-x, 0px));
  }
  80% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    bottom: 300px;
    transform: translateX(-50%) scale(var(--float-scale, 1)) translateX(calc(var(--float-x, 0px) * -0.5));
  }
}

/* Gemeinsamer Tag-Stil (Galerie + Toplist) */
.gal-card-tag,
.gal-top-card-tag {
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--uta-white);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.gal-card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
}



/* ═══════════════════════════════════════════════════════════
   Toplist — Beliebteste Bilder
   ═══════════════════════════════════════════════════════════ */

.gal-toplist {
  position: relative;
  z-index: 1;
  padding: 20px 20px 24px;
}

.gal-toplist-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--uta-teal-deep);
  margin: 0 0 14px 0;
}

.gal-toplist-title svg {
  stroke: var(--uta-peach);
  flex-shrink: 0;
}

.gal-toplist-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-top: 4px;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--uta-grey-200) transparent;
}

.gal-toplist-scroll::-webkit-scrollbar {
  height: 6px;
}

.gal-toplist-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.gal-toplist-scroll::-webkit-scrollbar-thumb {
  background: var(--uta-grey-200);
  border-radius: 3px;
}

.gal-top-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gal-top-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.gal-top-card-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--uta-peach);
  color: var(--uta-black);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.gal-top-card-rank--gold { background: #f0c850; }
.gal-top-card-rank--silver { background: #c0c0c0; }
.gal-top-card-rank--bronze { background: #cd8c52; color: var(--uta-white); }

.gal-top-card-likes {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #e25555;
  font-size: 0.72rem;
  font-weight: 700;
  z-index: 2;
}

.gal-top-card-likes svg {
  width: 12px;
  height: 12px;
}

.gal-top-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
}

.gal-top-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--uta-white);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gal-top-card-tag {
  display: inline-block;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}


/* ═══════════════════════════════════════════════════════════
   Lightbox
   ═══════════════════════════════════════════════════════════ */

.gal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(26, 26, 24, 0.92);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: galFadeIn 0.25s ease;
}

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

.gal-lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--uta-white);
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.gal-lightbox-close:hover {
  opacity: 1;
}

.gal-lightbox-content {
  max-width: 800px;
  width: 100%;
  margin: auto 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  animation: galSlideIn 0.3s ease;
  background: #1a1a18;
}

.gal-lb-image-wrap {
  position: relative;
  width: 100%;
}

.gal-lb-img {
  width: 100%;
  display: block;
  background: #000;
}

.gal-lb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  background: #1a1a18;
  border-radius: 16px 16px 0 0;
}

.gal-lb-header-left {
  flex: 1;
  min-width: 0;
}

.gal-lb-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.gal-lb-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--uta-white);
  margin: 0 0 4px 0;
}

.gal-lb-message {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  margin: 0;
}

.gal-lb-socials {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.gal-lb-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.2s ease;
}

.gal-lb-social-link:hover {
  background: rgba(255,255,255,0.2);
  color: var(--uta-white);
}

.gal-lb-social-link svg {
  stroke: currentColor;
}

.gal-lb-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gal-lb-share-btn:hover {
  background: rgba(255,255,255,0.2);
  color: var(--uta-white);
}

.gal-lb-share-btn--copied {
  background: var(--uta-teal);
  border-color: var(--uta-teal);
  color: var(--uta-white);
}

.gal-lb-share-btn svg {
  width: 14px;
  height: 14px;
}

.gal-lb-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  border-radius: 8px;
  background: var(--uta-teal);
  color: var(--uta-white);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.gal-lb-edit-btn:hover {
  background: var(--uta-teal-deep);
}

.gal-lb-edit-btn svg {
  width: 14px;
  height: 14px;
  stroke: var(--uta-white);
}



/* ═══════════════════════════════════════════════════════════
   Lösch-Bestätigung (Custom Confirm)
   ═══════════════════════════════════════════════════════════ */

.gal-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(26, 26, 24, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: galFadeIn 0.2s ease;
}

.gal-confirm-box {
  background: var(--uta-white);
  border-radius: 16px;
  padding: 32px 28px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: galSlideIn 0.25s ease;
}

.gal-confirm-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fce4ec;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c44;
}

.gal-confirm-icon svg {
  stroke: #c44;
}

.gal-confirm-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--uta-black);
  margin: 0 0 8px 0;
}

.gal-confirm-text {
  font-size: 0.9rem;
  color: var(--uta-grey-500);
  line-height: 1.5;
  margin: 0 0 24px 0;
}

.gal-confirm-actions {
  display: flex;
  gap: 10px;
}

.gal-confirm-cancel {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--uta-grey-200);
  border-radius: 10px;
  background: var(--uta-white);
  color: var(--uta-grey-700);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gal-confirm-cancel:hover {
  border-color: var(--uta-grey-300);
  background: var(--uta-grey-100);
}

.gal-confirm-delete {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: #c44;
  color: var(--uta-white);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gal-confirm-delete:hover {
  background: #a33;
}


/* ═══════════════════════════════════════════════════════════
   Crop-Modal (quadratischer Zuschnitt)
   ═══════════════════════════════════════════════════════════ */

.gal-crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(26, 26, 24, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: galFadeIn 0.2s ease;
}

.gal-crop-box {
  background: var(--uta-black);
  border-radius: 16px;
  padding: 16px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gal-crop-hint {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  margin: 0 0 10px 0;
  text-align: center;
  letter-spacing: 0.5px;
}

.gal-crop-viewport {
  width: min(500px, 80vw);
  height: min(500px, 80vw);
  overflow: hidden;
  position: relative;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.15);
  touch-action: none;
  cursor: grab;
  background: #000;
}

.gal-crop-viewport:active {
  cursor: grabbing;
}

#galCropImage {
  position: absolute;
  top: 0;
  left: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  transform-origin: 0 0;
  pointer-events: none;
  max-width: none !important;
  max-height: none !important;
  object-fit: none !important;
}

.gal-crop-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  width: 100%;
  max-width: min(500px, 80vw);
}

.gal-crop-cancel {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gal-crop-cancel:hover {
  border-color: rgba(255,255,255,0.4);
  color: var(--uta-white);
}

.gal-crop-confirm {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: var(--uta-teal);
  color: var(--uta-white);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s ease;
}

.gal-crop-confirm:hover {
  background: var(--uta-teal-deep);
}


/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
  .uta-header {
    padding: 24px 12px 16px;
  }
  .gal-profile-wrap {
    padding: 0 12px 8px;
  }
  .uta-header h2 {
    font-size: 1.3rem;
  }
  .uta-header-desc {
    font-size: 0.9rem;
  }
  .gal-upload {
    padding: 0 12px 20px;
  }
  .gal-toplist {
    padding: 16px 12px 20px;
  }
  .gal-top-card {
    flex: 0 0 150px;
  }
  .gal-toolbar {
    flex-direction: column;
    padding: 12px 12px 0;
    gap: 8px;
  }
  .gal-sort {
    width: 100%;
  }
  .gal-form-actions {
    flex-direction: column;
  }
  .gal-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 12px 24px;
  }
  .gal-pagination {
    padding: 0 12px 24px;
  }
  .gal-lightbox {
    padding: 0;
  }
  .gal-lightbox-content {
    max-width: 100%;
    border-radius: 0;
  }
  .gal-lb-header {
    padding: 12px 14px 10px;
    border-radius: 0;
  }
  .gal-lb-header-right {
    gap: 6px;
  }
  .gal-comments {
    border-radius: 0;
    padding: 12px 14px 16px;
  }
  .gal-lightbox-close {
    top: 8px;
    right: 12px;
  }
}

/* ═══════════════════════════════════════════
   Kommentare
   ═══════════════════════════════════════════ */

.gal-comments {
  width: 100%;
  padding: 14px 20px 20px;
  background: #1a1a18;
  border-radius: 0 0 16px 16px;
}

.gal-comments-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--uta-white);
  margin: 0 0 12px;
  opacity: 0.8;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 14px;
}

.gal-comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  max-height: 300px;
  overflow-y: auto;
}

.gal-comments-loading,
.gal-comments-empty {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  font-style: italic;
}

.gal-comment {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 12px;
  position: relative;
}

.gal-comment--own {
  background: rgba(255,255,255,0.1);
  border-left: 2px solid var(--uta-accent, #c8a96e);
}

.gal-comment-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.gal-comment-name {
  font-size: 13px;
  color: var(--uta-white);
}

.gal-comment-date {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

.gal-comment-text {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}

.gal-comment-actions {
  display: flex;
  gap: 6px;
  position: absolute;
  top: 8px;
  right: 8px;
}

.gal-comment-edit-btn,
.gal-comment-delete-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.gal-comment-edit-btn:hover {
  color: var(--uta-white);
  background: rgba(255,255,255,0.1);
}

.gal-comment-delete-btn:hover {
  color: #e25555;
  background: rgba(226,85,85,0.15);
}

/* Kommentar-Identitaet (Name/Email/Consent) */
.gal-comment-identity {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

.gal-comment-field {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--uta-white);
  font-size: 13px;
  padding: 8px 10px;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.gal-comment-field:focus {
  outline: none;
  border-color: var(--uta-accent, #c8a96e);
}

.gal-comment-field::placeholder {
  color: rgba(255,255,255,0.3);
}

.gal-comment-field.gal-err {
  border-color: #c44;
}

.gal-comment-consent-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
}

.gal-comment-consent-label.gal-err {
  color: #c44;
}

.gal-comment-consent-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--uta-teal);
}

/* Kommentar-Eingabe */
.gal-comment-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gal-comment-input {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--uta-white);
  font-size: 13px;
  padding: 8px 10px;
  resize: vertical;
  min-height: 40px;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.gal-comment-input:focus {
  outline: none;
  border-color: var(--uta-accent, #c8a96e);
}

.gal-comment-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.gal-comment-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gal-comment-charcount {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

.gal-comment-submit {
  background: var(--uta-teal);
  color: var(--uta-white);
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.gal-comment-submit:hover {
  opacity: 0.85;
}

.gal-comment-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
