/*
 * Whale Fall realm V96: cinematic, observer-portable HUD projections.
 * Decorative SVG/canvas-free artwork and animation, not a portal/runtime.
 * The owned physical World remains visible under both HUDs.
 */
.wf-realm-preview{
  position:fixed;inset:0;z-index:95;pointer-events:none;
  color:#f7f3e8;font:500 12px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif;
  isolation:isolate
}
.wf-realm-preview[hidden],.wf-realm-preview [hidden]{display:none!important}
.wf-realm-preview *,.wf-realm-preview *::before,.wf-realm-preview *::after{box-sizing:border-box}
.wf-realm-preview button,.wf-realm-preview select{
  font:inherit;cursor:pointer;pointer-events:auto;color:#f8f5ed
}
.wf-realm-preview button:focus-visible,.wf-realm-preview select:focus-visible{
  outline:2px solid #ffe3a1;outline-offset:3px
}
.wf-realm-scrim{
  position:fixed!important;inset:0!important;z-index:1!important;
  width:100vw!important;height:100dvh!important;margin:0!important;padding:0!important;
  background:radial-gradient(circle at 73% 24%,rgba(133,181,186,.13),transparent 42%),rgba(0,5,12,.56)!important;
  border:0!important;border-radius:0!important;backdrop-filter:blur(4px) saturate(.78);
  cursor:default!important;animation:wf-realm-scrim-arrive .38s ease both;
}
.wf-realm-scrim[data-scene="hell"]{
  background:radial-gradient(circle at 18% 80%,rgba(168,43,47,.2),transparent 42%),rgba(7,1,11,.66)!important
}
.wf-realm-card{
  --realm-glow:#b3d4dc;--realm-border:rgba(206,232,232,.82);
  --realm-text:#fbf5df;--realm-ink:rgba(7,23,37,.97);
  position:fixed;z-index:3;display:flex;flex-direction:column;isolation:isolate;
  width:min(250px,calc(100vw - 24px));height:112px;max-height:calc(100dvh - 104px);
  border-radius:19px;overflow:hidden;pointer-events:auto;
  border:1px solid var(--realm-border);background:var(--realm-ink);
  color:var(--realm-text);
  box-shadow:0 12px 40px rgba(0,0,0,.52),0 0 26px rgba(102,174,207,.16),
    inset 0 1px rgba(255,255,255,.36);
  transition:width .65s cubic-bezier(.18,.82,.23,1),
    height .65s cubic-bezier(.18,.82,.23,1),
    opacity .4s ease,transform .5s cubic-bezier(.12,.8,.25,1),
    border-radius .4s ease,box-shadow .4s ease,visibility .4s;
  transform-origin:top right;
  will-change:transform,opacity
}
.wf-realm-card[data-scene="heaven"]{
  --realm-glow:#f7e5ae;--realm-border:rgba(246,236,192,.87);
  --realm-ink:rgba(5,27,43,.97);
  box-shadow:0 13px 40px rgba(0,0,0,.53),0 0 28px rgba(158,206,207,.24),
    inset 0 1px rgba(255,255,255,.42)
}
.wf-realm-card[data-scene="hell"]{
  --realm-glow:#f06a49;--realm-border:rgba(222,98,101,.77);
  --realm-ink:rgba(14,5,21,.98);
  box-shadow:0 16px 45px rgba(0,0,0,.68),0 0 29px rgba(205,52,49,.21),
    inset 0 1px rgba(255,132,107,.27);
  transform-origin:bottom left
}
.wf-realm-card[data-dock="TOP_RIGHT"]{top:78px;right:14px}
.wf-realm-card[data-dock="BOTTOM_LEFT"]{bottom:20px;left:14px}
.wf-realm-card[data-state="PEEK"]{width:min(250px,calc(100vw - 24px));height:112px}
.wf-realm-card[data-state="DOCKED"]{
  width:min(337px,calc(100vw - 24px));height:min(405px,calc(100dvh - 112px));
  border-radius:22px
}
.wf-realm-card[data-state="EXPANDED"]{
  width:min(472px,calc(100vw - 24px));height:min(650px,calc(100dvh - 112px));
  border-radius:26px;box-shadow:0 25px 95px rgba(0,0,0,.85),
  0 0 65px color-mix(in srgb,var(--realm-glow) 34%,transparent);
}
.wf-realm-card[data-state="HIDDEN"]{
  opacity:0;visibility:hidden;pointer-events:none;
  transform:translate3d(0,-18px,0) scale(.72);
}
.wf-realm-card[data-state="HIDDEN"][data-scene="hell"]{
  transform:translate3d(-20px,22px,0) scale(.72)
}
.wf-realm-card[data-state="PEEK"]:hover{
  transform:translateY(-3px);
  box-shadow:0 19px 48px rgba(0,0,0,.66),
    0 0 33px color-mix(in srgb,var(--realm-glow) 36%,transparent)
}
.wf-realm-artwork{
  position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;
  overflow:hidden;pointer-events:none;background:#0b2031
}
.wf-realm-artwork::after{
  content:"";position:absolute;inset:0;z-index:3;
  background:linear-gradient(90deg,rgba(1,13,28,.69),transparent 66%),
    linear-gradient(0deg,rgba(0,13,25,.81),transparent 57%),
    linear-gradient(180deg,rgba(0,10,18,.27),transparent 60%)
}
.wf-realm-card[data-scene="hell"] .wf-realm-artwork{
  background:#0d0814
}
.wf-realm-card[data-scene="hell"] .wf-realm-artwork::after{
  background:linear-gradient(90deg,rgba(11,3,16,.72),transparent 76%),
    linear-gradient(0deg,rgba(9,3,14,.88),transparent 55%),
    linear-gradient(180deg,rgba(6,1,10,.34),transparent 61%)
}
.wf-realm-art-image{
  display:block;width:100%;height:100%;object-fit:cover;
  object-position:50% 52%;filter:saturate(1.1) contrast(1.07);
  transform:scale(1.025);transition:transform 1.3s cubic-bezier(.2,.8,.2,1)
}
.wf-realm-card[data-state="EXPANDED"] .wf-realm-art-image,
.wf-realm-card[data-state="DOCKED"] .wf-realm-art-image{
  transform:scale(1.08)
}
.wf-realm-card[data-state="EXPANDED"] .wf-realm-artwork{height:286px}
.wf-realm-card[data-state="DOCKED"] .wf-realm-artwork{height:199px}
.wf-realm-card[data-state="EXPANDED"] .wf-realm-art-image{object-position:50% 45%}
.wf-realm-card[data-state="PEEK"] .wf-realm-art-image{object-position:50% 49%}
.wf-realm-atmosphere{
  position:absolute;z-index:2;display:block;pointer-events:none;
  border-radius:50%;filter:blur(14px);mix-blend-mode:screen;
  will-change:transform
}
.wf-realm-card[data-scene="heaven"] .wf-realm-atmosphere{
  background:radial-gradient(ellipse,rgba(243,250,224,.31),rgba(187,235,230,.11) 47%,transparent 76%)
}
.wf-realm-card[data-scene="hell"] .wf-realm-atmosphere{
  background:radial-gradient(ellipse,rgba(255,111,66,.25),rgba(155,25,57,.14) 43%,transparent 75%);
  mix-blend-mode:screen
}
.wf-realm-atmosphere-0{width:70%;height:45%;left:-24%;top:23%;animation:wf-realm-cloud-a 12s ease-in-out infinite alternate}
.wf-realm-atmosphere-1{width:95%;height:39%;right:-36%;top:55%;animation:wf-realm-cloud-b 17s ease-in-out infinite alternate}
.wf-realm-atmosphere-2{width:57%;height:68%;right:20%;top:-34%;animation:wf-realm-cloud-c 14s ease-in-out infinite alternate}
.wf-realm-card[data-scene="hell"] .wf-realm-atmosphere-0{animation-duration:9s}
.wf-realm-card[data-scene="hell"] .wf-realm-atmosphere-1{animation-duration:13s}
.wf-realm-portal-halo{
  position:absolute;z-index:2;left:50%;top:35%;width:34%;height:37%;
  transform:translate(-50%,-50%) scale(.8);border:1px solid transparent;
  border-radius:50%;box-shadow:0 0 46px transparent;opacity:0;
  transition:opacity .5s ease
}
.wf-realm-card[data-state="EXPANDED"] .wf-realm-portal-halo{
  opacity:.8;border-color:rgba(235,249,222,.4);
  box-shadow:0 0 58px rgba(224,243,219,.25),inset 0 0 28px rgba(215,246,230,.17);
  animation:wf-realm-halo-pulse 5.8s ease-in-out infinite
}
.wf-realm-card[data-scene="hell"][data-state="EXPANDED"] .wf-realm-portal-halo{
  border-color:rgba(235,78,65,.4);
  box-shadow:0 0 58px rgba(225,64,51,.27),inset 0 0 30px rgba(222,71,52,.18)
}
.wf-realm-card-header{
  position:relative!important;z-index:6!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  gap:8px!important;flex:0 0 auto;min-height:66px;margin:0!important;
  padding:11px 12px 5px!important;border:0!important;background:transparent!important;
  color:inherit!important;box-shadow:none!important
}
.wf-realm-head-toggle{
  display:flex!important;align-items:center!important;gap:10px!important;
  min-width:0;flex:1 1 auto;text-align:left;
  padding:0!important;margin:0!important;border:0!important;
  border-radius:10px!important;background:transparent!important;
  color:#fff7e3!important;box-shadow:none!important;
}
.wf-realm-head-toggle:hover,.wf-realm-head-toggle:focus-visible{
  text-shadow:0 0 12px var(--realm-glow)
}
.wf-realm-crest{
  width:35px;height:35px;flex:0 0 35px;display:block;position:relative;overflow:hidden;
  border-radius:50%;border:1px solid rgba(249,240,196,.89);
  background:radial-gradient(circle at 30% 23%,#fffbe7 0%,#d6e7ef 23%,#769eb4 52%,#314c70 82%);
  box-shadow:0 0 0 3px rgba(241,239,216,.12),0 0 21px rgba(226,240,228,.58);
}
.wf-realm-crest::after{
  content:"";position:absolute;left:-9%;right:-9%;bottom:0;height:34%;
  border-radius:50%;background:rgba(251,253,237,.8);filter:blur(2px)
}
.wf-realm-card[data-scene="hell"] .wf-realm-crest{
  border-color:rgba(244,124,97,.89);
  background:radial-gradient(circle at 50% 72%,#ffb571 0%,#ff5227 28%,#8d263d 49%,#250e24 82%);
  box-shadow:0 0 0 3px rgba(250,108,80,.12),0 0 22px rgba(239,68,60,.55);
}
.wf-realm-card[data-scene="hell"] .wf-realm-crest::after{
  left:15%;right:15%;height:73%;bottom:0;
  clip-path:polygon(0 100%,21% 45%,44% 68%,65% 9%,100% 100%);
  background:#160819;filter:none;border-radius:0
}
.wf-realm-identity{display:grid;gap:1px;min-width:0}
.wf-realm-identity strong{
  display:block;font-family:Georgia,"Palatino Linotype",serif;
  font-size:19px;font-weight:600;line-height:1.1;letter-spacing:.025em;
  color:#fffbed;text-shadow:0 2px 12px rgba(0,0,0,.9),0 0 16px rgba(255,240,204,.34)
}
.wf-realm-identity-hint{
  color:#f8ebc4;font-size:8px;letter-spacing:.2em;
  white-space:nowrap;text-shadow:0 1px 8px #06121c
}
.wf-realm-card[data-scene="hell"] .wf-realm-identity-hint{color:#ffc3a4}
.wf-realm-state-label{
  padding:3px 6px;border-radius:100px;border:1px solid rgba(255,251,220,.35);
  color:#fff5db;white-space:nowrap;font-size:8px;letter-spacing:.11em;
  background:rgba(3,15,26,.45);text-shadow:0 1px 5px #000;
}
.wf-realm-vista-caption{
  position:absolute;z-index:4;left:14px;right:12px;bottom:10px;
  display:grid;gap:2px;text-shadow:0 2px 10px rgba(0,0,0,.88)
}
.wf-realm-vista-tag{font-size:9px;letter-spacing:.2em;color:#fff1c3;font-weight:780}
.wf-realm-vista-subtitle{font:italic 12px Georgia,serif;color:#e8e9dd}
.wf-realm-card[data-scene="hell"] .wf-realm-vista-tag{color:#ffa184}
.wf-realm-card[data-state="EXPANDED"] .wf-realm-vista-caption,
.wf-realm-card[data-state="DOCKED"] .wf-realm-vista-caption{
  bottom:20px
}
.wf-realm-card[data-state="PEEK"] .wf-realm-vista-subtitle{display:none}
.wf-realm-card-body{
  position:relative;z-index:5;flex:1;min-height:0;
  overflow:auto;overscroll-behavior:contain;
  margin-top:68px;padding:15px 16px 19px;
  background:linear-gradient(160deg,rgba(13,31,42,.96),rgba(5,16,29,.98));
  border-top:1px solid rgba(250,237,204,.25);
  scrollbar-width:thin;scrollbar-color:rgba(186,207,205,.6) transparent;
  animation:wf-realm-body-in .5s cubic-bezier(.25,.8,.3,1) both
}
.wf-realm-card[data-state="EXPANDED"] .wf-realm-card-body{margin-top:180px}
.wf-realm-card[data-scene="hell"] .wf-realm-card-body{
  background:linear-gradient(155deg,rgba(31,11,28,.97),rgba(8,6,17,.99));
  border-top-color:rgba(239,102,90,.34)
}
.wf-realm-card-body p{margin:6px 0 10px}
.wf-realm-summary{font-size:12px;line-height:1.55;color:#e2e8e5}
.wf-realm-section-title{
  margin:14px 0 7px;font-size:9px;line-height:1.35;
  letter-spacing:.17em;font-weight:750;color:#ead9b7
}
.wf-realm-preview-controls{
  position:static;inset:auto;display:grid;gap:7px;
  margin:8px 0 13px;padding:10px 12px;
  background:rgba(217,227,220,.07);border:1px solid rgba(255,252,222,.15);
  border-radius:12px;box-shadow:none;pointer-events:auto;
}
.wf-realm-preview-label{font-size:9px;letter-spacing:.13em;color:#e8d9ad;font-weight:750}
.wf-realm-preview-lens{
  width:100%;padding:7px 9px;border:1px solid rgba(225,225,205,.36);
  border-radius:8px;background:#132d3a;color:#f5f7e8;
}
.wf-realm-workspaces{
  list-style:none;margin:0 0 12px;padding:0;display:grid;gap:6px
}
.wf-realm-workspaces li{
  display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 8px;align-items:center;
  margin:0;padding:9px 10px;color:#f0f4ee;
  background:linear-gradient(90deg,rgba(240,234,199,.13),rgba(138,190,188,.05));
  border:1px solid rgba(239,222,181,.19);border-radius:10px;
  font-size:11px;font-weight:700
}
.wf-realm-placement{font-size:8px;letter-spacing:.03em;font-weight:500;color:#c6dbd6}
.wf-realm-unknown,.wf-realm-unmapped{
  font-size:10px;color:#bdc6c9;line-height:1.4
}
.wf-realm-entry-hold{
  padding:10px 0 2px;margin:9px 0 6px!important;
  color:#dbc79f;border-top:1px solid rgba(235,221,188,.17);font-size:10px
}
.wf-realm-card[data-scene="hell"] .wf-realm-entry-hold{color:#e6a997}
.wf-realm-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px}
.wf-realm-actions button{
  padding:7px 10px!important;border-radius:9px!important;
  background:rgba(212,236,232,.1)!important;
  border:1px solid rgba(206,233,225,.28)!important;
  color:#f1f2e9!important;box-shadow:none!important;
  transition:background .2s ease,transform .2s ease
}
.wf-realm-actions button:hover{background:rgba(229,241,218,.23)!important;transform:translateY(-2px)}
.wf-realm-card[data-scene="hell"] .wf-realm-actions button{
  border-color:rgba(249,126,102,.29)!important;background:rgba(240,75,55,.09)!important
}
.wf-realm-launcher{
  position:fixed!important;z-index:3!important;display:flex;gap:8px;align-items:center;
  font-family:Georgia,serif!important;font-weight:700!important;letter-spacing:.04em;
  padding:10px 15px!important;border-radius:14px!important;
  background:linear-gradient(120deg,#16384b,#071a2b)!important;
  border:1px solid #cce8da!important;box-shadow:0 10px 33px rgba(0,0,0,.62),
  0 0 28px rgba(144,217,206,.19)!important;
  animation:wf-realm-launch-in .45s cubic-bezier(.2,.8,.2,1) both
}
.wf-realm-launcher[data-dock="TOP_RIGHT"]{top:78px;right:14px}
.wf-realm-launcher[data-dock="BOTTOM_LEFT"]{
  bottom:20px;left:14px;border-color:#cb716d!important;
  background:linear-gradient(120deg,#461729,#110714)!important;
  box-shadow:0 10px 35px rgba(0,0,0,.71),0 0 28px rgba(213,64,64,.24)!important
}
.wf-realm-preview-notice{display:none!important}
.wf-realm-vista-opening{animation:wf-realm-vista-unfurl .67s cubic-bezier(.18,.79,.2,1.06) both}
@keyframes wf-realm-vista-unfurl{
  0%{filter:brightness(1.5) saturate(1.4);transform:scale(.92)}
  45%{filter:brightness(1.36) saturate(1.25);transform:scale(1.018)}
  100%{filter:brightness(1) saturate(1);transform:scale(1)}
}
@keyframes wf-realm-body-in{
  from{opacity:0;transform:translateY(22px);filter:blur(8px)}
  to{opacity:1;transform:translateY(0);filter:blur(0)}
}
@keyframes wf-realm-scrim-arrive{from{opacity:0}to{opacity:1}}
@keyframes wf-realm-launch-in{
  from{opacity:0;transform:scale(.7) translateY(-16px)}
  to{opacity:1;transform:scale(1) translateY(0)}
}
@keyframes wf-realm-cloud-a{
  from{transform:translate3d(-8%,3%,0) scale(.85);opacity:.55}
  to{transform:translate3d(34%,-4%,0) scale(1.21);opacity:.82}
}
@keyframes wf-realm-cloud-b{
  from{transform:translate3d(17%,6%,0) scale(.8);opacity:.38}
  to{transform:translate3d(-24%,-5%,0) scale(1.1);opacity:.7}
}
@keyframes wf-realm-cloud-c{
  from{transform:translate3d(10%,-8%,0);opacity:.35}
  to{transform:translate3d(-17%,17%,0);opacity:.65}
}
@keyframes wf-realm-halo-pulse{
  0%,100%{transform:translate(-50%,-50%) scale(.82);opacity:.25}
  50%{transform:translate(-50%,-50%) scale(1.08);opacity:.78}
}
@media(max-width:760px){
  .wf-realm-card[data-dock="TOP_RIGHT"],.wf-realm-launcher[data-dock="TOP_RIGHT"]{
    top:73px;right:8px
  }
  .wf-realm-card[data-dock="BOTTOM_LEFT"],.wf-realm-launcher[data-dock="BOTTOM_LEFT"]{
    bottom:17px;left:8px
  }
  .wf-realm-card[data-state="PEEK"]{width:min(198px,calc(100vw - 18px));height:98px}
  .wf-realm-card[data-state="DOCKED"]{width:min(290px,calc(100vw - 18px));height:min(362px,calc(100dvh - 98px))}
  .wf-realm-card[data-state="EXPANDED"]{
    width:min(355px,calc(100vw - 16px));height:min(548px,calc(100dvh - 97px));
    border-radius:22px
  }
  .wf-realm-card-header{padding:9px 10px 4px!important;min-height:57px}
  .wf-realm-crest{width:31px;height:31px;flex-basis:31px}
  .wf-realm-identity strong{font-size:16px}
  .wf-realm-identity-hint{font-size:7px}
  .wf-realm-state-label{font-size:7px;padding:3px 4px}
  .wf-realm-vista-caption{left:11px;bottom:8px}
  .wf-realm-vista-tag{font-size:7.5px}
  .wf-realm-card[data-state="DOCKED"] .wf-realm-card-body{margin-top:48px}
  .wf-realm-card[data-state="EXPANDED"] .wf-realm-card-body{margin-top:140px}
  .wf-realm-card[data-state="EXPANDED"] .wf-realm-artwork{height:250px}
}
@media(max-height:540px){
  .wf-realm-card[data-dock="TOP_RIGHT"],.wf-realm-launcher[data-dock="TOP_RIGHT"]{top:50px}
  .wf-realm-card[data-state="EXPANDED"] .wf-realm-card-body{margin-top:70px}
  .wf-realm-card[data-state="EXPANDED"] .wf-realm-artwork{height:180px}
}
@media(prefers-reduced-motion:reduce){
  .wf-realm-preview *,.wf-realm-preview *::before,.wf-realm-preview *::after{
    animation:none!important;transition:none!important;filter:none!important;
    scroll-behavior:auto!important;will-change:auto!important
  }
  .wf-realm-card[data-state="HIDDEN"]{visibility:hidden!important;pointer-events:none!important}
}
