:root { --home-gray: #D6D6D6; }
@font-face { font-family: 'Cardinal'; src: url('assets/fonts/Cardinal.ttf') format('truetype'); } html, body { margin: 0; background: #c9c7c2; min-height: 100vh; min-height: 100dvh; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ctext x='2' y='24' font-size='26' fill='%231C1C1A'%3E%E2%9A%9C%3C/text%3E%3C/svg%3E") 16 16, auto; } .house-wrap { position: relative; width: 100%; height: 100vh; height: 100svh; overflow: hidden; background-image: url('assets/casa/micasa-compu.jpg'); background-size: cover; background-position: 50% 50%; background-repeat: no-repeat; } a, .hotspot, .umbral, .pasillo-room { cursor: inherit; } .hotspot { position: absolute; display: block; z-index: 1; } .hotspot:hover { z-index: 5; } .hotspot-label { opacity: 0; transition: opacity 0.25s ease, background 0.15s, color 0.15s; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'Cardinal', serif; font-size: 2.6rem; color: #1C1C1A; background: #c9c7c2; padding: 0 12px; line-height: 1.1; border-radius: 0px; white-space: nowrap; pointer-events: none; } .hotspot:hover .hotspot-label { opacity: 1; background: #1C1C1A; color: #c9c7c2; } .hotspot[href="trabajo.html"] .hotspot-label { top: 35%; } .site-title { position: absolute; top: 5%; left: 6%; font-family: 'Cardinal', serif; font-size: 4.8rem; color: #1C1C1A; z-index: 5; margin: 0; } @media (max-width: 820px) {
  /* en celular usamos otra imagen de fondo (recortada distinto), con el
     mismo esquema de background-size:cover; las posiciones de hotspots,
     room-png y frase-deco las calcula el script al final del body (según
     el recorte real de cada pantalla), no van fijas acá */
  .house-wrap {
    height: 100vh;
    height: 100svh;
    background-image: url('assets/casa/micasa-celular.jpg');
    background-position: 43% 50%;
  }

  .room-png { display: block; }

  .hotspot.tap-active + .room-png {
    transform: translateY(-9%) scale(1.09);
    filter: drop-shadow(0 18px 22px rgba(20,18,15,0.4));
    animation: none;
  }

  .hotspot-label {
    font-size: 0.95rem;
    padding: 1px 7px;
  }

  /* el nombre se revela solo al tocar (misma idea que el hover de compu),
     no queda siempre prendido */
  .hotspot.tap-active .hotspot-label {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
    background: #1C1C1A;
    color: #c9c7c2;
  }
 }

.room-png {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  height: auto;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 0px 0px rgba(20,18,15,0));
  transition: transform 0.35s cubic-bezier(.2,.8,.3,1), filter 0.35s ease;
  animation: mc-invitar 1.7s ease-in-out 1 both;
}

.hotspot:hover + .room-png {
  transform: translateY(-9%) scale(1.09);
  filter: drop-shadow(0 18px 22px rgba(20,18,15,0.4));
  animation: none;
}

@keyframes mc-invitar {
  0%, 100% { transform: translateY(0) scale(1); }
  28% { transform: translateY(-6%) scale(1.035); }
  52% { transform: translateY(1%) scale(0.99); }
  74% { transform: translateY(-3%) scale(1.015); }
}

/* costura decorativa al costado — se va "cosiendo" de arriba hacia abajo */
.costura-deco {
  position: absolute;
  top: 0;
  right: 0;
  width: 24vw;
  max-width: 380px;
  height: auto;
  pointer-events: none;
  z-index: 6;
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(black, black);
  mask-image: linear-gradient(black, black);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: top;
  mask-position: top;
  -webkit-mask-size: 100% 0%;
  mask-size: 100% 0%;
  animation: costura-sutura 7s ease-in-out infinite;
}

@keyframes costura-sutura {
  0%   { -webkit-mask-size: 100% 0%;   mask-size: 100% 0%;   opacity: 0.85; }
  42%  { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; opacity: 0.85; }
  65%  { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; opacity: 0.85; }
  75%  { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; opacity: 0; }
  76%  { -webkit-mask-size: 100% 0%;   mask-size: 100% 0%;   opacity: 0; }
  100% { -webkit-mask-size: 100% 0%;   mask-size: 100% 0%;   opacity: 0.85; }
}

@media (max-width: 820px) {
  .costura-deco { width: 34vw; max-width: 190px; }
}

/* entrada discreta a la sala de juegos — texto chico, no un hotspot
   ilustrado, para no tener que dibujar un ícono nuevo para esto */
.juegos-link {
  position: fixed;
  bottom: 18px;
  right: 22px;
  z-index: 7;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: #1C1C1A;
  opacity: 0.55;
  text-decoration: none;
  cursor: inherit;
  transition: opacity 0.2s ease;
}
.juegos-link:hover { opacity: 1; }

@media (max-width: 820px) {
  .juegos-link { bottom: 12px; right: 12px; font-size: 0.66rem; }
}

