/* (c) 2024-2026 ASSISTUK Lars Tiedemann. All Rights Reserved.
   Licensed for use exclusively on www.assistuk-apps.net */
/* DigitalPainters Gallery — 10x6 Fullscreen Grid (Eye-Control, No Scroll) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: var(--dp-bg, #0c0b10);
  --bg-card: var(--dp-bg-card, linear-gradient(135deg, #18171e, #201f28));
  --accent-blue: var(--dp-accent, #0a84ff);
  --accent-pink: var(--dp-accent-pink, #ff6b9d);
  --accent-violet: var(--dp-accent-violet, #c44dff);
  --accent-cyan: var(--dp-accent-cyan, #6ec6ff);
  --text: var(--dp-text, #f0ece4);
  --text-dim: var(--dp-text-dim, rgba(240,236,228,0.72));
  --text-muted: var(--dp-text-muted, rgba(240,236,228,0.42));
  --border: var(--dp-border, rgba(200,169,126,0.08));
  --radius: var(--dp-radius-sm, min(12px, 1.2vw));
  --heart: var(--dp-heart, #ff6b9d);
  --gap: var(--dp-gap, clamp(2px, 0.5vw, 5px));
  /* Gallery-spezifische Akzente */
  --gallery-accent: #c8a97e;
  --gallery-accent-2: #a08b6e;
  --gallery-highlight: #e8d5b5;
  --gallery-font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --gallery-font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: var(--gap);
  padding: var(--gap);
}

body > * { min-width: 0; min-height: 0; }

/* ===== Common Button (2x2 grid cell) ===== */
.g-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  padding: 4px;
}
.g-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  border-color: rgba(200,169,126,0.15);
  z-index: 2;
}
.g-btn:active { transform: scale(0.97); }
.g-btn.active {
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(10,132,255,0.2);
}
.g-btn:disabled, .g-btn.disabled {
  opacity: 0.25;
  cursor: default;
  transform: none !important;
  box-shadow: none !important;
}
.g-btn .desc {
  font-size: clamp(13px, 1.5vw, 17px);
  color: var(--text-muted);
  font-weight: 400;
}

/* ===== Dwell dot (improved visibility) ===== */
.dwell-dot {
  position: absolute;
  z-index: 10;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  width: 16px; height: 16px;
  background: radial-gradient(circle, rgba(200,169,126,0.5), transparent 65%);
  box-shadow: 0 0 12px rgba(200,169,126,0.25);
  opacity: 0;
  transition: opacity 0.2s;
}
.g-btn:hover .dwell-dot,
.g-slot:hover .dwell-dot,
.g-filter-tile:hover .dwell-dot,
.g-info-tts:hover .dwell-dot {
  opacity: 1;
}

/* ================================================================
   GRID POSITIONS — Main Gallery (10 cols x 6 rows, all buttons 2x2)
   ================================================================ */

