/* ==========================================================
   EXOT — Design System CSS (optimized)
   Tipografía · Color · Componentes · Cursor · Fade · Sphere
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&display=swap');

/* ---------- 1. Tokens ---------- */
:root {
  --color-bg:     #000000;
  --color-text:   #ffffff;
  --color-accent: #ffffff;

  --ui-pad:   34px;
  --menu-gap: 34px;

  --font-family: "Geist", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --radius-pill:   999px;
  --radius-panel:  18px;
  --radius-cam:    12px;

  --blur-btn:   blur(14px);
  --blur-panel: blur(16px);

  --t-fast: 0.25s ease;
  --t-base: 0.28s ease;
  --t-slow: 0.32s ease;
  --t-page: 0.38s cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body { width: 100%; height: 100%; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  user-select: text;
  -webkit-user-select: text;
}

body.hand-mode { user-select: none; }

/* Keep media and drag interfaces unselectable without blocking normal text selection. */
.sphere-root,
.grid-videos,
.tile,
.item__card,
.item__media,
.mobile-gallery,
.mobile-card,
.mobile-card__media,
video,
img {
  user-select: none;
  -webkit-user-select: none;
}

@media (min-width: 769px) and (pointer: fine) {
  body { cursor: auto; }
  a, button, input, textarea, select, [role="button"], .tile, .sphere-root .item__card, .sphere-root .close-btn, .sphere-nav-btn, .flecha-back {
    cursor: pointer;
  }
  video, img { cursor: auto; }
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ---------- 3. Brand (home) ---------- */
.brand {
  position: fixed;
  top: var(--ui-pad);
  left: var(--ui-pad);
  z-index: 10;
  pointer-events: none;
}

.brand .name {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.brand .role {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ---------- 4. Menú ---------- */
.menu {
  position: fixed;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: var(--menu-gap);
  list-style: none;
}

.menu a {
  position: relative;
  text-decoration: none;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.86;
  transition: opacity var(--t-fast);
  outline: none;
}

.menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.8);
  transition: width var(--t-slow);
}

.menu a:hover,
.menu a:focus-visible,
.menu a.hand-hover { opacity: 1; }

.menu a:hover::after,
.menu a:focus-visible::after,
.menu a.hand-hover::after { width: 100%; }

/* ---------- 5. Page label ---------- */
.page-label {
  position: fixed;
  top: 26px;
  right: 24px;
  z-index: 100;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.86;
}

/* ---------- 6. Flecha volver ---------- */
.flecha-back {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  backdrop-filter: var(--blur-btn);
  -webkit-backdrop-filter: var(--blur-btn);
  transition:
    background var(--t-fast),
    border-color var(--t-fast),
    transform var(--t-fast),
    box-shadow var(--t-fast);
}

.flecha-back:hover,
.flecha-back:focus-visible,
.flecha-back.hand-hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.28);
  outline: none;
}

/* ---------- 7. Hand toggle / panel (kept for compatibility, usually hidden) ---------- */
#handToggle, .btn-pill, .exot-hand-toggle {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: var(--blur-btn);
  -webkit-backdrop-filter: var(--blur-btn);
  transition:
    background var(--t-fast),
    border-color var(--t-fast),
    transform var(--t-fast),
    opacity var(--t-fast);
  cursor: pointer;
}

#handToggle:hover,
.btn-pill:hover,
.exot-hand-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

#handToggle[aria-pressed="true"],
.exot-hand-toggle[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

#handToggle:disabled,
.exot-hand-toggle:disabled { opacity: 0.55; cursor: wait; }

#handPanel, .exot-hand-panel {
  position: fixed;
  top: 82px;
  right: 28px;
  z-index: 1190;
  width: 248px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-panel);
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: var(--blur-panel);
  -webkit-backdrop-filter: var(--blur-panel);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base);
}

#handPanel.active,
.exot-hand-panel.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hand-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

#handStatusDot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  flex: 0 0 auto;
  transition: background 0.22s ease, box-shadow 0.22s ease;
}
#handStatusDot.live    { background: #fff; box-shadow: 0 0 12px rgba(255, 255, 255, 0.5); }
#handStatusDot.pending { background: rgba(255, 255, 255, 0.55); }
#handStatusDot.error   { background: rgba(255, 255, 255, 0.25); }

