*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #000;
  --fg:          #e8e4dc;
  --accent:      #c8ff00;
  --card-bg:     #161616;
  --card-border: #2a2a2a;
  --col-w:    23.375em;  /* 374px at 16px base */
  --col-gap:   3.125em;  /* 50px  at 16px base */
  --card-h:   29.375em;  /* 470px at 16px base */
  --card-gap:  3.125em;  /* 50px  at 16px base */
}

.rlc-infinite-grid {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Mono', monospace;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;  /* Safari */
  position: relative;
  /* Prevent pull-to-refresh and overscroll on mobile */
  overscroll-behavior: none;
  opacity: 0;
  transition: opacity 0.5s;
}
.rlc-infinite-grid.rlc-ready {
  opacity: 1;
}
.rlc-infinite-grid.rlc-dragging { cursor: grabbing; }

.rlc-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.rlc-canvas {
  position: absolute;
  top: 0; left: 0;
  display: flex;
  gap: var(--col-gap);
  will-change: transform;
  /* Prevent iOS Safari native scroll from fighting Draggable */
  touch-action: none;
}

.rlc-col {
  flex-shrink: 0;
  width: var(--col-w);
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  will-change: transform;
}

.rlc-card {
  flex-shrink: 0;
  width: var(--col-w);
  height: var(--card-h);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}
/* .rlc-card:hover { border-color: var(--accent); } */

.rlc-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%) brightness(0.85);
  transition: filter 0.4s ease, transform 0.6s ease;
  /* Prevent ghost drag image in Safari */
  -webkit-user-drag: none;
  pointer-events: none;
}
.rlc-card:hover img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.04);
}


/* All cards are the same size — no tall/short variants */

.rlc-card-label {
  position: absolute;
  bottom: 12px; left: 14px;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.rlc-card-num {
  position: absolute;
  top: 12px; right: 14px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.rlc-card:hover .rlc-card-label,
.rlc-card:hover .rlc-card-num { opacity: 1; }

.rlc-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

.rlc-corner {
  position: absolute;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.4;
  line-height: 1.6;
}
.rlc-corner.rlc-tl { top: 24px; left: 28px; }
.rlc-corner.rlc-tr { top: 24px; right: 28px; text-align: right; }
.rlc-corner.rlc-bl { bottom: 24px; left: 28px; }
.rlc-corner.rlc-br { bottom: 24px; right: 28px; text-align: right; }

.rlc-crosshair {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 32px; height: 32px;
  opacity: 0.18;
  pointer-events: none;
}
.rlc-crosshair::before,
.rlc-crosshair::after {
  content: '';
  position: absolute;
  background: var(--fg);
}
.rlc-crosshair::before { width: 1px; height: 100%; top: 0; left: 50%; }
.rlc-crosshair::after  { width: 100%; height: 1px; top: 50%; left: 0; }

.rlc-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.35;
  transition: opacity 0.8s ease;
  white-space: nowrap;
}
.rlc-hint.rlc-hide { opacity: 0; }

.rlc-speed-dots {
  position: absolute;
  top: 50%; right: 28px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0.25;
}
.rlc-sdot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--fg);
}
.rlc-sdot.rlc-active { background: var(--accent); opacity: 1; }

.rlc-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(12,12,12,0.75) 100%);
  pointer-events: none;
  z-index: 50;
}

.rlc-gradient-blur {
  position: absolute;
  bottom: 0; left: 0;
  height: 7.5em;
  width: 100%;
  pointer-events: none;
  z-index: 5;
}
.rlc-gradient-blur.rlc-top {
  transform: scaleY(-1);
  bottom: auto; top: 0;
}
  .rlc-gradient-blur > div,
  .rlc-gradient-blur::before,
  .rlc-gradient-blur::after {
    position: absolute;
    inset: 0;
  }
  .rlc-gradient-blur::before {
    content: "";
    z-index: 1;
    backdrop-filter: blur(0.5px);
    mask: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 1) 12.5%,
      rgba(0, 0, 0, 1) 25%,
      rgba(0, 0, 0, 0) 37.5%
    );
  }
  .rlc-gradient-blur > div:nth-of-type(1) {
    z-index: 2;
    backdrop-filter: blur(1px);
    mask: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 12.5%,
      rgba(0, 0, 0, 1) 25%,
      rgba(0, 0, 0, 1) 37.5%,
      rgba(0, 0, 0, 0) 50%
    );
  }
  .rlc-gradient-blur > div:nth-of-type(2) {
    z-index: 3;
    backdrop-filter: blur(2px);
    mask: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 25%,
      rgba(0, 0, 0, 1) 37.5%,
      rgba(0, 0, 0, 1) 50%,
      rgba(0, 0, 0, 0) 62.5%
    );
  }
  .rlc-gradient-blur > div:nth-of-type(3) {
    z-index: 4;
    backdrop-filter: blur(4px);
    mask: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 37.5%,
      rgba(0, 0, 0, 1) 50%,
      rgba(0, 0, 0, 1) 62.5%,
      rgba(0, 0, 0, 0) 75%
    );
  }
  .rlc-gradient-blur > div:nth-of-type(4) {
    z-index: 5;
    backdrop-filter: blur(6px);
    mask: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 50%,
      rgba(0, 0, 0, 1) 62.5%,
      rgba(0, 0, 0, 1) 75%,
      rgba(0, 0, 0, 0) 87.5%
    );
  }
  .rlc-gradient-blur > div:nth-of-type(5) {
    z-index: 6;
    backdrop-filter: blur(8px);
    mask: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 62.5%,
      rgba(0, 0, 0, 1) 75%,
      rgba(0, 0, 0, 1) 87.5%,
      rgba(0, 0, 0, 0) 100%
    );
  }
  .rlc-gradient-blur > div:nth-of-type(6) {
    z-index: 7;
    backdrop-filter: blur(10px);
    mask: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 75%,
      rgba(0, 0, 0, 1) 87.5%,
      rgba(0, 0, 0, 1) 100%
    );
  }
  .rlc-gradient-blur::after {
    content: "";
    z-index: 8;
    backdrop-filter: blur(12px);
    mask: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 87.5%,
      rgba(0, 0, 0, 1) 100%
    );
  }

/* ─────────────────────────────────────────────
   MOBILE — 7 columns × 5 cards, smaller dimensions
   Cards: 10.75em × 13.5em, gap: 1.25em
───────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --col-w:    10.75em;  /* mobile card width  */
    --col-gap:   1.25em;  /* mobile column gap  */
    --card-h:   13.5em;   /* mobile card height */
    --card-gap:  1.25em;  /* mobile card gap    */
  }
}