/* The object layer, blueprints, runes (docs/GAMEPLAY.md). Flat shapes, no outlines except the dashed blueprint.
   ember = the player's light and the blueprint, cyan = fragments and streams, rose = an error. */

/* ---- the overlay svg inside the play layer ---- */
.layer>svg.objs{position:absolute;left:0;top:0;height:100%;pointer-events:none;overflow:visible}
.objs text{font-family:var(--mono)}
.objs .o .in{transform-box:fill-box}

/* labels: mono, with a dark halo so they read on any background (the halo is not an outline of a shape) */
.objs .lb{font:500 10.5px var(--mono);fill:var(--bone);paint-order:stroke;stroke:#03090A;stroke-width:3.2px;stroke-linejoin:round;letter-spacing:.01em}
.objs .lb.bp{fill:var(--ember)}
.objs .lb.ghost{fill:var(--mute)}
.objs .lead{stroke:rgba(233,228,212,.26);stroke-width:1;stroke-dasharray:2 3;fill:none}
.objs .rl{font:400 8.5px var(--mono);fill:var(--mute)}
.objs .rl.st-dashed{fill:var(--ember)}
.objs .cl{font:400 8.5px var(--mono);fill:var(--bone);paint-order:stroke;stroke:#03090A;stroke-width:2.4px;opacity:.9}
.objs .ln{transition:fill .3s}
.objs .lg{fill:var(--ember)}

/* a thing seen only as a silhouette until its folder has been listed; a hidden thing shows through when everything has been listed */
.objs .o.dim .body{opacity:1}
.objs .o.ghostly{opacity:.42}
.objs .o.bp-gone .body{opacity:.85}

/* the blueprint: translucent, dashed, ember */
.objs .bp-dashed .body{fill:rgba(242,166,90,.07);stroke:var(--ember);stroke-width:1.6;stroke-dasharray:5 4;animation:bpdash 1.6s linear infinite}
.objs .bpc,.objs .bpl{fill:rgba(242,166,90,.07);stroke:var(--ember);stroke-width:1.5;stroke-dasharray:4 3.4;animation:bpdash 1.6s linear infinite}
.objs .bpl{fill:none;stroke-width:1.6;opacity:.85}
@keyframes bpdash{to{stroke-dashoffset:-14}}
.objs .bp-dashed .inner{fill:none}
.objs .bp-dashed.k-door .bpc{fill:rgba(242,166,90,.08)}
.objs .cell.st-extra{animation:none}
.objs .cell.fresh{animation:settle .5s ease-out both}
@keyframes settle{0%{opacity:.2;transform:translateY(3px)}60%{opacity:1}100%{opacity:1;transform:none}}
.objs .o.bp-broken .body{filter:drop-shadow(0 0 4px rgba(224,86,122,.9))}
.objs .o.bad .body{fill:rgba(224,86,122,.4);stroke:var(--rose);stroke-dasharray:5 4}
.objs .o.flash .body{filter:drop-shadow(0 0 8px rgba(242,166,90,.95))}

/* the beam from the caret and the outline that draws itself */
.objs .beam{fill:none;stroke:var(--ember);stroke-width:2.2;stroke-linecap:round;opacity:.9;filter:drop-shadow(0 0 5px rgba(242,166,90,.9))}
.objs .wr{fill:none;stroke:var(--ember);stroke-width:2;stroke-linejoin:round}

/* the line from the character to what he wants */
.objs .ptr-l{fill:none;stroke:var(--ember);stroke-width:1.5;stroke-dasharray:3 6;opacity:.45;animation:bpdash 1.2s linear infinite}
.objs .ptr-d{fill:var(--ember);opacity:.7}

/* the stones of runes */
.objs .rune .halo{animation:runepulse 2.6s ease-in-out infinite}
.objs .rune .rw{font:500 14px var(--mono);paint-order:stroke;stroke:#02080A;stroke-width:2.6px;letter-spacing:.02em}
@keyframes runepulse{0%,100%{opacity:.7}50%{opacity:1}}

/* ---- the gloss under a real error: one plain line, a thin rose rule in front ---- */
#out .gloss,#record .ln .gloss{margin-top:4px;padding-left:8px;border-left:2px solid var(--rose);font:400 12.5px/1.35 var(--sans);color:rgba(233,228,212,.72);white-space:normal}
#record .ln .gloss{margin-top:2px}

/* ---- the belt ---- */
#belt{position:absolute;left:50%;bottom:56px;transform:translateX(-50%);z-index:12;display:flex;gap:8px;align-items:stretch;max-width:92vw;padding:6px 8px;border-radius:12px;background:rgba(6,16,18,.72);pointer-events:auto;zoom:var(--hs,1)}
#belt[hidden]{display:none}
.rchip{display:flex;align-items:baseline;gap:7px;padding:5px 10px 6px;border:1px solid var(--line);border-radius:9px;background:rgba(10,27,31,.9);color:var(--bone);font:500 14px var(--mono);cursor:pointer;white-space:nowrap}
.rchip:hover{border-color:var(--ember)}
.rchip .rw{color:var(--ember)}
.rchip .rf{color:var(--stream);font-size:12.5px;padding:0 4px;border-radius:4px;background:rgba(159,216,210,.1)}
.rchip kbd{align-self:center;margin-left:2px;padding:0 4px;font-size:10px;color:var(--mute);border-color:rgba(43,74,75,.8)}
.rchip.pulse{border-color:var(--ember);animation:askpulse 2s ease-in-out infinite}
@media (prefers-reduced-motion: reduce){.rchip.pulse{animation:none}}
/* long cmdlet names (PowerShell): the full name by default, smaller type when the row is short of room, the common alias in the last resort */
.rchip .rw .short{display:none}
#belt.tight{gap:5px}
#belt.tight .rchip{font-size:12px;gap:5px;padding:4px 7px 5px}
#belt.tight .rchip .rf{font-size:11px;padding:0 3px}
#belt.tight .rchip kbd{display:none}
#belt.tighter .rchip .rw .full{display:none}
#belt.tighter .rchip .rw .short{display:inline}
#runecard #rcWord small.ral{font:400 15px var(--mono);color:var(--mute);text-shadow:none;letter-spacing:0}
@media (max-width:620px){#belt{bottom:92px}}

/* ---- the card of a rune ---- */
#runecard{position:absolute;left:50%;top:24%;z-index:14;width:min(400px,86vw);padding:16px 22px 14px;border:1px solid rgba(242,166,90,.55);border-radius:14px;background:rgba(6,16,18,.94);box-shadow:0 14px 44px rgba(0,0,0,.7),0 0 34px rgba(242,166,90,.12);text-align:center;opacity:0;transform:translate(-50%,10px);transition:opacity .25s,transform .25s;pointer-events:none;zoom:var(--hs,1)}
#runecard.on{opacity:1;transform:translate(-50%,0)}
#runecard[hidden]{display:none}
#runecard.frag{border-color:rgba(159,216,210,.55);box-shadow:0 14px 44px rgba(0,0,0,.7),0 0 34px rgba(159,216,210,.12)}
#runecard b{display:block;font:500 11px var(--sans);letter-spacing:.2em;text-transform:uppercase;color:var(--ember)}
#runecard.frag b{color:var(--stream)}
#rcWord{margin:6px 0 4px;font:500 34px var(--mono);color:var(--ember);letter-spacing:.02em;text-shadow:0 0 22px rgba(242,166,90,.45)}
#runecard.frag #rcWord{color:var(--stream);text-shadow:0 0 22px rgba(159,216,210,.4)}
#rcText{margin:0 0 12px;font:italic 500 19px/1.35 var(--serif);color:var(--bone)}
#rcEx{display:inline-block;padding:8px 14px;border-radius:8px;background:rgba(3,8,10,.7);font:500 16px var(--mono);white-space:pre}
#rcEx span{color:var(--c,var(--bone))}
#rcEx .focus{text-decoration:underline;text-decoration-color:var(--ember);text-decoration-thickness:2px;text-underline-offset:5px}
#runecard small{display:block;margin-top:10px;font:400 11.5px var(--sans);color:var(--mute)}

/* ---- the ghost shape in the caret line ---- */
#ghost{opacity:.34;color:var(--ember);text-shadow:none;white-space:pre}
#ghost:empty{display:none}

/* things stand in front of the characters (a boss carries his clutter at his feet), the hero and the bubbles are above them */
#L3 .npc{z-index:1}
.layer>svg.objs{z-index:2}
#L3 .bubble{z-index:3}

@media (prefers-reduced-motion: reduce){
  .objs .bp-dashed .body,.objs .bpc,.objs .bpl,.objs .ptr-l,.objs .rune .halo,.objs .cell.fresh{animation:none}
  #runecard{transition:none}
}

/* crowded labels: only the nearest thing, the blueprint and what the hero stands next to */
.objs .o .lb,.objs .o .lead{transition:opacity .2s}
.objs .o.crowded:not(.near):not(.bpn) .lb,.objs .o.crowded:not(.near):not(.bpn) .lead{opacity:0}
