/* Glowing mycelium behind every page (mycelium.js): a faint network of threads that glows for a moment wherever it is
   brushed, like bioluminescent algae; links, menus and buttons glow when you point at them or tap them */
#myc{position:fixed;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;display:block}
#myc[hidden]{display:none}
:root{--myc-glow:rgba(233,255,176,.55);--myc-soft:rgba(185,212,111,.28)}

/* buttons and the round "bubble" buttons: a glow that breathes while you point at them, and a flash when tapped */
.btn,.hdr-btn,.chip,.admin-groups button,.chat-fab,.user-menu a,.user-menu button{transition:background-color .15s ease,border-color .2s ease,box-shadow .35s ease,color .15s ease}
@media (hover:hover){
  .btn:hover,.hdr-btn:hover,.admin-groups button:hover{border-color:var(--leaf);animation:myc-breathe 2.4s ease-in-out infinite}
  .btn-solid:hover,.chat-fab:hover{animation:myc-breathe-solid 2.4s ease-in-out infinite}
}
.btn:focus-visible,.hdr-btn:focus-visible,.chip:focus-visible{box-shadow:0 0 0 2px var(--leaf),0 0 22px var(--myc-glow)}
.btn:active,.hdr-btn:active,.chip:active,.admin-groups button:active,.chat-fab:active{animation:myc-flash .5s ease-out}
@keyframes myc-breathe{0%,100%{box-shadow:0 0 0 1px var(--myc-soft),0 0 10px var(--myc-soft)}50%{box-shadow:0 0 0 1px var(--myc-glow),0 0 24px var(--myc-glow),inset 0 0 12px var(--myc-soft)}}
@keyframes myc-breathe-solid{0%,100%{box-shadow:0 0 12px var(--myc-soft)}50%{box-shadow:0 0 30px var(--myc-glow)}}
@keyframes myc-flash{0%{box-shadow:0 0 0 0 rgba(251,243,223,.9),0 0 40px var(--myc-glow)}100%{box-shadow:0 0 0 14px rgba(251,243,223,0),0 0 0 var(--myc-glow)}}

/* words you can follow (the menu, the big links on the home page, "on this page" links): a thread of light draws in
   underneath, with a bright point at its end, and the words glow softly */
.nav-link,.welcome-link,.jump a,.welcome-subs a,.footer-links a,.footer-links button{position:relative;transition:color .2s ease,text-shadow .3s ease}
.nav-link::after,.welcome-link::after,.jump a::after{content:"";position:absolute;left:0;right:0;bottom:2px;height:2px;pointer-events:none;
  background:linear-gradient(90deg,rgba(185,212,111,0),var(--leaf) 70%,#fbf3df 98%,rgba(251,243,223,0));background-repeat:no-repeat;background-size:0 100%;
  filter:drop-shadow(0 0 4px var(--myc-glow));transition:background-size .5s cubic-bezier(.3,.7,.2,1)}
.nav-link::after{left:.7rem;right:.7rem;bottom:6px}
.welcome-link::after{bottom:-.08em;height:3px}
@media (hover:hover){
  .nav-link:hover,.welcome-link:hover,.jump a:hover,.welcome-subs a:hover,.footer-links a:hover,.footer-links button:hover{color:#fbf3df;text-shadow:0 0 14px var(--myc-glow),0 0 2px rgba(251,243,223,.6)}
  .nav-link:hover::after,.welcome-link:hover::after,.jump a:hover::after{background-size:100% 100%}
  .jump a:hover{border-bottom-color:transparent}
}
.nav-link:focus-visible::after,.welcome-link:focus-visible::after,.jump a:focus-visible::after{background-size:100% 100%}
.nav-link:active,.welcome-link:active,.jump a:active{text-shadow:0 0 22px rgba(251,243,223,.9)}
/* the page you're on keeps its thread lit */
.nav-link[aria-current=page]{box-shadow:none;text-shadow:0 0 12px var(--myc-soft)}
.nav-link[aria-current=page]::after{background-size:100% 100%}

/* boxes sit a little apart from the network, like clearings */
.card,.overview-item,.mine-strip{box-shadow:0 0 0 1px rgba(185,212,111,.08),0 10px 30px rgba(0,0,0,.25)}

/* the boxes sway a little as they swim through the current while you scroll, then settle (set by mycelium.js) */
@media (prefers-reduced-motion:no-preference){
  .stack>*,.home-garden,.mine-strip{translate:0 calc(var(--myc-drift,0px) * .55)}
  .stack>*:nth-child(even),.home-cards>*:nth-child(even){translate:0 calc(var(--myc-drift,0px) * 1)}
  .admin-room .stack>*,.admin-room .card{translate:none}
}
/* arriving: the page fades up as the current settles */
@media (prefers-reduced-motion:no-preference){
  body.myc-arriving main{animation:myc-arrive 1.1s .25s ease both}
  @keyframes myc-arrive{from{opacity:0;transform:translateY(8px)}}
}
@media (prefers-reduced-motion:reduce){
  .btn:hover,.hdr-btn:hover,.admin-groups button:hover,.btn-solid:hover,.chat-fab:hover,.btn:active,.hdr-btn:active,.chip:active{animation:none}
  .nav-link::after,.welcome-link::after,.jump a::after{transition:none}
}
