html,body {
  background-color: #eee;
  margin: 0px;
  padding: 0px;
  font-family: sans-serif;
  font-size: 14;
}
game {
  position: relative;
  display: block;
  width: 698px;
  height: 348px;
  margin: 0em;
  padding: 0em;
  background-color: white;
  overflow: hidden;
  border: 1px solid grey;
}
header {
  display: flex;
  justify-content: space-between;
  background-color: #EEE;
}
header .title {
  font-size: 150%;
  margin: 2px 2px 0px 2px;
  width: 250px;
}
tab {
  display: inline-block;
  user-select: none;
  margin: 2px 2px 0px 2px;
  padding: 5px;
  background-color: #DDD;
}
tab popout {
  display: none;
}
tab:hover {
  background-color: white;
}

/* tab:nth-child(3) popout, */
tab:hover popout
{
  display: block;
  position: absolute;
  background-color: white;
  left: 0px;
  right: 0px;
  top: 28px;
  bottom: 0px;
  z-index: 2;
}

#game_tab,
#social_tab {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-evenly;
  height: 100%;
  margin: 25px;
}

#achievement, #long_achievement {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-content: start;
  justify-content: space-evenly;
  position: relative;
  font-size: 100%;
}
#achievement value, #long_achievement value {
  display: block;
  margin: 0.6em;
}
#achievement value:hover desc {
  display: block;
  position: absolute;
  border: 1px solid blue;
  font-size: 100%;
  z-index: 1;
}

#full_screen[message="0"] {
  display:none;
}
#full_screen desc {
  display: none;
}
#full_screen {
  display: block;
  position: absolute;
  left: 0px;
  right: 0px;
  top: 28px;
  bottom: 0px;
  background: white;
  font-size: 200%;
  z-index: 1;
}
#message message {
  display: block;
  margin: 0.5em;
  font-size: 70%;
}
#message_clickers {
  display: block;
  position: absolute;
  right: 50px;
  bottom: 0px;
}

value {
  display: block;
}

desc {
  display:none;
}
value:hover desc,
skill name:hover desc,
clicker:hover desc, 
main-label:hover + desc,
box:hover > main-label,
image:hover > desc
{
  display: block;
  position: absolute;
  color: black;
  background: white;
  padding: 0.2em;
  border: 0.1em solid black;
  margin-top: 1em;
  font-size: 10px;
  z-index: 1;
}

pline mult {
  display: none;
}
pbar {
  display: block;
  height: 0.8rem;
  background-color: white;
  border: 0.1rem solid black;
}
pbar exp {
  display: block;
  background-color: darkgrey;
  color: #D8D8D8;
  font-size: 0.6em;
  height: 0.8rem;
  width: calc(var(--fill-percent) * 1%);
}
skill clickers clickbox {
  display: block;
}

clicker clickbox {
  display: inline-block;
  user-select: none;
  border: 0.08rem solid black;
  border-radius: 0.4em;
  min-width: 1em;
  min-height: 1em;
  padding: 0.2em;
  background-color: #ddd;
}

clicker:hover:not(.disabled):not(:active) clickbox {
  box-shadow: 0.1rem 0.1rem 0.2rem black;
  z-index: 1;
}
clicker:active:not(.disabled) clickbox {
  z-index: 1;
}

clicker.disabled clickbox {
  background: transparent;
  border-color: grey;
  color: #ccc;
}
.autoclick clickbox {
  border-radius: 0em;
}

image {
  padding: .5em;
}
img {
  display: block;
  height: 3em;
}
automation {
  background-color: lightyellow;
  border: 1px solid lightgrey;
  color: grey;
}
automation clicker clickbox {
  background-color: transparent;
  border-radius: 0px;
  border: none;
  box-shadow: none;
}
automation clicker.disabled clickbox {
  color: black;
  background: inherit;
}
automation clicker:hover:not(.disabled):not(:active) clickbox {
  box-shadow: none;
}

