@import "./craft-glow.css";

#game-window > .page[data-location="astervin"] {
  min-height: 0;
  padding: 0;
  gap: 0;
  background: transparent;
}

[data-location="astervin"] .astervin-map {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  container-type: size;
  margin: 0;
}
[data-location="astervin"] .astervin-stage {
  position: relative;
  isolation: isolate;
  width: min(100cqw, calc(100cqh * var(--map-ratio)));
  aspect-ratio: var(--map-ratio);
  container-type: inline-size;
}
[data-location="astervin"] .astervin-background {
  display:block;
  width:100%;
  height:100%;
  object-fit:fill;
}
[data-location="astervin"] .astervin-label[hidden] {
  display: none;
}
body.trail-frame [data-location="astervin"] .astervin-zone {
  position: absolute;
  padding: 0;
  cursor: pointer;
  background: none !important;
  border: 0 !important;
  border-image: none !important;
  transform: none !important;
}
[data-location="astervin"] .astervin-label {
  position: absolute;
  inset: auto auto 3% 50%;
  transform: translateX(-50%);
  z-index: 20;
  pointer-events: none;
  max-width: 90%;
  padding: 5px 12px;
  border: 1px solid #6b8490;
  background: #182227;
  color: #e6ecee;
  font-size: 14px;
  text-align: center;
}
body.trail-frame [data-location="astervin"] .astervin-zone:focus-visible {
  outline: 0;
}

[data-location="astervin"] .astervin-background {
  mask: url("/game/frame/atlas/camp-edge-ford-style.svg") center / 100% 100% no-repeat;
}

[data-location="astervin"] .astervin-city-marker {
  position:absolute;left:var(--marker-x);top:var(--marker-y);z-index:2;
  transform:translate(-50%,-50%);box-sizing:border-box;max-width:22%;padding:.12em .36em;text-align:center;
  overflow-wrap:anywhere;
  background:#20252bec;color:#ebe6da;text-shadow:0 1px 2px #171719;
  border-radius:2px;font:600 clamp(6px,1.85cqw,17px)/1.12 Georgia,serif;pointer-events:none;
}
[data-location="astervin"] .astervin-city-marker.astervin-castle-marker {
  color:#bab9c1;background:#242830f0;border:1px solid #89889488;
  max-width:16%;font-size:clamp(6px,1.65cqw,15px);
}
[data-location="astervin"] .astervin-city-marker.astervin-exit-sign {
  max-width:12%;padding:0 .45em 0 0;color:#f6e3b1;background:transparent;
  text-shadow:0 1px 2px #382319;white-space:nowrap;
  font-size:clamp(6px,1.18cqw,12px);
}
[data-location="astervin"] .astervin-scene-tree {position:absolute;z-index:1;left:var(--tree-x);top:var(--tree-y);
  width:var(--tree-width);transform:translate(-50%,-97%);pointer-events:none;}
[data-location="astervin"] .astervin-scene-tree::before {
  content:"";position:absolute;z-index:0;left:50%;bottom:1.3%;width:31%;height:3.6%;
  transform:translateX(-50%);background:radial-gradient(ellipse,#2a211b70 0%,#30251c31 45%,transparent 73%);
}
[data-location="astervin"] .astervin-tree-painting {position:relative;z-index:1;}
[data-location="astervin"] .astervin-scene-tree > img {display:block;width:100%;height:auto;margin:0;}
[data-location="astervin"] .astervin-scene-tree > img.astervin-tree-ornaments,
[data-location="astervin"] .astervin-tree-lights {position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}
[data-location="astervin"] .astervin-tree-lights {z-index:3;}
[data-location="astervin"] .astervin-scene-tree > img.astervin-tree-ornaments {z-index:2;}
[data-location="astervin"] .astervin-scene-tree [hidden],[data-location="astervin"] .astervin-scene-tree[hidden] {display:none!important;}
[data-location="astervin"] .astervin-tree-lights > i {
  position:absolute;left:var(--lamp-x);top:var(--lamp-y);width:clamp(1px,2.35%,5px);
  aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;
  color:#f4c279;background:currentColor;box-shadow:0 0 .28em currentColor;
  animation:astervin-lamp 3s ease-in-out infinite alternate;
}
[data-location="astervin"] .astervin-tree-lights > i:nth-child(even){color:#cf6970;animation-delay:-1.3s;}
[data-location="astervin"] .astervin-tree-lights > i:nth-child(3n+1){animation-delay:-2.2s;}
@keyframes astervin-lamp{0%,20%{opacity:.18;} 65%,100%{opacity:.72;}}
@media(prefers-reduced-motion:reduce){[data-location="astervin"] .astervin-tree-lights > i{animation:none;opacity:.45;}}

/* The near camera can show a richer garland without changing the map or plaza. */
[data-location="astervin"] .astervin-tree-close-stage .astervin-tree-lights > i {
  width:clamp(2px,2.65%,9px);
  color:#ffc674;
  background:radial-gradient(circle,#fff8dc 10%,currentColor 49%,transparent 74%);
  box-shadow:0 0 .43em .04em currentColor;
  animation:astervin-close-lamp 3.8s ease-in-out var(--lamp-phase,0s) infinite;
}
[data-location="astervin"] .astervin-tree-close-stage .astervin-tree-lights > i:nth-child(3n+2){color:#f4866c;}
[data-location="astervin"] .astervin-tree-close-stage .astervin-tree-lights > i:nth-child(5n+3){color:#9ed4ba;}
[data-location="astervin"] .astervin-tree-close-stage .astervin-tree-lights > i:nth-child(7n+4){color:#a9bfff;}
@keyframes astervin-close-lamp{
  0%,100%{opacity:.38;transform:translate(-50%,-50%) scale(.88);}
  41%,58%{opacity:1;transform:translate(-50%,-50%) scale(1.27);}
}
@media(prefers-reduced-motion:reduce){
  [data-location="astervin"] .astervin-tree-close-stage .astervin-tree-lights > i{animation:none;opacity:.7;}
}