/* --- Row 1: Header (1x1 items) --- */
.g-logo          { grid-column: 1 / 3;  grid-row: 1 / 2; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: opacity 0.3s; }
.g-logo:hover    { opacity: 0.9; }
.g-logo img.logo-palette  { display: none; }
.g-logo img.logo-assistuk { max-height: 80%; max-width: 90%; object-fit: contain; opacity: 0.8; transition: opacity 0.3s; }
.g-logo:hover img.logo-assistuk { opacity: 1; }
.g-title-area    { grid-column: 3 / 9;  grid-row: 1 / 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.g-title-area h1 {
  font-family: var(--gallery-font-serif);
  font-size: clamp(24px, 3.6vw, 44px);
  font-weight: 300;
  color: var(--gallery-accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}
.g-title-area .subtitle {
  font-family: var(--gallery-font-sans);
  color: var(--text-muted);
  font-size: clamp(11px, 1.3vw, 15px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 300;
}
.g-title-area .page-info { color: var(--text-dim); font-size: clamp(11px, 1.3vw, 15px); margin-top: 1px; }
.g-aom-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 3px 12px;
  border-radius: 20px;
  background: rgba(200,169,126,0.1);
  border: 1px solid rgba(200,169,126,0.3);
  font-family: var(--gallery-font-sans);
  font-size: clamp(9px, 1vw, 12px);
  color: var(--gallery-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.g-aom-badge:hover { background: rgba(200,169,126,0.2); }
.g-aom-badge .aom-icon { font-size: 1.2em; }
.g-aom-badge .aom-name { font-weight: 600; color: var(--gallery-accent); }
.g-aom-badge .aom-likes { color: var(--text-dim); }
#g-info-btn      { grid-column: 9 / 10; grid-row: 1 / 2; font-size: clamp(20px, 3vw, 36px); opacity: 0.5; border-color: transparent; }
#g-info-btn:hover { opacity: 1; }
#g-support-main-btn { grid-column: 10 / 11; grid-row: 1 / 2; font-size: clamp(20px, 3vw, 36px);
  border: 2px solid transparent;
  background: linear-gradient(135deg, #18171e, #201f28) padding-box,
              linear-gradient(135deg, var(--gallery-accent), var(--gallery-highlight)) border-box;
}

/* --- Row 2-5: Gallery slots + navigation --- */
#g-prev-btn      { grid-column: 1 / 3;  grid-row: 3 / 5; font-size: clamp(32px, 5vw, 60px); }
#g-next-btn      { grid-column: 9 / 11; grid-row: 3 / 5; font-size: clamp(32px, 5vw, 60px); }

/* --- Row 6: Bottom bar (1x1 items) --- */
/* CTA button (replaces old HUB button) — links to SuperHub = "Jetzt malen" */
#g-close-btn {
  grid-column: 1 / 3; grid-row: 6 / 7;
  text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #18171e, #201f28) padding-box,
              linear-gradient(135deg, var(--gallery-accent), var(--gallery-highlight)) border-box;
  transition: box-shadow 0.3s, transform 0.3s;
  animation: g-cta-pulse 3s ease-in-out infinite;
}
#g-close-btn:hover { box-shadow: 0 0 30px rgba(200, 169, 126, 0.4); transform: scale(1.02); }
#g-close-btn .g-cta-logo {
  width: auto; max-width: 70%; max-height: 55%; object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(200, 169, 126, 0.3));
}
#g-close-btn .desc {
  font-family: var(--gallery-font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(11px, 1.4vw, 16px);
  font-weight: 600;
  color: var(--gallery-accent);
}
@keyframes g-cta-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(200, 169, 126, 0.18); }
  50%      { box-shadow: 0 0 22px rgba(200, 169, 126, 0.32); }
}
#g-filter-btn       { grid-column: 4 / 6;   grid-row: 6 / 7; font-size: clamp(20px, 3vw, 36px); opacity: 0.8; border-color: transparent; }
#g-filter-btn:hover { opacity: 1; border-color: var(--border); }
#g-random-btn       { grid-column: 6 / 8;   grid-row: 6 / 7; font-size: clamp(20px, 3vw, 36px); opacity: 0.8; border-color: transparent; }
#g-random-btn:hover { opacity: 1; border-color: var(--border); }
#g-settings-btn     { grid-column: 8 / 11;  grid-row: 6 / 7; font-size: clamp(20px, 3vw, 36px); opacity: 0.8; border-color: transparent; }
#g-settings-btn:hover { opacity: 1; border-color: var(--border); }

/* ===== Image Slots (2x2 each, center row 3-4) ===== */
.g-slot {
  border-radius: min(6px, 0.6vw);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #16151c;
  border: none;
  padding: clamp(3px, 0.4vw, 6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 0 1px rgba(200,169,126,0.15);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
}
/* Gallery spot-light effect */
.g-slot::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,248,235,0.08) 0%, transparent 70%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.g-slot:hover::before { opacity: 1; }
.g-slot:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 2px rgba(200,169,126,0.2);
  z-index: 2;
}
.g-slot.empty {
  cursor: default;
  opacity: 0.3;
}
.g-slot.empty:hover { transform: none; box-shadow: none; }

/* Staggered artwork entrance */
@keyframes artworkEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
#g-slot-1 { animation: artworkEnter 0.5s ease-out 0.10s both; }
#g-slot-2 { animation: artworkEnter 0.5s ease-out 0.18s both; }
#g-slot-3 { animation: artworkEnter 0.5s ease-out 0.26s both; }
#g-slot-4 { animation: artworkEnter 0.5s ease-out 0.34s both; }
#g-slot-5 { animation: artworkEnter 0.5s ease-out 0.42s both; }
#g-slot-6 { animation: artworkEnter 0.5s ease-out 0.50s both; }

/* Page transition */
.g-slot.page-transition-out { opacity: 0; transform: scale(0.95); }

/* Skeleton loading */
@keyframes skeleton-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.g-skeleton {
  background: linear-gradient(90deg, #18171e 25%, #201f28 37%, #18171e 63%) !important;
  background-size: 400% 100%;
  animation: skeleton-shimmer 2.5s ease-in-out infinite;
  cursor: default;
  border: none;
}
.g-skeleton:hover { transform: none; box-shadow: none; }

/* Top row */
#g-slot-1 { grid-column: 3 / 5; grid-row: 2 / 4; }
#g-slot-2 { grid-column: 5 / 7; grid-row: 2 / 4; }
#g-slot-3 { grid-column: 7 / 9; grid-row: 2 / 4; }
/* Bottom row */
#g-slot-4 { grid-column: 3 / 5; grid-row: 4 / 6; }
#g-slot-5 { grid-column: 5 / 7; grid-row: 4 / 6; }
#g-slot-6 { grid-column: 7 / 9; grid-row: 4 / 6; }

.g-slot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: min(3px, 0.3vw);
  transition: opacity 0.6s ease;
}
/* Info overlay on image */
.g-slot-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(12,11,16,0.92) 0%, rgba(12,11,16,0.6) 40%, transparent 100%);
  padding: clamp(6px, 1vh, 14px) clamp(8px, 1vw, 14px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2;
}
.g-slot-title {
  width: 100%;
  font-family: var(--gallery-font-serif);
  font-size: clamp(10px, 1.2vw, 14px);
  font-weight: 300;
  font-style: italic;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  order: 3;
}
.g-slot-name {
  font-family: var(--gallery-font-serif);
  font-size: clamp(12px, 1.4vw, 18px);
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.g-slot-likes {
  font-size: clamp(10px, 1.1vw, 13px);
  color: var(--heart);
  flex-shrink: 0;
  margin-left: 6px;
}
/* Sold badge */
.g-slot.sold::after {
  content: attr(data-sold-label);
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-violet));
  color: #fff;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: clamp(9px, 1vw, 12px);
  font-weight: 700;
  pointer-events: none;
  z-index: 2;
}
.g-slot.sold .g-slot-img { opacity: 0.6; }