#content {
  display: flex;
}
#interact {
  display: flex;
  position: relative;
  width: 500px;
  height: 320px;
}
value:hover desc,
skill name:hover desc,
clicker:hover desc, 
main-label:hover + desc,
box:hover > main-label,
image:hover > desc,
#workshop_tab desc
{
  position: fixed;
  top: 30px;
  left: 500px;
  width: 194px;
  border: none;
  margin: 0px;
}
#story_screen[story="0"] {
  display:none;
}
#story_screen {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1;
  background-color: white;
  overflow-y: auto;
}
#story_screen message {
  display: block;
  margin: 1em;
  overflow-y: auto;
}
#story_screen message:first-child {
  font-weight: bold;
}
#resource {
  display: flex;
  flex-flow: column;
  box-sizing: border-box;
  width: 150px;
  height: 300px;
  border: 25px solid transparent;
  border-image: url('images/columns.jpg') 100 160 / 30px 25px;
  padding: 30px 0px;
  font-family: serif;
}
#resource value {
  display: flex;
  justify-content: space-between;
  padding: 2px 0px;
}
#resource value:nth-child(2n) {
  background-color: #f4fff4;
}
#resource value:nth-child(2n+1) {
  background-color: #f4f4ff;
}
#workshop_area {
  display: flex;
  flex-flow: column;
  width: 340px;
}
#workshop_tab {
  display: block;
}
#story_tab clickbox,
#workshop_tab clickbox {
  border: 1px solid lightgrey;
  background-color: #f2f2f2;
  color: darkgrey;
  box-shadow: none;
  border-radius: 10px 10px 0px 0px;
}
#story_tab clicker.disabled clickbox,
#workshop_tab clicker.disabled clickbox {
  color: black;
  border-color: grey;
  background-color: white;
  border-bottom: none;
}
#workshop {
  display: block;
}
#workshop panel clicker clickbox {
  background-color: greenyellow;
}
#workshop panel clicker.disabled clickbox {
  background-color: transparent;
}


#intro[active="0"] {display: none;}
#intro {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url('images/olympus.jpg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position-y: 50px;
  opacity: 0.3;
}
#select {
  display: block;
  position: relative;
  width: 200px;
}
#info_box {
  display: block;
  height: 60px;
}
#story_tab desc {
  display: none;
}
#task, #story_select {
  display: block;
  position: relative;
  max-height: 238px;
  overflow-y: auto;
  overflow-x: hidden;
}
#story_select clickbox,
#task clickbox {
  height: 2.48em;
  width: 180px;
}
#task clicker clickbox {
  border: 1px solid transparent;
  margin: 0.2em;
  background-color: lightgreen;
  color: black;
  border-radius: 0;
}
#task clicker.disabled clickbox {
  background-color: transparent;
  border: 1px dashed green;
}
#story_select clicker clickbox {
  border: 1px solid transparent;
  margin: 0.2em;
  background-color: lightblue;
  color: black;
  border-radius: 0;
}
#story_select clicker.disabled clickbox {
  background-color: transparent;
  border: 1px dashed blue;
  color: darkgrey;
}

#workshop {
  flex-grow: 1;
  position: relative;
  display: block;
}
#workshop_upgrade {
  display: block;
  height: 60px;
  font-size: 75%;
}
#workshop_upgrade clicker clickbox {
  border: 1px solid transparent;
  margin: 1px;
  background-color: lightblue;
  color: black;
  border-radius: 0;  
}
#workshop_upgrade clicker.disabled clickbox {
  background-color: transparent;
  border: 1px dashed blue;
  color: darkgrey;
}


#journal[active="0"] {
  display: none;
}
#journal {
  display: block;
  width: 100%;
  height: 100%;
}
#journal::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: white;
  background-image: url('images/journal.jpg');
  background-size:cover;
  opacity: 0.4
}
#journal skill val {
  display: none;
}
#ink {
  position: absolute;
  top: 20px;
  right: 0px;
}

#ink skill name{
  position: relative;
  left: 20px;
}
#ink pline {
  order: -1;
}
#ink pbar {
  position: relative;
  height: 150px;
  width: 40px;
}
#ink exp {
  display: flex;
  align-items: flex-end;
  position: absolute;
  bottom: 0;
  height: calc(var(--fill-percent) * 1%);
  width: 100%;
  background-color: black;
}