#handCam {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-cam);
  background: rgba(255, 255, 255, 0.04);
  filter: grayscale(1) contrast(1.18) brightness(0.98);
  transform: scaleX(-1);
  display: block;
}

.hand-foot {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.04em;
}

/* ---------- 8. Cursor ---------- */
/* Custom logo cursor removed. Native cursor keeps the page cleaner and faster. */
#cursor {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ---------- 9. Fade ---------- */
#fade, .fade, .exot-fade {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9990;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-page);
}
#fade.active, .fade.active, .exot-fade.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- 10. Home overlays ---------- */
.overlay {
  position: fixed; inset: 0;
  z-index: 1; pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.24),
    rgba(0,0,0,0.06) 28%,
    rgba(0,0,0,0.10) 60%,
    rgba(0,0,0,0.34)
  );
}

.vignette {
  position: fixed; inset: 0;
  z-index: 2; pointer-events: none;
  background: radial-gradient(
    circle at center,
    transparent 34%,
    rgba(0,0,0,0.08) 62%,
    rgba(0,0,0,0.28) 100%
  );
}

.noise {
  position: fixed; inset: 0;
  z-index: 3; pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

/* ---------- 11. Grid tiles ---------- */
.grid-videos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 100vw;
  height: 100vh;
  background: #000;
}

.tile {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  background: #000;
  opacity: 0;
}

.tile video,
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
  transition:
    transform 0.8s cubic-bezier(0.2, 1, 0.3, 1),
    filter 0.5s ease;
}

.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, transparent 54%);
  z-index: 1;
}

.tile-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tile-index {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
}

.tile-title {
  font-size: clamp(24px, 3vw, 48px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #fff;
}

.tile-line {
  width: 0;
  height: 2px;
  background: var(--color-accent);
  margin: 12px 0;
  transition: width 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.tile-meta {
  font-size: 12px;
  color: #fff;
  opacity: 0.7;
  max-width: 280px;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.tile:hover video,
.tile:hover img,
.tile.hand-hover video,
.tile.hand-hover img {
  transform: scale(1.05);
  filter: brightness(0.85);
}

.tile:hover .tile-line,
.tile.hand-hover .tile-line { width: 100px; }

.tile:hover .tile-meta,
.tile.hand-hover .tile-meta {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 12. Sphere ---------- */
.sphere-root {
  --radius: 900px;
  --tile-w: 264px;
  --tile-h: 374px;
  --tile-radius: 18px;
  --enlarge-r: 22px;

  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(255,255,255,.02), rgba(0,0,0,0) 36%), #000;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.sphere-root.ready { opacity: 1; }

.sphere-main { width: 100%; height: 100%; position: relative; }

.sphere-root .stage {
  position: absolute; inset: 0;
  perspective: 1600px; perspective-origin: 50% 50%;
  display: flex; align-items: center; justify-content: center;
  touch-action: pan-y;
}

.sphere-root .sphere {
  position: relative;
  transform-style: preserve-3d;
  width: 0; height: 0;
  will-change: transform;
  backface-visibility: hidden;
}

.sphere-root .item { position: absolute; transform-style: preserve-3d; z-index: 1; }

.sphere-root .item__card {
  position: absolute;
  width: var(--tile-w); height: var(--tile-h);
  transform: translate(-50%, -50%) scale(var(--tile-scale, 1));
  transform-origin: center center;
  border-radius: var(--tile-radius);
  overflow: hidden;
  opacity: var(--tile-opacity, 1);
  filter: blur(var(--tile-blur, 0px)) brightness(var(--tile-brightness, 1));
  will-change: transform, filter, opacity;
  transition: opacity .24s ease, transform .24s ease, box-shadow .24s ease, filter .24s ease;
  box-shadow: 0 18px 46px rgba(0,0,0,.22);
  background: #0a0a0a;
  cursor: pointer;
}

.sphere-root .item__media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: grayscale(1) brightness(.82) contrast(1.02);
  transition: filter .24s ease, transform .24s ease;
  will-change: filter, transform;
  backface-visibility: hidden;
}

.sphere-root .item__card:hover .item__media,
.sphere-root .item__card:focus-visible .item__media,
.sphere-root .item.active .item__media,
.sphere-root .item__card.hand-hover .item__media {
  filter: grayscale(0) brightness(1) contrast(1.04);
  transform: scale(1.02);
}

.sphere-root .item__card:focus-visible {
  outline: 1px solid rgba(255,255,255,.28);
  outline-offset: 4px;
}

.sphere-root .item--video .item__card::after,
.mobile-card.item--video::after {
  content: none !important;
  display: none !important;
}

.sphere-root .dome-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 10;
  background: radial-gradient(ellipse 76% 66% at 50% 50%,
    transparent 28%, rgba(0,0,0,.05) 52%, rgba(0,0,0,.56) 82%, rgba(0,0,0,.9) 100%);
}

.sphere-root .edge-top,
.sphere-root .edge-bottom {
  position: absolute; left: 0; right: 0; height: 170px; pointer-events: none; z-index: 11;
}
.sphere-root .edge-top    { top: 0;    background: linear-gradient(to bottom, rgba(0,0,0,.97), rgba(0,0,0,.18), transparent); }
.sphere-root .edge-bottom { bottom: 0; background: linear-gradient(to top, rgba(0,0,0,.97), rgba(0,0,0,.18), transparent); }

.sphere-root .viewer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.sphere-root .scrim {
  position: absolute; inset: 0; background: rgba(0,0,0,.84);
  opacity: 0; pointer-events: none;
  transition: opacity .34s ease;
}
.sphere-root .scrim.active { opacity: 1; pointer-events: all; }

.sphere-root .enlarge,
.sphere-root .enlarge-closing {
  position: absolute;
  overflow: hidden;
  border-radius: var(--enlarge-r);
  z-index: 32;
  pointer-events: none;
  box-shadow: 0 28px 80px rgba(0,0,0,.75);
  background: #000;
}

.sphere-root .enlarge img,
.sphere-root .enlarge video,
.sphere-root .enlarge-closing img,
.sphere-root .enlarge-closing video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
}

.sphere-root .close-btn {
  position: absolute; top: 18px; right: 18px; z-index: 40;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, background .25s ease;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
}

.sphere-root .close-btn:hover,
.sphere-root .close-btn.hand-hover { background: rgba(255,255,255,.16); }
.sphere-root .close-btn.active { opacity: 1; pointer-events: all; }

.drag-hint {
  position: fixed; bottom: 132px; left: 50%;
  transform: translateX(-50%); z-index: 50;
  font-size: 10px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255,255,255,.32); pointer-events: none;
  transition: opacity .9s ease;
}