/* ===== Lightbox (10x6 overlay grid) ===== */
.g-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(ellipse at center, rgba(255,248,235,0.03) 0%, transparent 50%), rgba(8,7,12,0.97);
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: var(--gap);
  padding: var(--gap);
}
.g-lightbox.active {
  display: grid;
}
/* Lightbox header (mirrors main page row 1) */
.g-lb-logo {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.g-lb-logo img { max-height: 80%; max-width: 90%; object-fit: contain; opacity: 0.8; }
.g-lb-title-area {
  grid-column: 5 / 7;
  grid-row: 1 / 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
}
.g-lb-title-area h2 {
  font-family: var(--gallery-font-serif);
  font-size: clamp(16px, 2.5vw, 28px);
  font-weight: 300;
  color: var(--gallery-accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}
.g-lb-title-area .subtitle { color: var(--text-muted); font-size: clamp(12px, 1.4vw, 16px); }
.g-lb-img-wrap {
  grid-column: 3 / 9;
  grid-row: 1 / 6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius);
  z-index: 1;
}
.g-lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 60px rgba(0,0,0,0.3), 0 0 1px rgba(200,169,126,0.2);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.g-lb-img.fade-out { opacity: 0; }
.g-lb-img.fade-in  { opacity: 1; animation: artworkReveal 0.6s ease-out; }
@keyframes artworkReveal {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
.g-lb-img:fullscreen {
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  background: #000;
  border-radius: 0;
}
#g-lb-prev {
  grid-column: 1 / 3;
  grid-row: 3 / 5;
  z-index: 2;
  font-size: clamp(32px, 5vw, 60px);
  background: rgba(26, 26, 46, 0.8);
  border-color: var(--border);
}
#g-lb-next {
  grid-column: 9 / 11;
  grid-row: 3 / 5;
  z-index: 2;
  font-size: clamp(32px, 5vw, 60px);
  background: rgba(26, 26, 46, 0.8);
  border-color: var(--border);
}
#g-lb-close {
  grid-column: 1 / 3;
  grid-row: 5 / 7;
  z-index: 2;
  font-size: clamp(24px, 4vw, 44px);
}
#g-lb-artist-btn {
  grid-column: 3 / 7;
  grid-row: 6 / 7;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: 8px 14px;
  gap: 1px;
  line-height: 1.25;
  background: transparent;
  border: none;
  border-left: 2px solid var(--gallery-accent);
  border-radius: 0;
}
#g-lb-artist-btn .g-lb-artist-name {
  font-family: var(--gallery-font-serif);
  font-weight: 500;
  color: var(--gallery-accent);
  font-size: clamp(13px, 1.5vw, 18px);
  letter-spacing: 0.03em;
}
#g-lb-artist-btn .g-lb-artist-title {
  font-family: var(--gallery-font-serif);
  color: var(--text-dim);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(11px, 1.2vw, 15px);
}
#g-lb-artist-btn .g-lb-artist-line {
  color: var(--text-dim);
  font-size: clamp(9px, 1vw, 12px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
/* Row 6 button order: Artist(3-7) → TTS(7-8) → Like(8-9) → Download(9-10) */
#g-lb-tts      { grid-column: 7 / 8;  grid-row: 6 / 7; font-size: clamp(16px, 2vw, 24px); }
#g-lb-tts.dp-tts-highlight { border-color: var(--accent-blue); background: linear-gradient(135deg, rgba(10,132,255,0.2), rgba(10,132,255,0.05)); }
#g-lb-like {
  grid-column: 8 / 9;
  grid-row: 6 / 7;
  border-color: var(--heart);
  font-size: clamp(16px, 2vw, 24px);
}
#g-lb-like.liked {
  background: linear-gradient(135deg, rgba(255,107,157,0.2), rgba(196,77,255,0.1));
  box-shadow: 0 0 20px rgba(255,107,157,0.2);
}
#g-lb-download { grid-column: 9 / 10; grid-row: 6 / 7; font-size: clamp(16px, 2vw, 24px); }

