/* SpaceSick — The Ones We Barely Know.
   A separate full-screen field of every world we've found: thousands of dim
   placeholder points + the authored worlds as warm lights. Reuses the app's
   tokens. Loaded after css/search.css; adds only new selectors.

   GUARDRAIL: when closed the overlay is opacity:0 + visibility:hidden +
   pointer-events:none (and carries `inert` in markup) — it can never block
   clicks anywhere else in the app. */

/* ---------- the field overlay ---------- */
.unknown-field {
  position: fixed;
  inset: 0;
  z-index: 55; /* above search (47) / tours (48) / vessel intro (49); below the blackout veil (60) */
  background:
    radial-gradient(120% 90% at 50% 40%, #04070f 0%, #010208 62%, #000106 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  touch-action: manipulation;
  transition: opacity 1.1s ease, visibility 0s linear 1.1s;
}
.unknown-field.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 1.1s ease;
}

#unknown-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
}

/* ---------- header copy ---------- */
.uf-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(max(26px, env(safe-area-inset-top)) + 8px) 24px 40px;
  text-align: center;
  pointer-events: none; /* taps pass through to the field */
  background: linear-gradient(to bottom, rgba(1, 2, 8, 0.82), rgba(1, 2, 8, 0.45) 55%, rgba(1, 2, 8, 0) 100%);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 1.4s ease 0.5s, transform 1.4s ease 0.5s;
}
.unknown-field.open .uf-head { opacity: 1; transform: translateY(0); }

.uf-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.uf-lede {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(21px, 3.4vw, 30px);
  font-weight: 400;
  color: var(--text);
  text-wrap: balance;
}
.uf-hint {
  margin: 10px auto 0;
  max-width: 52ch;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-dim);
  text-wrap: pretty;
}
.uf-hint .uf-warm-word { color: rgba(255, 204, 150, 0.92); }

/* ---------- exit ---------- */
.uf-exit {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: 20px;
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--text-faint);
  background: rgba(6, 10, 22, 0.5);
  border: 1px solid rgba(120, 130, 180, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  transition: color 0.4s ease, border-color 0.4s ease;
}
.uf-exit:hover { color: var(--text-dim); border-color: rgba(160, 160, 200, 0.35); }

/* ---------- dim-world readout ---------- */
.uf-readout {
  position: absolute;
  left: 50%;
  bottom: calc(max(20px, env(safe-area-inset-bottom)) + 14px);
  transform: translateX(-50%) translateY(12px);
  width: min(360px, calc(100vw - 32px));
  padding: 18px 44px 18px 20px;
  background: rgba(8, 12, 26, 0.92);
  border: 1px solid rgba(120, 130, 180, 0.22);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 0.8, 0.35, 1);
}
.uf-readout.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.uf-r-designation {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}
.uf-r-facts {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.7;
  color: var(--text-dim);
}
.uf-r-honest {
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--text-faint);
}
.uf-readout-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
  color: var(--text-faint);
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.3s ease;
}
.uf-readout-close:hover { color: var(--text-dim); }

/* ---------- doorway: search panel empty state ---------- */
.uf-door {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  padding: 13px 14px;
  text-align: left;
  background: rgba(20, 26, 50, 0.28);
  border: 1px solid rgba(120, 130, 180, 0.16);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.uf-door:hover { background: rgba(28, 36, 66, 0.4); border-color: rgba(140, 150, 200, 0.28); }
.uf-door-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.uf-door-title {
  font-family: var(--serif);
  font-size: 16.5px;
  color: var(--text);
}
.uf-door-meta {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.uf-door-arrow {
  margin-left: auto;
  font-size: 14px;
  color: var(--text-faint);
  transition: transform 0.3s ease, color 0.3s ease;
}
.uf-door:hover .uf-door-arrow { transform: translateX(3px); color: var(--text-dim); }

/* ---------- doorway: end-of-tour line ---------- */
.uf-tour-door {
  display: block;
  margin: 18px auto 0;
  padding: 6px 4px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.35s ease;
}
.uf-tour-door:hover { color: var(--text-dim); }

/* ---------- small screens ---------- */
@media (max-width: 520px) {
  .uf-head { padding-left: 18px; padding-right: 18px; padding-bottom: 30px; }
  .uf-lede { font-size: 20px; }
  .uf-hint { font-size: 12px; max-width: 34ch; }
  .uf-exit { font-size: 10px; padding: 9px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .unknown-field, .uf-head, .uf-readout { transition: none; }
}