.description-copy {
  position: fixed; left: 50%; bottom: 34px;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 64px));
  z-index: 51; text-align: center;
  font-size: 12px; line-height: 1.65; letter-spacing: .02em;
  color: rgba(255,255,255,.66);
  pointer-events: none;
}

/* ---------- 13. Mobile sphere fallback ---------- */
body.sphere-mobile {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.sphere-mobile .sphere-root {
  position: relative;
  inset: auto;
  overflow: visible;
  min-height: auto;
}

body.sphere-mobile .sphere-main {
  position: relative;
  min-height: auto;
}

body.sphere-mobile .sphere-root .stage,
body.sphere-mobile .sphere-root .dome-vignette,
body.sphere-mobile .sphere-root .edge-top,
body.sphere-mobile .sphere-root .edge-bottom {
  display: none !important;
}

.mobile-gallery {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: min(780px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 84px 0 24px;
}

.mobile-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #0a0a0a;
  box-shadow: 0 18px 44px rgba(0,0,0,.22);
}

.mobile-card__media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: brightness(.9);
}

/* Mobile overrides the desktop grayscale treatment: on phones, images
   and the frozen first-frame of videos must render in full colour.
   Covers both <img class="item__media"> and <video class="item__media">
   (the CORS fallback poster). Desktop sphere behaviour is untouched. */
.mobile-card > .item__media,
.mobile-card > video.item__media,
body.sphere-mobile .sphere-root .mobile-card .item__media {
  filter: brightness(.96);
  object-fit: cover;
  display: block;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
}

body.sphere-mobile .description-copy {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: min(760px, calc(100vw - 40px));
  margin: 0 auto 28px;
  text-align: center;
}

body.sphere-mobile .drag-hint {
  display: none !important;
}

