/* Realm landing viewer — V4 geometry, V5 honest data.
   Information lives in the top and bottom bars.
   The field is the realm identity. */
.realm-viewer {
  min-height: 100dvh;
  background: #050506;
  color: var(--text);
  overflow-x: hidden;
}
.viewer-bed {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--realm, #c9a227) 22%, transparent), transparent 58%),
    radial-gradient(circle at 50% 100%, #0c0c10, #050506 68%);
}
.viewer-bed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .38;
  filter: saturate(1.08) contrast(1.06);
}
@media (prefers-reduced-motion: no-preference) {
  .viewer-bed img { animation: portal-breathe 18s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .viewer-bed img { animation: none; opacity: .34; }
}
.viewer-frame {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.viewer-top,
.viewer-bottom {
  flex: 0 0 auto;
  background: linear-gradient(to bottom, rgba(5,5,6,.88), rgba(5,5,6,.62));
  border-color: color-mix(in srgb, var(--realm, #c9a227) 42%, #2a2a32);
  backdrop-filter: blur(8px);
}
.viewer-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.1rem .7rem;
  border-bottom: 1px solid rgba(201,162,39,.28);
}
.viewer-top .brand {
  font-size: .72rem;
  letter-spacing: .16em;
}
.viewer-identity { text-align: center; }
.viewer-identity .eyebrow {
  margin: 0;
  color: var(--realm, var(--gold));
  font-size: .62rem;
}
.viewer-identity h1 {
  margin: .15rem 0 0;
  font-family: var(--font);
  font-weight: 500;
  font-size: clamp(1rem, 3.4vw, 1.35rem);
  letter-spacing: .08em;
}
.layer-chips { display: flex; gap: .35rem; }
.layer-chips button {
  border: 1px solid var(--border);
  background: rgba(10,10,12,.55);
  color: var(--text-muted);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .28rem .45rem;
  border-radius: 999px;
  cursor: pointer;
}
.layer-chips button.active.obs { border-color: var(--observable); color: #c9d6e8; }
.layer-chips button.active.att { border-color: var(--attributed); color: #d8cfc4; }
.layer-chips button.active.ours { border-color: var(--ours); color: #d4cce8; }
.viewer-stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem 1.1rem 1.5rem;
  min-height: 52dvh;
}
.realm-ring {
  width: min(11rem, 42vw);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--realm, #c9a227) 55%, transparent);
  box-shadow: 0 0 32px color-mix(in srgb, var(--realm, #c9a227) 28%, transparent);
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--realm, #c9a227) 35%, #0a0a0c), #050506 72%);
  margin-bottom: 1.1rem;
}
.status-pill {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--realm, var(--gold));
  margin: 0 0 .55rem;
}
.viewer-stage .lead { max-width: 28rem; margin: 0 auto 1.25rem; }
.viewer-bottom {
  border-top: 1px solid rgba(201,162,39,.28);
  padding: .85rem 1.1rem 1.15rem;
  background: linear-gradient(to top, rgba(5,5,6,.92), rgba(5,5,6,.7));
}
.viewer-copy h2 {
  margin: 0 0 .35rem;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.viewer-copy p { margin: 0; font-size: .92rem; max-width: 42rem; }
.viewer-copy .source-tag { margin-top: .35rem; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.realm-rail {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  padding: .15rem 0 .35rem;
  -webkit-overflow-scrolling: touch;
}
.realm-rail a {
  flex: 0 0 auto;
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .28rem .6rem;
}
.realm-rail a.here,
.realm-rail a:hover { color: var(--gold); border-color: var(--gold-dim); }
.legal-slim { margin-top: .7rem; font-size: .72rem; color: var(--text-muted); }
@media (max-width: 390px) {
  .viewer-top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .layer-chips { justify-content: center; }
  .viewer-stage { min-height: 46dvh; }
}