/* Slideshow button (moved to row 1 for less clutter in row 6) */
#g-lb-slideshow { grid-column: 9 / 10; grid-row: 1 / 2; font-size: clamp(16px, 2vw, 24px); z-index: 2; }
#g-lb-slideshow.playing { border-color: var(--accent-blue); background: linear-gradient(135deg, rgba(10,132,255,0.2), rgba(10,132,255,0.05)); }
#g-lb-slideshow.hidden { display: none; }

/* Share button */
#g-lb-share { grid-column: 10 / 11; grid-row: 1 / 2; font-size: clamp(16px, 2vw, 24px); z-index: 2; }
#g-lb-share.hidden { display: none; }

/* Toast notification */
.g-share-toast {
  position: fixed; bottom: 20%; left: 50%; transform: translateX(-50%);
  background: var(--accent-blue); color: #fff; padding: 8px 24px;
  border-radius: 20px; font-size: 14px; z-index: 50000;
  animation: toast-fade 2s ease forwards; pointer-events: none;
}
@keyframes toast-fade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }

/* Artist filter toggle on filter button */
#g-filter-btn.filter-active {
  border-color: var(--gallery-accent);
  background: linear-gradient(135deg, rgba(200,169,126,0.15), rgba(160,139,110,0.05));
}

/* Artist filter indicator */
.g-artist-filter-bar {
  grid-column: 3 / 9; grid-row: 1 / 2;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: clamp(12px, 1.4vw, 16px); color: var(--text-dim);
}
.g-artist-filter-bar button {
  background: none; border: 1px solid var(--text-muted); color: var(--text-muted);
  border-radius: 12px; padding: 2px 10px; cursor: pointer; font-size: inherit; font-family: inherit;
}
.g-artist-filter-bar button:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

/* ===== Info Overlay (10x6 paginated grid) ===== */
.g-info-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 15000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.g-info-overlay.open {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: var(--gap);
  padding: var(--gap);
}
/* Hide all page elements by default, JS shows current page */
.g-info-overlay [data-info-page] { display: none; }
.g-info-overlay [data-info-page].active { display: flex; }
.g-info-overlay .g-info-tts[data-info-page].active { display: flex; }

/* --- Info cards --- */
.g-info-card {
  display: flex;
  align-items: flex-start;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(26,26,46,0.6), rgba(42,42,69,0.4));
  border: 1px solid rgba(200,169,126,0.08);
  border-left: 3px solid var(--gallery-accent);
  overflow: hidden;
}
.g-info-card-text {
  flex: 1;
  padding: clamp(10px, 2vw, 24px);
  min-width: 0;
}
.g-info-card-text h2 {
  font-family: var(--gallery-font-serif);
  font-size: clamp(18px, 2.8vw, 32px);
  font-weight: 300;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  color: var(--gallery-accent);
}
.g-info-card-text p {
  font-family: var(--gallery-font-sans);
  color: var(--text-dim);
  font-size: clamp(14px, 1.6vw, 20px);
  line-height: 1.7;
}
.g-info-ext-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-blue);
  text-decoration: none;
  font-size: clamp(13px, 1.4vw, 18px);
}
.g-info-ext-link:hover { text-decoration: underline; }

/* --- TTS button (grid column 10, full height of content rows) --- */
.g-info-tts {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1a1a2e, #2a2a45);
  color: var(--accent-cyan);
  font-size: clamp(22px, 3.5vw, 42px);
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s, color 0.15s;
  padding: 0;
}
.g-info-tts:hover {
  transform: scale(1.05);
  border-color: #0a84ff;
  color: #0a84ff;
  z-index: 2;
}
.g-info-tts.dp-tts-highlight {
  border-color: var(--accent-pink);
  color: var(--accent-pink);
}
.g-info-tts .dwell-dot {
  position: absolute;
  z-index: 10;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  pointer-events: none;
  width: 0; height: 0;
}

/* --- Support card special styling --- */
.g-info-support {
  border: 1px solid rgba(200,169,126,0.15);
  background: linear-gradient(135deg, rgba(200,169,126,0.06), rgba(160,139,110,0.04));
}
.g-info-support .g-info-card-text {
  text-align: center;
  padding: clamp(6px, 1vw, 12px) clamp(8px, 1.5vw, 16px);
}
.g-info-support h2 {
  color: var(--gallery-accent);
  font-size: clamp(16px, 2.4vw, 28px);
  margin-bottom: 4px;
}
.g-info-support p {
  margin-bottom: 4px;
  font-size: clamp(13px, 1.5vw, 18px);
}
.g-info-details {
  font-size: clamp(10px, 1.1vw, 13px) !important;
  color: var(--text-muted) !important;
  font-style: italic;
  margin-bottom: 2px;
}
.g-info-support a.g-btn {
  border-color: var(--gallery-accent);
  color: var(--gallery-accent);
  padding: 6px 16px;
  display: inline-block;
  margin-top: 6px;
  font-size: clamp(11px, 1.2vw, 14px);
}

