*{
  box-sizing: border-box;
}

body{
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: '#555';
}

#toolbar{
  width: 100%;
  position: fixed;
  padding: 30px 80px 20px;
  justify-content: space-between;
  pointer-events: none;
}

#toolbar h1{
  margin-bottom: 3px;
}

#toolbar h5{
  margin: 0;
  text-align: center;
}

.button{
  padding: 10px 15px;
  margin: 0 5px;
  cursor: pointer;
  font-size: 14px;
  /* background-color: blue; */
}

.button:hover{
  color: #FF5A74 !important;
}

::selection {
  background-color: transparent;
}

h1{
  margin: 0;
  padding: 0;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
  font-family: 'Manrope', sans-serif;
  margin-top: -7px;
  font-weight: 800;
}

.flexSide{
  flex-grow: 1;
  flex-basis: 0;
  display: flex;
}

.flexRight{
  justify-content: flex-end;
}

#bottomTipsBox{
  position: fixed;
  bottom: 100px;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#bottomTips{
  display: flex;
}

#mobile-resize-grabber{
  display: none;
}

@media (max-width: 768px) {
  :root{
    --mobile-canvas-height: 55dvh;
    --mobile-separator-height: 22px;
  }

  html,
  body{
    height: 100dvh;
    min-height: 100dvh;
    max-width: 100vw;
    overflow: hidden;
  }

  body{
    display: flex;
    flex-direction: column;
    font-size: 14px;
  }

  body .tool-home-button{
    top: calc(env(safe-area-inset-top) + 12px);
    left: 12px;
    width: 36px;
    height: 36px;
  }

  #canvas{
    order: 1;
    flex: 0 0 var(--mobile-canvas-height);
    width: 100%;
    height: var(--mobile-canvas-height);
    min-height: 30dvh;
    max-height: 75dvh;
    touch-action: none;
  }

  #mobile-resize-grabber{
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--mobile-separator-height);
    width: 100%;
    background: rgba(245, 245, 245, 0.96);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    cursor: ns-resize;
    touch-action: none;
    z-index: 20;
  }

  #mobile-resize-grabber::before{
    content: "";
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.24);
  }

  #mobile-bottom-panel{
    order: 3;
    flex: 1 1 auto;
    min-height: 0;
    height: calc(100dvh - var(--mobile-canvas-height) - var(--mobile-separator-height));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px 16px calc(env(safe-area-inset-bottom) + 20px);
    background: #f5f5f5;
  }

  #toolbar,
  #bottomTipsBox{
    position: static;
    width: 100%;
    padding: 0;
    pointer-events: auto;
  }

  #toolbar h1{
    margin-top: 0;
    margin-bottom: 4px;
    font-size: 24px;
    line-height: 1;
  }

  #toolbar h5{
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
  }

  #bottomTipsBox{
    display: block;
  }

  #bottomTips{
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .button{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.1;
    text-align: center;
  }
}