/* ---------- 14. Responsive ---------- */
@media (max-width: 768px) {
  body, a, video, button, input, textarea, select, [role="button"] { cursor: auto; }

  #cursor, .noise, #handToggle, #handPanel, .exot-hand-toggle, .exot-hand-panel {
    display: none !important;
  }

  .brand {
    top: max(22px, env(safe-area-inset-top));
    left: max(20px, env(safe-area-inset-left));
    right: max(20px, env(safe-area-inset-right));
  }
  .brand .name { font-size: 26px; line-height: 1; }
  .brand .role {
    margin-top: 10px;
    font-size: 10px;
    letter-spacing: 0.14em;
    line-height: 1.35;
    max-width: 260px;
  }

  .menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: max(24px, env(safe-area-inset-bottom));
    transform: none;
    width: 100%;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 10px;
    column-gap: 14px;
    list-style: none;
  }
  .menu a {
    font-size: 10px;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .page-label { top: 22px; right: 20px; font-size: 9px; }

  .flecha-back {
    top: max(14px, env(safe-area-inset-top));
    left: max(14px, env(safe-area-inset-left));
    width: 44px; height: 44px;
    font-size: 1.25rem;
  }

  .grid-videos {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }
  .tile {
    min-height: 50vh;
    opacity: 1 !important;
  }
  .tile-line  { width: 60px; }
  .tile-meta  { opacity: 1; transform: none; }

  html, body { overflow-y: auto; overflow-x: hidden; }
  body { -webkit-overflow-scrolling: touch; }
}

@media (min-width: 700px) and (max-width: 900px) {
  .mobile-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- 15. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .tile { opacity: 1 !important; }
}

/* ---------- 16. Intro util ---------- */
.is-intro { opacity: 0; transform: translateY(14px); filter: blur(8px); }

/* ==========================================================
   EXOT MOBILE DOME — adapted from DomeGallery idea
   Full-screen 3D dome on normal phones; flat fallback only on reduced/very low-end.
   ========================================================== */

:root {
  --font-family: "Geist", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --color-accent: #ffffff;
  --ease-clean: cubic-bezier(.22, 1, .36, 1);
  --ease-clean-soft: cubic-bezier(.16, 1, .3, 1);
}

body {
  font-family: var(--font-family) !important;
  font-weight: 400;
  font-synthesis-weight: none;
}

/* Remove noisy / old UI feeling */
.noise { display: none !important; }

.flecha-back {
  background: rgba(255,255,255,.055) !important;
  border-color: rgba(255,255,255,.14) !important;
  box-shadow: none !important;
}

.flecha-back:hover,
.flecha-back:focus-visible,
.flecha-back.hand-hover {
  background: #fff !important;
  border-color: #fff !important;
  color: #000 !important;
  transform: scale(1.04);
  box-shadow: 0 12px 34px rgba(255,255,255,.08) !important;
}

.brand .name,
.tile-title {
  font-weight: 500 !important;
  letter-spacing: -0.035em;
}

.brand .role,
.menu a,
.page-label,
.hand-head,
.drag-hint,
.description-copy {
  font-weight: 500 !important;
}

/* Normal desktop sphere gets a cleaner treatment too */
.sphere-root {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.028), rgba(255,255,255,0) 36%),
    #000;
}

.sphere-root .item__card {
  border-radius: 14px;
  box-shadow: 0 20px 54px rgba(0,0,0,.30);
}

.sphere-root .item__media {
  filter: grayscale(.68) brightness(.86) contrast(1.02);
}

.sphere-root .item__card:hover .item__media,
.sphere-root .item__card:focus-visible .item__media,
.sphere-root .item.active .item__media,
.sphere-root .item__card.hand-hover .item__media {
  filter: grayscale(0) brightness(1) contrast(1.03);
  transform: scale(1.018);
}