/* --- Payment headings --- */
.g-pay-heading {
  font-family: var(--gallery-font-serif);
  font-size: clamp(13px, 1.5vw, 18px);
  color: var(--gallery-highlight);
  margin: 4px 0 3px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* --- Stats page --- */
.g-info-stats { overflow-y: auto; }
.g-info-stats .g-info-card-text { padding: clamp(8px, 1.2vw, 16px); }
.g-info-stats h2 { font-size: clamp(16px, 2.2vw, 26px); color: var(--gallery-accent); margin-bottom: 12px; }
.g-info-stats h3 { font-size: clamp(13px, 1.4vw, 17px); color: var(--text-muted); margin: 12px 0 6px; }
.g-stats-grid {
  display: flex;
  gap: clamp(8px, 2vw, 24px);
  justify-content: center;
  margin-bottom: 12px;
}
.g-stats-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  min-width: 80px;
}
.g-stats-big { font-size: clamp(22px, 3vw, 38px); font-weight: 700; color: var(--gallery-accent); }
.g-stats-label { font-size: clamp(10px, 1.1vw, 13px); color: var(--text-dim); margin-top: 2px; }
.g-stats-bars { display: flex; flex-direction: column; gap: 4px; }
.g-stats-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(11px, 1.2vw, 14px);
}
.g-stats-bar-label { flex: 0 0 clamp(100px, 15vw, 180px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-light); }
.g-stats-bar-track { flex: 1; height: 14px; background: rgba(255,255,255,0.06); border-radius: 7px; overflow: hidden; }
.g-stats-bar-fill { height: 100%; background: var(--accent-blue); border-radius: 7px; transition: width 0.6s ease; }
.g-stats-bar-fill.g-stats-bar-pink { background: var(--accent-pink); }
.g-stats-bar-fill.g-stats-bar-green { background: #4ade80; }
.g-stats-bar-val { flex: 0 0 40px; text-align: right; color: var(--text-dim); font-weight: 600; }

/* --- Side-by-side SEPA + PayPal --- */
.g-pay-row {
  display: flex;
  gap: clamp(6px, 1vw, 14px);
  width: 100%;
  margin: 2px 0;
}
.g-pay-col {
  flex: 1;
  min-width: 0;
}

/* --- QR / SEPA grid --- */
.g-qr-grid {
  display: flex;
  justify-content: center;
  gap: clamp(6px, 1vw, 12px);
  flex-wrap: nowrap;
  margin: 3px 0;
}
.g-qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.g-qr-item img {
  border-radius: 6px;
  background: #fff;
  padding: 2px;
  width: clamp(50px, 7vw, 90px);
  height: clamp(50px, 7vw, 90px);
}
.g-qr-amount {
  font-size: clamp(11px, 1.2vw, 15px);
  font-weight: 700;
  color: var(--gallery-accent);
}
.g-qr-label {
  font-size: clamp(9px, 0.9vw, 11px);
  color: var(--text-dim);
  text-align: center;
  max-width: 100px;
  line-height: 1.2;
}

/* --- PayPal buttons grid --- */
.g-paypal-grid {
  display: flex;
  justify-content: center;
  gap: clamp(6px, 1vw, 12px);
  flex-wrap: nowrap;
  margin: 3px 0;
}
.g-paypal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(135deg, #0070ba22, #00308722);
  border: 2px solid rgba(0,112,186,0.3);
  border-radius: var(--radius);
  padding: clamp(6px, 0.8vw, 10px) clamp(8px, 1vw, 14px);
  transition: transform 0.2s, border-color 0.2s;
}
.g-paypal-btn:hover {
  transform: scale(1.05);
  border-color: #0070ba;
  z-index: 2;
}
.g-paypal-icon { font-size: clamp(18px, 2vw, 28px); }
.g-paypal-amount {
  font-size: clamp(11px, 1.2vw, 15px);
  font-weight: 700;
  color: #0070ba;
}
.g-paypal-label {
  font-size: clamp(9px, 0.9vw, 11px);
  color: var(--text-dim);
  text-align: center;
  max-width: 100px;
  line-height: 1.2;
}

/* --- Info bottom bar (rows 5-6) --- */
#g-info-close {
  grid-column: 1 / 3;
  grid-row: 5 / 7;
  font-size: clamp(22px, 3vw, 36px);
}
#g-info-prev {
  grid-column: 3 / 5;
  grid-row: 5 / 7;
  font-size: clamp(28px, 4vw, 48px);
}
.g-info-page-indicator {
  grid-column: 5 / 7;
  grid-row: 5 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14px, 1.8vw, 22px);
  color: var(--text-dim);
  font-weight: 600;
}
#g-info-next {
  grid-column: 7 / 9;
  grid-row: 5 / 7;
  font-size: clamp(28px, 4vw, 48px);
}
.g-info-links-area {
  grid-column: 9 / 11;
  grid-row: 5 / 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: clamp(9px, 1vw, 12px);
}
.g-info-links-area a { color: var(--accent-blue); text-decoration: none; }
.g-info-links-area a:hover { text-decoration: underline; }