#journal pbar {
  opacity: 0.7;
  background-color: transparent;
}
#quill {
  position: absolute;
  top: 20%;
  left: 20px;
  width: 200px;
}
#quill exp {
  display: block;
  white-space: nowrap;
  background-color: black;
  background-image: url('images/writing.jpg');
  background-size: 200px;
  color: white;
}
#quill clickbox {
  width: 70px;
}



#loom[active="0"] {
  display: none;
}
#loom {
  display: block;
  width: 100%;
  height: 100%;
}
#loom::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url('images/spinningwheel.jpg');
  background-size: cover;
  opacity: 0.4
}
#loom skill val {
  display: none;
}
#loom skill {
  display: flex;
  flex-flow: column;
  align-items: flex-end;
}
#loom pline {
  width: 100%;
}
#loom pbar {
  border: none;
}
#spindle {
  position: absolute;
  top: 30px;
  right: 0px;
  width: 60px;
}
#spindle pbar {
  display: flex;
  justify-content: center;
}
#spindle exp {
  flex-shrink: 0;
  display: block;
  background-image: linear-gradient(to right, #222, #888 50%,#222 100%), url('images/spindle.jpg');
  background-blend-mode: overlay, normal;
  background-position: center, calc(50% + var(--fill-percent) * 5px);
  background-size: 100% 100%, 60px 300%;
  box-shadow: inset 0px 0px 1px 1px white;
  color: white;
  padding: 3px;
}
#spindle clickers {
  position: absolute;
  top: 0px;
  left: -270px;
  width: 50px;
}
#spindle exp, #thread exp {
  display: block;
  white-space: nowrap;
}
#spindle exp {
  height: 40px;
}
#thread {
  position: absolute;
  top: 120px;
  right: 0px;
  width: 100%;
}
#thread pbar {
  display: flex;
  justify-content: flex-end;
  background-color: transparent;
}
#thread exp {
  height: 10px;
  color: white;
  background-image: url('images/drawn.jpg');
  background-size: 60px 10px;
}
#thread clicker:first-child {
  position: absolute;
  top: -20px;
  left: 10px;
  width: 50px;
}
#thread clicker:last-child {
  position: absolute;
  top: 50px;
  left: 10px;
  width: 50px;
}

#auto_cut {
  position: absolute;
  top: 170px;
  left: 70px;
}
#auto_draw {
  position: absolute;
  top: 100px;
  left: 70px;
}
#auto_spin {
  position: absolute;
  top: 30px;
  left: 70px;
}


