/* Base Styles for Daim Art Gallery (desktop and default) */
body::before {
    content: '';
    position: fixed;
    left: 50%;
    top: 50%;
    width: 70vmin;
    height: 70vmin;
    max-width: 1080px;
    max-height: 1080px;
    min-width: 200px;
    min-height: 200px;
    transform: translate(-50%, -50%);
    z-index: -1000;
    background: url('daimalyad.jpg') center center/contain no-repeat;
    opacity: 0.8;
    pointer-events: none;
  }
  html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;         /* prevent horizontal scroll */
    background: #000;
    color: #d0d0d0;
    font-family: 'Kaisei Decol', serif;
    position: relative;
    z-index: 1;
  }
  .gallery-container, .gallery-grid {
    position: relative;
    z-index: 2;
  }
  /* Grid Wrapper */
  .gallery-container {
    display: flex;
    justify-content: center;
    width: 100vw;
    margin-top: 40px;
    box-sizing: border-box;
    overflow: hidden;          /* hide overflow by default (overridden for mobile) */
  }
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    /*width: 60vw;*/
    max-width: 1800px;
    min-width: 320px;
    margin: 0 auto;
    gap: 32px 0;               /* 32px vertical gap, no horizontal gap */
    overflow: visible;
  }
  /* Cells & Placeholders */
  .cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;   /* center content vertically */
    min-height: 120px;
    height: 152px;
    position: relative;
    overflow: visible;
  }
  .empty-cell {
    color: #444;
    font-size: 1.2em;
    font-family: monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    user-select: none;
    opacity: 0.6;
  }
  /* Thumbnails */
  .thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    background: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    transform: scale(1.5);             /* 150% enlargement (initial scale) */
    transform-origin: center;
    z-index: 1;                        /* above connector pipes */
  }
  .thumb:hover {
    transform: scale(1.59);
    box-shadow: 0 4px 16px rgba(0,0,0,0.85);
  }
  .thumb-overlay {
    transition: width 0.18s cubic-bezier(.4,1.4,.6,1),
                height 0.18s cubic-bezier(.4,1.4,.6,1),
                opacity 0.18s cubic-bezier(.4,1.4,.6,1);
    opacity: 0;
  }
  .thumb-overlay.visible {
    opacity: 1;
  }
  /* Include border in element dimensions for precise layout */
  .thumb, .thumb-overlay {
    border: 0.25ex solid #fff;
    box-sizing: border-box;
  }
  /* Connector SVG (pipes) */
  .connector-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;      /* ignore mouse events on SVG */
    z-index: 0;                /* behind thumbnails */
  }
  /* Footer and Header styles */
  .footer {
    width: 100vw;
    text-align: center;
    margin: 40px 0 10px;
    position: relative;
    z-index: 10;
  }
  .footer-content {
    color: #fff;
    font-size: 0.95em;
    font-style: italic;
    text-align: center;
    margin: 0 auto;
    letter-spacing: 0.01em;
  }
  .footer-content a {
    color: #bfa000;
    text-decoration: none;
    font-style: normal;
  }
  .footer-content a:hover {
    text-decoration: underline;
  }
  .site-header {
    text-align: center;
    color: #fff;
    line-height: 1.4;
    margin-top: 20px;
    margin-bottom: 10px;
  }
  .site-header h1 {
    font-family: 'Cinzel Decorative', cursive, serif;
    font-weight: 700;
    letter-spacing: 0.07em;
    font-size: 2.2em;
    margin: 0 0 8px;
  }
  .site-header h1 {
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: 0.09em;
  }
  .site-header p {
    margin: 4px 0;
    font-size: 1.05em;
  }
  /* ---------- Pipe visibility fix ---------- */
  .gallery-container {
    overflow: visible;
  }
  