/* ===== Filter Overlay (10x6 grid) ===== */
.g-filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 16000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.g-filter-overlay.open {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: var(--gap);
  padding: var(--gap);
}
.g-filter-title {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--gallery-font-serif);
  font-size: clamp(16px, 2.5vw, 28px);
  font-weight: 300;
  color: var(--gallery-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.g-filter-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  background: var(--bg-card);
  color: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 600;
  text-align: center;
  padding: 4px;
}
.g-filter-tile .desc {
  font-size: clamp(13px, 1.5vw, 18px);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 6px;
}
.g-filter-tile:hover { transform: scale(1.03); box-shadow: 0 6px 24px rgba(0,0,0,0.4); z-index: 2; }

/* PNG theme icons — use as background-like image filling most of the tile */
.g-filter-tile-img {
  display: block;
  max-width: 72%;
  max-height: 62%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}
.g-filter-tile-icon {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
}

/* Sort tiles (Lucide SVG icons) — bigger, readable, matching theme tile size */
.g-filter-sort-tile {
  padding: 8px !important;
}
.g-filter-tile-svg {
  width: clamp(36px, 5vw, 64px);
  height: clamp(36px, 5vw, 64px);
  color: var(--gallery-accent);
  stroke-width: 2.2;
}
.g-filter-sort-tile.active .g-filter-tile-svg {
  color: #fff;
  filter: drop-shadow(0 0 10px rgba(10,132,255,0.6));
}
.g-filter-sort-tile .desc {
  font-size: clamp(13px, 1.6vw, 19px) !important;
  margin-top: 8px;
}
/* Search bar in filter overlay */
.g-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
}
.g-search-input {
  flex: 1;
  padding: 10px 16px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: clamp(14px, 1.6vw, 18px);
  outline: none;
  min-height: 48px;
}
.g-search-input:focus { border-color: var(--accent-blue); }
.g-search-input::placeholder { color: rgba(255,255,255,0.3); }
.g-search-btn {
  width: 48px; height: 48px; min-width: 48px;
  border-radius: 50%;
  border: none;
  background: var(--accent-blue);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.g-search-btn:hover { background: #0a6cff; }
.g-filter-tile.active {
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, #0a1a3a, #1a2a55);
  box-shadow: 0 0 16px rgba(10,132,255,0.3);
}

/* ===== Settings Overlay (10x6 grid) ===== */
.g-settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 17000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.g-settings-overlay.open {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: var(--gap);
  padding: var(--gap);
}
.g-settings-title {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--gallery-font-serif);
  font-size: clamp(16px, 2.5vw, 28px);
  font-weight: 300;
  color: var(--gallery-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.g-settings-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: clamp(12px, 1.5vw, 18px);
  font-weight: 700;
  color: var(--text-dim);
  padding: 4px;
}
.g-settings-btn {
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}
.g-settings-btn strong {
  font-size: clamp(14px, 1.8vw, 22px);
}

/* Settings tiles (2x2) with Lucide SVG icons */
.g-settings-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border: 2px solid transparent;
  background: var(--bg-card);
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.2s;
}
.g-settings-tile:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.g-settings-tile.active {
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, #0a1a3a, #1a2a55);
  box-shadow: 0 0 16px rgba(10,132,255,0.3);
}
.g-settings-tile .desc {
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.g-settings-svg {
  width: clamp(40px, 6vw, 72px);
  height: clamp(40px, 6vw, 72px);
  color: var(--gallery-accent);
  stroke-width: 2.2;
}
.g-settings-tile.active .g-settings-svg {
  color: #fff;
  filter: drop-shadow(0 0 10px rgba(10,132,255,0.6));
}

/* ===== Buy Modal ===== */
.g-buy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 30000;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: var(--gap);
  padding: var(--gap);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.g-buy-preview {
  grid-column: 3 / 9;
  grid-row: 1 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.g-buy-img {
  max-width: 100%;
  max-height: 70%;
  object-fit: contain;
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.g-buy-artist { font-size: clamp(14px, 1.6vw, 18px); font-weight: 600; }
.g-buy-theme { font-size: clamp(11px, 1.2vw, 14px); color: var(--accent-blue); margin-top: 2px; }
.g-buy-input-area {
  grid-column: 3 / 9;
  grid-row: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.g-buy-input-area label { font-size: clamp(12px, 1.3vw, 16px); color: var(--text-dim); }
.g-buy-input {
  width: 120px;
  padding: 8px 12px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.3);
  color: #fff;
  outline: none;
  font-family: inherit;
}
.g-buy-input:focus { border-color: var(--accent-violet); }
.g-buy-hint { font-size: clamp(10px, 1vw, 12px); color: var(--text-muted); }
#g-buy-cancel { grid-column: 1 / 3; grid-row: 5 / 7; }
.g-buy-title-area {
  grid-column: 3 / 9;
  grid-row: 5 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--gallery-font-serif);
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: 300;
  color: var(--gallery-accent);
  letter-spacing: 0.08em;
}
#g-buy-confirm {
  grid-column: 9 / 11;
  grid-row: 5 / 7;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #18171e, #201f28) padding-box,
              linear-gradient(135deg, var(--gallery-accent), var(--gallery-highlight)) border-box;
  font-weight: 700;
}

/* ===== Carousel horizontal scroll ===== */
.g-carousel-track {
  display: flex;
  flex-direction: row;
  height: 100%;
  will-change: transform;
}
.g-carousel-track .g-slot-img {
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Debug Grid: now provided by common/dp-dev-grid.js */


/* --- Similar Works thumbnails on artist button --- */
.g-lb-artist-thumbs {
  display: flex;
  gap: 3px;
  margin-top: 3px;
}
.g-lb-similar-thumb {
  width: clamp(20px, 2.5vw, 32px);
  height: clamp(20px, 2.5vw, 32px);
  border-radius: 4px;
  object-fit: cover;
  pointer-events: none;
}

/* --- Artist Profile Overlay --- */
.g-profile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 18000;
  background: rgba(0,0,0,0.94);
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: var(--gap);
  padding: var(--gap);
}
.g-profile-overlay.open {
  display: grid;
}
.g-profile-header {
  grid-column: 3 / 11;
  grid-row: 1 / 2;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 16px);
  padding: clamp(8px, 1.2vw, 16px);
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius);
}
.g-profile-avatar {
  width: clamp(48px, 6vw, 80px);
  height: clamp(48px, 6vw, 80px);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gallery-accent), var(--gallery-accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(24px, 3vw, 40px);
  color: #fff;
  flex-shrink: 0;
}
.g-profile-info { flex: 1; }
.g-profile-name {
  font-family: var(--gallery-font-serif);
  font-size: clamp(16px, 2.2vw, 26px);
  font-weight: 500;
  color: var(--gallery-accent);
  letter-spacing: 0.04em;
}
.g-profile-meta {
  font-size: clamp(11px, 1.2vw, 14px);
  color: var(--text-dim);
  margin-top: 2px;
}
.g-profile-stats-row {
  display: flex;
  gap: clamp(12px, 2vw, 24px);
  margin-top: 6px;
}
.g-profile-stat {
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 600;
  color: var(--text-light);
}
.g-profile-stat span { color: var(--text-dim); font-weight: 400; font-size: 0.85em; }
.g-profile-works {
  grid-column: 3 / 11;
  grid-row: 2 / 6;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(100px, 15vw, 200px), 1fr));
  gap: clamp(4px, 0.6vw, 8px);
  overflow-y: auto;
  padding: 4px;
}
.g-profile-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
  width: 100%;
  cursor: pointer;
  transition: transform 0.15s;
  border: 2px solid transparent;
}
.g-profile-slot {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.g-profile-thumb:hover { transform: scale(1.04); border-color: var(--accent-blue); z-index: 2; }
#g-profile-close {
  grid-column: 1 / 3;
  grid-row: 5 / 7;
  font-size: clamp(20px, 3vw, 36px);
}