#forge[active="0"]{display:none;}
#fire multibar > val,
#furnace multibar > val,
#anvil multibar > val {
  display: none;
}
#fire multibar, #furnace multibar {
  display: flex;
  flex-flow: column-reverse;
  width: 60px;
  height: 140px;
  margin-top: 10px;
}
#fire boxes, #furnace boxes {
  display: flex;
  flex-flow: column-reverse;
  height: 100%;
  font-size: 50%;
}
box main-label {
  display: none;
}
#forge::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url('images/forge.jpg');
  background-size: cover;
  opacity: 0.6;
}
#fire box, #furnace box {
  display: block;
  height: calc(var(--fill-percent) * 1%);
  overflow: hidden;
}
#fire {
  position: absolute;
  left: 3px;
}
#fire box {
  width: 100%;
}
#fire .fuel {
  color: white;
  background-color: darkred;
  opacity: 0.6;
}
#fire .heat {
  color: white;
  background-color: red;
  opacity: 0.4;
}
#fire_buttons {
  display: block;
  position: absolute;
  top: 160px;
  width: 70px;
}
#auto_fire {
  position: absolute;
  top: 190;
  max-width: 70px;
  font-size: 60%;
}
#furnace {
  position: absolute;
  left: 87px;
}
#furnace boxes {
  border: 6px solid transparent;
  opacity: 0.85;
}
#furnace boxes::before {
  content: "";
  display: block;
  box-sizing: border-box;
  position: absolute;
  left: 0px;
  bottom: 17px;
  height: 116px;
  width: 60px;
  border: 6px solid black;
  border-top: none;
  border-radius: 3px;
  opacity: 0.40;
}
#furnace_buttons {
  display: block;
  position: absolute;
  left: 80px;
  top: 160px;
  width: 70px;
}
#furnace .greed {
  color: white;
  background-color: green;
}
#furnace .envy {
  background-color: lightgreen;
}
#furnace .motivation {
  background-color: lightblue;
}
#auto_furnace {
  position: absolute;
  top: 209px;
  left: 80px;
  max-width: 70px;
  font-size: 60%;
}
#mold {
  position: absolute;
  left: 160px;
  width: 190px;
  height: 150px;
  margin-top: 10px;
}
#mold skill {
  display: flex;
  justify-content: space-between;
  width: 150px;
}
#mold pline {
  position: absolute;
  top: 30px;
  left: 50px;
  width: 100px;
  height: 100px;
}
#mold skill > val {
  display: none;
}
#mold clickers {
  position: relative;
  left: -35px;
}
#auto_mold {
  position: absolute;
  left: 290px;
  top: 7px;
  max-width: 80px;
  font-size: 60%;
}
#shape[shape="0"] ~ #mold pbar {
  position: relative;
  top: 30px;
  left: 50px;
  width: 0px;
  height: 0px;
  border: 8px solid black;
  border-radius: 8px;
}
#shape[shape="0"] ~ #mold exp {
  display: none;
}
#shape[shape="1"] ~ #mold pbar {
  position: relative;
  top: 30px;
  width: 80%;
  height: 0px;
  border: 8px solid black;
  border-radius: 8px;
}
#shape[shape="1"] ~ #mold exp {
  display: none;
}
#shape[shape="2"] ~ #mold pbar {
  position: relative;
  top: 30px;
  width: calc(80% + 4px);
  height: 4px;
  border: 6px solid black;
  border-radius: 8px;
  background-color: transparent;
}
#shape[shape="2"] ~ #mold exp {
  display: none;
}
#shape ~ #mold pbar {
  display: flex;
  flex-flow: column-reverse;
  height: 100%;
  border: none;
  background-color: transparent;
}
#shape[shape="3"] ~ #mold pbar {
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}
#shape[shape="4"] ~ #mold pbar {
  clip-path: none;
}
#shape[shape="5"] ~ #mold pbar {
  clip-path: polygon(20% 100%, 0% 45%, 50% 0%, 100% 45%, 80% 100%);
}
#shape[shape="6"] ~ #mold pbar {
  clip-path: polygon(25% 100%, 0% 50%, 25% 0%, 75% 0%, 100% 50%, 75% 100%);
}
#mold pbar::before {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0.3;
}
#mold exp {
  display: flex;
  flex-flow: column-reverse;
  align-items: center;
  width: 100%;
  height: calc(var(--fill-percent) * 1%);
  background: lightblue;
  white-space: nowrap;
  color: grey;
  opacity: 0.9;
}
#anvil {
  position: absolute;
  top: 150px;
  left: 160px;
}
#anvil multibar {
  display: flex;
  height: 25px;
  width: 160px;
}
#anvil boxes {
  display: flex;
  position: relative;
  top: -5px;
  left: 2px;
  width: 100%;
  font-size: 50%;
  border: 1px solid black;
}
#anvil box {
  display: block;
  height: 100%;
  width: calc(var(--fill-percent) * 1%);
  overflow: hidden;
}
#anvil .hammered {
  color: white;
  background-color: black;
}
#anvil .waiting {
  color: darkgoldenrod;
  background-color: darkgoldenrod;
}
#anvil_buttons {
  position: absolute;
  top: 180px;
  left: 180px;
}
#auto_anvil {
  position: absolute;
  top: 210px;
  left: 217px;
  font-size: 60%;
}
#construct[active="0"]{display:none;}
#construct {
  display: block;
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  background-image: url('images/sphere.png');
  background-size: 230px 238px;
  background-repeat: no-repeat;
  background-position: center top;
  overflow:visible;
}
#workshop #construct clicker.disabled clickbox {
  color: black;
  background: white;
  opacity: 0.8;
  border: 1px dashed grey;
  box-shadow: none;
}
#construct clicker clickbox {
  color: black;
  background: lightgrey;
  opacity: 1;
  border-radius: 0px;
  border: none;
  margin: 2px;
  background-color: lightgoldenrodyellow;
  box-shadow: 0 0 5px 1px yellow;
}
#construct clicker:hover clickbox {
  box-shadow: 0 0 15px 10px yellow;
}

#achievement value:hover desc {
  border: none;