/* frases escritas a mano, desparramadas por la pared — se van "dibujando"
   al entrar y después tiemblan suave como si la mano no estuviera del
   todo quieta */
.frase-deco {
  position: absolute;
  height: auto;
  pointer-events: none;
  z-index: 3;
  opacity: 0.85;
  transform-origin: 50% 50%;
  -webkit-mask-image: linear-gradient(black, black);
  mask-image: linear-gradient(black, black);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: top;
  mask-position: top;
  -webkit-mask-size: 100% 0%;
  mask-size: 100% 0%;
  animation: frase-dibujar 1.4s ease-out both, frase-tiembla 5s ease-in-out infinite;
}

@keyframes frase-dibujar {
  0%   { -webkit-mask-size: 100% 0%;   mask-size: 100% 0%; }
  100% { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
}

@keyframes frase-tiembla {
  0%, 100% { transform: rotate(-1deg) scale(1); }
  25%      { transform: rotate(0.6deg) scale(1.015); }
  50%      { transform: rotate(1.2deg) scale(0.99); }
  75%      { transform: rotate(-0.4deg) scale(1.01); }
}

@media (max-width: 820px) {
  .frase-deco { display: none; }
}

/* ---------- pasillo de habitaciones ---------- */
/* fila angosta con las puertas/ventanas de cada rincón de la casa —
   mismos íconos que ya se usan en los "umbrales" de cada habitación,
   acá dispuestos horizontales, chicos, sin caja ni fondo individual */
.pasillo-habitaciones {
  position: relative;
  z-index: 2;
  background: var(--home-gray);
  padding: 5vh 0 5.5vh 0;
}

.pasillo-row {
  display: flex;
  justify-content: center;
  gap: 52px;
  overflow-x: auto;
  padding: 0 6vw;
  scrollbar-width: thin;
}

.pasillo-room {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(.2,.8,.3,1);
}
.pasillo-room:hover { transform: scale(1.07); }

.pasillo-room img {
  height: 100px;
  width: auto;
  display: block;
  opacity: 0.8;
  filter: drop-shadow(0 8px 14px rgba(28,28,26,0.16));
  transition: opacity 0.35s ease;
}
.pasillo-room:hover img { opacity: 1; }

.pasillo-room-label {
  font-family: 'Cardinal', serif;
  font-size: 1rem;
  color: #1C1C1A;
  opacity: 0.85;
  text-shadow: 0 1px 2px rgba(255,255,255,0.35);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .pasillo-habitaciones { padding: 4vh 0 4.5vh 0; }
  .pasillo-row { gap: 30px; padding: 0 5vw; }
  .pasillo-room img { height: 68px; }
  .pasillo-room-label { font-size: 0.92rem; }
}

/* ---------- dejá tu foto ---------- */
.deja-tu-foto {
  position: relative;
  z-index: 2;
  background: var(--home-gray);
  min-height: 100vh;
  padding: 12vh 6vw 14vh 6vw;
}

/* costura que une el panel de la casa con el pasillo de habitaciones —
   se repite de punta a punta del ancho (la tira se corta justo y se
   repite si hace falta); siempre visible, sin animación */
.transicion-costura {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 34px;
  background-image: url('assets/tiralarga.png');
  background-repeat: repeat-x;
  background-position: left center;
  background-size: auto 100%;
  opacity: 0.8;
  pointer-events: none;
  z-index: 3;
}

@media (max-width: 720px) {
  .transicion-costura { height: 24px; }
}

.dtf-intro {
  text-align: center;
  max-width: 40ch;
  margin: 0 auto 7vh auto;
}

.dtf-title {
  font-family: 'Cardinal', serif;
  font-size: 2.3rem;
  color: #1C1C1A;
  opacity: 0.9;
}
.dtf-hint {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: #6b6b64;
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.dtf-collection {
  position: relative;
  width: 100%;
  max-width: 1100px;
  /* lienzo grande a propósito: mucho más alto que la cámara + las
     fotos actuales, con aire de sobra hacia abajo para que la
     distribución libre no quede apretada alrededor de la cámara y
     para dejar lugar a contenido futuro debajo de esta sección */
  min-height: 150vh;
  margin: 0 auto;
}

/* ventanas viejas — misma idea que CAMERA.EXE en sala de juegos:
   borde fino, barra de título oscura, sin sombras/gradientes modernos.
   cada una vive en una posición libre (--pos-x/--pos-y/--base-rotate/
   --pos-scale vienen de Supabase, compartidas entre visitantes) más
   un movimiento ambiental sutil y propio de cada foto (--float-*, solo
   visual, nunca se guarda — ver JS) */
.dtf-window {
  position: absolute;
  left: var(--pos-x, 0%);
  top: var(--pos-y, 0%);
  scale: var(--pos-scale, 1);
  transform-origin: top left;
  width: 230px;
  max-width: 78vw;
  background: #D4D2C8;
  border: 1px solid #1C1C1A;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.22);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  animation: dtf-float var(--float-dur, 11s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

@keyframes dtf-float {
  0%, 100% {
    translate: 0px 0px;
    rotate: var(--base-rotate, 0deg);
  }
  50% {
    translate: var(--float-dx, 0px) var(--float-dy, 0px);
    rotate: calc(var(--base-rotate, 0deg) + var(--float-drot, 0deg));
  }
}

/* la cámara tiene mucha más presencia que las fotitas guardadas: en PC
   un ancho fijo grande (el max-width:78vw heredado ya la protege en
   viewports angostos), en mobile un % del espacio —no vw, para no
   desbordar el padding lateral de la sección— */
@media (min-width: 721px) {
  .dtf-window.dtf-window--camera { width: 620px; }
}
@media (max-width: 720px) {
  /* especificidad de 2 clases a propósito: tiene que ganarle a la
     regla ".dtf-window { width: 78vw; }" de más abajo */
  .dtf-window.dtf-window--camera { width: 94%; max-width: 94%; }
}

.dtf-window.is-dragging {
  z-index: 15;
  animation-play-state: paused;
}

.dtf-window.is-remote-moving {
  transition: left 0.4s ease, top 0.4s ease;
}

.dtf-window .win-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1C1C1A;
  color: #D4D2C8;
  padding: 5px 6px 5px 8px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: move;
  -webkit-user-select: none;
  user-select: none;
}
.dtf-window .win-controls { display: flex; gap: 4px; flex-shrink: 0; }
.dtf-window .win-btn {
  width: 15px;
  height: 15px;
  padding: 0;
  background: #D4D2C8;
  color: #1C1C1A;
  border: 1px solid #1C1C1A;
  font-family: inherit;
  font-size: 0.68rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: inherit;
}

.dtf-window .win-body { padding: 10px; }

.dtf-cam-permission { text-align: center; font-size: 0.68rem; line-height: 1.6; color: #1C1C1A; }
.dtf-cam-permission button {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: #D4D2C8;
  border: 1px solid #1C1C1A;
  padding: 9px 6px;
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  cursor: inherit;
}
.dtf-cam-permission button:active { background: #bcbab0; }
.dtf-cam-note { font-size: 0.6rem; opacity: 0.65; margin-top: 10px; }

#dtfDisplay {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  border: 1px solid #1C1C1A;
  cursor: inherit;
  /* fijado también por CSS (camera-fx.js ya lo hace por JS): así el
     navegador nunca interpreta el primer tap como gesto de scroll,
     sin depender del timing de ejecución del script */
  touch-action: none;
}
#dtfDisplay[hidden] { display: none; }

.dtf-shutter {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: #D4D2C8;
  border: 1px solid #1C1C1A;
  padding: 10px 6px;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: inherit;
}
.dtf-shutter:active { background: #bcbab0; }
.dtf-shutter[hidden] { display: none; }

.dtf-caption {
  margin-top: 7px;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: #1C1C1A;
  opacity: 0.55;
  text-align: center;
}
.dtf-caption[hidden] { display: none; }

.dtf-photo-img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}

.dtf-storage-note {
  text-align: center;
  max-width: 46ch;
  margin: 6vh auto 0 auto;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.62rem;
  color: #6b6b64;
  opacity: 0.7;
  line-height: 1.6;
}
.dtf-storage-note[hidden] { display: none; }

/* confirmación de guardado — ventanita modal, misma estética */
.dtf-confirm {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20,18,15,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
}
.dtf-confirm[hidden] { display: none; }

.dtf-confirm-window {
  width: 260px;
  max-width: 86vw;
  background: #D4D2C8;
  border: 1px solid #1C1C1A;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

.dtf-preview-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #1C1C1A;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}

.dtf-name-input {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: #fff;
  border: 1px solid #1C1C1A;
  padding: 8px;
  font-family: inherit;
  font-size: 0.78rem;
  color: #1C1C1A;
  box-sizing: border-box;
}
.dtf-name-input:focus { outline: 2px solid #1C1C1A; outline-offset: 1px; }
.dtf-name-input:disabled { opacity: 0.6; }

.dtf-save-status {
  margin-top: 8px;
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  text-align: center;
  color: #1C1C1A;
  opacity: 0.75;
}
.dtf-save-status[data-error="true"] { color: #7a1f1f; opacity: 0.9; }
.dtf-save-status[hidden] { display: none; }

.dtf-confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.dtf-confirm-actions button {
  flex: 1;
  background: #D4D2C8;
  border: 1px solid #1C1C1A;
  padding: 10px 4px;
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  cursor: inherit;
}
.dtf-confirm-actions button:active { background: #bcbab0; }
.dtf-confirm-actions button:disabled { opacity: 0.55; cursor: default; }

@media (max-width: 720px) {
  .deja-tu-foto { padding: 9vh 6vw 12vh 6vw; }
  .dtf-title { font-size: 1.9rem; }
  .dtf-collection { min-height: 130vh; }
  /* % del espacio (no vw): "vw" es relativo a toda la pantalla, pero
     la posición de cada ventana es relativa al propio contenedor
     (que ya está inset por el padding lateral de la sección) — con
     vw, una foto cerca del borde derecho terminaba saliéndose de la
     pantalla */
  .dtf-window { width: 78%; }
}