/* Mobile dome mode: real 3D sphere, not the stacked mobile list */
@media (max-width: 900px), (pointer: coarse) {
  html:has(body.sphere-dome-mobile),
  body.sphere-dome-mobile {
    width: 100%;
    height: 100%;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    background: #000 !important;
  }

  body.sphere-dome-mobile {
    position: fixed !important;
    inset: 0 !important;
    touch-action: none !important;
  }

  body.sphere-dome-mobile .sphere-root {
    --tile-radius: clamp(16px, 4.8vw, 28px);
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100svh !important;
    min-height: 100svh !important;
    overflow: hidden !important;
    background:
      radial-gradient(ellipse 92% 76% at 50% 50%, rgba(255,255,255,.045), rgba(255,255,255,0) 45%),
      #000 !important;
  }

  body.sphere-dome-mobile .sphere-main {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100svh !important;
    overflow: hidden !important;
  }

  body.sphere-dome-mobile .stage {
    display: flex !important;
    position: absolute !important;
    inset: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    perspective: clamp(850px, 185vw, 1280px) !important;
    perspective-origin: 50% 50% !important;
    touch-action: none !important;
  }

  body.sphere-dome-mobile .sphere {
    transform-style: preserve-3d !important;
    will-change: transform !important;
  }

  body.sphere-dome-mobile .item__card {
    border-radius: var(--tile-radius) !important;
    background: #070707 !important;
    box-shadow:
      0 18px 46px rgba(0,0,0,.42),
      0 0 0 1px rgba(255,255,255,.045) !important;
    transform: translate(-50%, -50%) scale(var(--tile-scale, 1)) !important;
    overflow: hidden !important;
  }

  body.sphere-dome-mobile .item__media {
    filter: grayscale(.22) brightness(.9) contrast(1.04) saturate(.95) !important;
    object-fit: cover !important;
    background: #070707 !important;
  }

  body.sphere-dome-mobile .item.active .item__media,
  body.sphere-dome-mobile .item__card:hover .item__media,
  body.sphere-dome-mobile .item__card.hand-hover .item__media {
    filter: grayscale(0) brightness(1) contrast(1.04) saturate(1) !important;
    transform: scale(1.012) !important;
  }

  body.sphere-dome-mobile .dome-vignette {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 10 !important;
    pointer-events: none !important;
    background: radial-gradient(ellipse 84% 72% at 50% 50%,
      transparent 30%,
      rgba(0,0,0,.04) 50%,
      rgba(0,0,0,.48) 82%,
      rgba(0,0,0,.94) 100%) !important;
  }

  body.sphere-dome-mobile .edge-top,
  body.sphere-dome-mobile .edge-bottom {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    pointer-events: none !important;
    z-index: 11 !important;
    height: 128px !important;
  }

  body.sphere-dome-mobile .edge-top {
    top: 0 !important;
    background: linear-gradient(to bottom, rgba(0,0,0,.98), rgba(0,0,0,.52), transparent) !important;
  }

  body.sphere-dome-mobile .edge-bottom {
    bottom: 0 !important;
    background: linear-gradient(to top, rgba(0,0,0,.98), rgba(0,0,0,.48), transparent) !important;
  }

  body.sphere-dome-mobile .page-label {
    position: fixed !important;
    top: max(26px, env(safe-area-inset-top)) !important;
    right: 20px !important;
    z-index: 60 !important;
    max-width: calc(100vw - 102px) !important;
    text-align: right !important;
    font-size: 8.6px !important;
    letter-spacing: .22em !important;
    line-height: 1.25 !important;
    color: rgba(255,255,255,.84) !important;
  }

  body.sphere-dome-mobile .flecha-back {
    position: fixed !important;
    top: max(20px, env(safe-area-inset-top)) !important;
    left: max(18px, env(safe-area-inset-left)) !important;
    z-index: 60 !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
  }

  body.sphere-dome-mobile .drag-hint {
    display: block !important;
    position: fixed !important;
    left: 50% !important;
    bottom: max(26px, env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%) !important;
    z-index: 42 !important;
    font-size: 0 !important;
    letter-spacing: .22em !important;
    color: rgba(255,255,255,.30) !important;
    pointer-events: none !important;
  }

  body.sphere-dome-mobile .drag-hint::before {
    content: "swipe sideways";
    font-size: 8px;
    text-transform: uppercase;
  }

  body.sphere-dome-mobile .description-copy {
    display: none !important;
  }

  body.sphere-dome-mobile .viewer {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100 !important;
  }

  body.sphere-dome-mobile .scrim.active {
    background: rgba(0,0,0,.88) !important;
  }

  body.sphere-dome-mobile .enlarge,
  body.sphere-dome-mobile .enlarge-closing {
    border-radius: 14px !important;
    box-shadow: 0 28px 80px rgba(0,0,0,.72) !important;
  }

  body.sphere-dome-mobile .close-btn {
    top: max(18px, env(safe-area-inset-top)) !important;
    right: 18px !important;
    width: 42px !important;
    height: 42px !important;
    z-index: 120 !important;
  }
}