/* ===== RTL ===== */
[dir="rtl"] .g-slot-info { flex-direction: row-reverse; }
[dir="rtl"] #g-lb-artist-btn { text-align: right; }

.g-btn:focus-visible, .g-slot:focus-visible {
  outline: 3px solid #4488ff;
  outline-offset: 2px;
  z-index: 5;
}

.skip-link {
  position: absolute;
  top: -999px;
  left: 10px;
  background: #4488ff;
  color: #fff;
  padding: 8px 16px;
  z-index: 99999;
  border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus {
  top: 10px;
}

/* ===== Grid Size: 8x5 ===== */
body.grid-8x5 {
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(5, 1fr);
}
body.grid-8x5 .g-title-area   { grid-column: 3 / 7;  grid-row: 1 / 2; }
body.grid-8x5 #g-info-btn     { grid-column: 7 / 8;  grid-row: 1 / 2; }
body.grid-8x5 #g-support-main-btn { grid-column: 8 / 9; grid-row: 1 / 2; }
body.grid-8x5 #g-prev-btn     { grid-column: 1 / 2;  grid-row: 3 / 4; }
body.grid-8x5 #g-slot-1       { grid-column: 2 / 4;  grid-row: 2 / 5; }
body.grid-8x5 #g-slot-2       { grid-column: 4 / 6;  grid-row: 2 / 5; }
body.grid-8x5 #g-slot-3       { grid-column: 6 / 8;  grid-row: 2 / 5; }
body.grid-8x5 #g-slot-4,
body.grid-8x5 #g-slot-5,
body.grid-8x5 #g-slot-6       { display: none; }
body.grid-8x5 #g-next-btn     { grid-column: 8 / 9;  grid-row: 3 / 4; }
body.grid-8x5 #g-close-btn    { grid-column: 1 / 2;  grid-row: 5 / 6; }
body.grid-8x5 #g-filter-btn   { grid-column: 4 / 5;  grid-row: 5 / 6; }
body.grid-8x5 #g-random-btn   { grid-column: 5 / 6;  grid-row: 5 / 6; }
body.grid-8x5 #g-atelier-btn  { grid-column: 7 / 8;  grid-row: 5 / 6; }
body.grid-8x5 #g-settings-btn { grid-column: 8 / 9;  grid-row: 5 / 6; }
body.grid-8x5 .g-artist-filter-bar { grid-column: 2 / 8; }

/* ===== Grid Size: 6x4 ===== */
body.grid-6x4 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, 1fr);
}
body.grid-6x4 .g-logo         { display: none; }
body.grid-6x4 .g-title-area   { grid-column: 1 / 4;  grid-row: 1 / 2; }
body.grid-6x4 #g-info-btn     { grid-column: 5 / 6;  grid-row: 1 / 2; }
body.grid-6x4 #g-support-main-btn { grid-column: 6 / 7; grid-row: 1 / 2; }
body.grid-6x4 #g-prev-btn     { grid-column: 1 / 2;  grid-row: 2 / 4; font-size: clamp(24px, 4vw, 44px); }
body.grid-6x4 #g-slot-1       { grid-column: 2 / 4;  grid-row: 2 / 4; }
body.grid-6x4 #g-slot-2       { grid-column: 4 / 6;  grid-row: 2 / 4; }
body.grid-6x4 #g-slot-3,
body.grid-6x4 #g-slot-4,
body.grid-6x4 #g-slot-5,
body.grid-6x4 #g-slot-6       { display: none; }
body.grid-6x4 #g-next-btn     { grid-column: 6 / 7;  grid-row: 2 / 4; font-size: clamp(24px, 4vw, 44px); }
body.grid-6x4 #g-close-btn    { grid-column: 1 / 2;  grid-row: 4 / 5; }
body.grid-6x4 #g-filter-btn   { grid-column: 3 / 4;  grid-row: 4 / 5; }
body.grid-6x4 #g-random-btn   { grid-column: 4 / 5;  grid-row: 4 / 5; }
body.grid-6x4 #g-atelier-btn  { grid-column: 5 / 6;  grid-row: 4 / 5; }
body.grid-6x4 #g-settings-btn { grid-column: 6 / 7;  grid-row: 4 / 5; }
body.grid-6x4 .g-artist-filter-bar { grid-column: 2 / 6; }

