/* Guía de campo "What's real?" (js/guide.js) y recorrido de primera visita (js/tutorial.js). */

/* ---------- Guía: cajón a la derecha; pantalla completa en móvil ---------- */
html.fg-open { overflow: hidden; }
#fg {
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0;
  width: min(560px, 100vw); max-width: 100vw; height: 100%; max-height: 100dvh;
  background: var(--bg); color: var(--ink); border: 0; border-left: 1px solid var(--rule-strong);
}
#fg::backdrop { background: rgb(11 11 12 / 0.72); }
#fg .fg-in { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: var(--s-5) var(--s-6) var(--s-8); }
#fg .fg-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-2); }
#fg .fg-x { min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer; font-size: var(--fs-small); color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 0.3em; }
#fg .fg-x:hover { color: var(--ink); text-decoration-color: var(--ink); }
#fg h2 { line-height: 1.2; font-weight: 400; font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem); }
#fg .fg-lead { margin-top: var(--s-3); font-size: var(--fs-small); }
#fg .fg-list { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-6); }
#fg .fg-card { display: grid; gap: var(--s-2); padding-top: var(--s-5); border-top: 1px solid var(--rule); }
#fg .fg-fig { margin: 0 0 var(--s-2); }
#fg .fg-imgs { display: grid; gap: var(--s-3); }
#fg .fg-imgs.fg-n1 { grid-template-columns: minmax(0, 260px); }
#fg .fg-imgs.fg-n2 { grid-template-columns: repeat(2, minmax(0, 200px)); }
#fg .fg-img { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--rule); background: var(--surface); }
#fg .fg-z { position: absolute; inset: 0; }
#fg .fg-img.is-crop .fg-z { transform: scale(2); }
#fg .fg-img img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
#fg .fg-img svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#fg .fg-img circle { fill: none; stroke: var(--ink); stroke-width: 1px; vector-effect: non-scaling-stroke; }
#fg figcaption { margin-top: var(--s-2); letter-spacing: 0.02em; text-transform: none; }
#fg .fg-sk { gap: var(--s-2); }
#fg .fg-skimg { width: min(260px, 100%); aspect-ratio: 1; }
#fg .fg-v { color: var(--ink-3); }
#fg .fg-v.is-real { color: var(--accent); }
#fg h3 { font-size: var(--fs-h3); line-height: 1.25; }
#fg .fg-t { font-size: var(--fs-small); line-height: 1.55; }
#fg .fg-go { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-small); color: var(--ink-2); }
#fg .fg-go:hover { color: var(--ink); }
#fg .fg-px { display: block; width: min(320px, 100%); height: auto; }
#fg .fg-px text { font-family: var(--font-mono); font-size: 8px; fill: var(--ink-3); }
#fg .fg-px .o { fill: none; stroke: var(--rule-strong); stroke-width: 1px; }
#fg .fg-px .sky { stroke: var(--rule-strong); stroke-width: 1px; stroke-dasharray: 2 3; }
#fg .fg-px .l { stroke: var(--ink-3); stroke-width: 1px; stroke-dasharray: 3 3; }
#fg .fg-px .s { fill: var(--ink-2); }
#fg .fg-px .e { fill: var(--ink-2); }
#fg .fg-px .p { fill: var(--ink); }
#fg .fg-px .c { fill: none; stroke: var(--ink); stroke-width: 1px; }
@media (max-width: 600px) {
  #fg { width: 100vw; border-left: 0; }
  #fg .fg-in { padding: var(--s-3) var(--s-4) var(--s-7); }
}
@media (prefers-reduced-motion: no-preference) {
  #fg[open] { animation: fg-in var(--t-fast) var(--ease-out); }
  @keyframes fg-in { from { transform: translateX(24px); opacity: 0; } }
}

/* ---------- Recorrido: tarjeta junto al elemento y marco de 1px alrededor. No bloquea la página. ---------- */
.tut-root[hidden] { display: none; }
.tut-hl { position: fixed; z-index: 60; pointer-events: none; border: 1px solid var(--accent); }
.tut-hl[hidden] { display: none; }
.tut {
  position: fixed; z-index: 61; left: 16px; top: 16px; width: min(300px, calc(100vw - 32px));
  display: grid; gap: var(--s-2); padding: var(--s-4); background: var(--bg); border: 1px solid var(--rule-strong);
}
.tut:focus { outline: none; }
.tut:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.tut .tut-t { color: var(--ink); font-size: var(--fs-body); line-height: 1.45; }
.tut .tut-w { font-size: var(--fs-label); color: var(--ink-3); }
.tut .tut-w:empty { display: none; }
.tut .tut-b { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); margin-top: var(--s-1); }
.tut .tut-b span { display: flex; gap: var(--s-4); }
.tut button { min-height: 44px; min-width: 44px; padding: 0; background: none; border: 0; cursor: pointer; font-size: var(--fs-small); color: var(--ink-2); }
.tut button:hover { color: var(--ink); }
.tut button[data-a="next"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink); text-underline-offset: 0.3em; }
.tut button[data-a="skip"] { color: var(--ink-3); }
.tut button[hidden] { display: none; }
@media (max-width: 760px) {
  .tut { left: 0; right: 0; top: auto; bottom: 0; width: auto; border-width: 1px 0 0; padding: var(--s-3) var(--s-4) max(var(--s-3), env(safe-area-inset-bottom)); }
}