/* Only the very low-end fallback stays as a flat gallery. Make it acceptable. */
body.sphere-mobile .mobile-gallery {
  width: min(920px, calc(100vw - 28px));
  margin: 0 auto;
  padding: max(92px, calc(env(safe-area-inset-top) + 78px)) 0 92px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.sphere-mobile .mobile-card {
  border-radius: 10px;
  aspect-ratio: 3 / 4;
  background: #070707;
  box-shadow:
    0 12px 34px rgba(0,0,0,.40),
    0 0 0 1px rgba(255,255,255,.055);
}

body.sphere-mobile .mobile-card__media,
body.sphere-mobile .mobile-card > .item__media,
body.sphere-mobile .sphere-root .mobile-card .item__media {
  filter: brightness(.94) contrast(1.02) !important;
  object-fit: cover;
  width: 100%;
  height: 100%;
  background: #070707;
}

@media (max-width: 380px) {
  body.sphere-dome-mobile .item__card {
    border-radius: 16px !important;
  }

  body.sphere-dome-mobile .drag-hint {
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cursor { display: none !important; }
}

/* ==========================================================
   EXOT MOBILE DOME SIZE PATCH
   Bigger mobile tiles, closer crop, less empty space.
   ========================================================== */

@media (max-width: 900px), (pointer: coarse) {
  body.sphere-dome-mobile .sphere-root {
    --tile-radius: clamp(18px, 5.2vw, 30px);
  }

  body.sphere-dome-mobile .stage {
    perspective: clamp(900px, 195vw, 1360px) !important;
  }

  body.sphere-dome-mobile .item__card {
    border-radius: var(--tile-radius) !important;
    box-shadow:
      0 22px 56px rgba(0,0,0,.46),
      0 0 0 1px rgba(255,255,255,.05) !important;
  }

  body.sphere-dome-mobile .item__media {
    filter: grayscale(.18) brightness(.92) contrast(1.04) saturate(.96) !important;
  }

  body.sphere-dome-mobile .edge-top {
    height: 104px !important;
  }

  body.sphere-dome-mobile .edge-bottom {
    height: 92px !important;
  }

  body.sphere-dome-mobile .drag-hint {
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
  }
}

/* ==========================================================
   EXOT MOBILE DOME OVERLAP FIX
   Balanced size + more row separation.
   ========================================================== */

@media (max-width: 900px), (pointer: coarse) {
  body.sphere-dome-mobile .sphere-root {
    --tile-radius: clamp(16px, 4.6vw, 26px);
  }

  body.sphere-dome-mobile .item__card {
    border-radius: var(--tile-radius) !important;
    transform: translate(-50%, -50%) scale(min(var(--tile-scale, 1), 1.04)) !important;
  }

  body.sphere-dome-mobile .item__media {
    filter: grayscale(.18) brightness(.92) contrast(1.04) saturate(.96) !important;
  }

  body.sphere-dome-mobile .edge-top {
    height: 112px !important;
  }

  body.sphere-dome-mobile .edge-bottom {
    height: 104px !important;
  }
}

@media (max-width: 390px) {
  body.sphere-dome-mobile .item__card {
    transform: translate(-50%, -50%) scale(min(var(--tile-scale, 1), 1.02)) !important;
  }
}

/* ==========================================================
   EXOT MOBILE DOME BALANCED 2-ROW PATCH
   Keeps original-looking card format and equal spacing.
   ========================================================== */

@media (max-width: 900px), (pointer: coarse) {
  body.sphere-dome-mobile .sphere-root {
    --tile-radius: clamp(16px, 4.2vw, 24px);
  }

  body.sphere-dome-mobile .stage {
    perspective: clamp(920px, 205vw, 1420px) !important;
  }

  body.sphere-dome-mobile .item__card {
    border-radius: var(--tile-radius) !important;
    transform: translate(-50%, -50%) scale(min(var(--tile-scale, 1), 1.02)) !important;
    box-shadow:
      0 20px 48px rgba(0,0,0,.44),
      0 0 0 1px rgba(255,255,255,.045) !important;
  }

  body.sphere-dome-mobile .item__media {
    object-fit: cover !important;
    filter: grayscale(.18) brightness(.92) contrast(1.04) saturate(.96) !important;
  }

  body.sphere-dome-mobile .edge-top {
    height: 110px !important;
  }

  body.sphere-dome-mobile .edge-bottom {
    height: 98px !important;
  }

  body.sphere-dome-mobile .drag-hint {
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 390px) {
  body.sphere-dome-mobile .item__card {
    transform: translate(-50%, -50%) scale(min(var(--tile-scale, 1), 1)) !important;
  }
}