/* ===== Error / Loading States ===== */
.g-error-msg {
  color: #e07070;
  font-size: clamp(11px, 1.3vw, 15px);
}
.page-info.loading {
  color: var(--text-muted);
}

/* ===== Active Filter Indicator ===== */
.g-active-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(10,132,255,0.12);
  border: 1px solid rgba(10,132,255,0.3);
  font-size: clamp(10px, 1.1vw, 13px);
  color: var(--accent-blue);
  cursor: pointer;
  transition: background 0.2s;
}
.g-active-filter-badge:hover {
  background: rgba(10,132,255,0.25);
}

/* ===== Image error fallback ===== */
.g-slot-img-error {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: clamp(24px, 3vw, 40px);
}

/* ===== Mobile (portrait phones) ===== */
@media (max-width: 600px) and (orientation: portrait) {
  body {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto 1fr 1fr auto;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
  }
  .g-slot { grid-column: span 2; }
  .g-title-area { grid-column: 1 / -1; grid-row: 1; }
  .g-logo { display: none; }
  #g-prev-btn { grid-column: 1 / 2; grid-row: 2; }
  #g-next-btn { grid-column: 4 / 5; grid-row: 2; }
  #g-slot-1, #g-slot-2 { grid-row: 2; }
  #g-slot-3, #g-slot-4 { grid-row: 3; }
  #g-slot-5, #g-slot-6 { display: none; }
  #g-info-btn, #g-support-main-btn { display: none; }
  .g-btn { min-height: 44px; }
}

/* ===== Tablet (landscape phones / small tablets) ===== */
@media (max-width: 900px) and (min-width: 601px) {
  .g-btn .desc { font-size: clamp(10px, 1.3vw, 14px); }
  .g-title-area h1 { font-size: clamp(14px, 2vw, 22px); }
}

/* ===== Touch device: swipe hint on gallery ===== */
@media (hover: none) and (pointer: coarse) {
  .g-btn { min-height: 44px; }
  .g-slot:active { transform: scale(0.97); }
  .dwell-dot { display: none; }
}

/* ===== Reduced motion (Epilepsie/Photosensitivitaet) ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .g-slot:hover { transform: none; }
  .g-btn:hover { transform: none; }
  .g-skeleton { animation: none !important; }
}
