  @import url('https://fonts.googleapis.com/css2?family=WDXL+Lubrifont+TC&display=swap');
  @font-face {
    font-family: 'CourierBold'; 
    src:  url('/Courier New Bold.ttf') format('truetype');
  }
    
  * {
    font-family: "WDXL Lubrifont TC", "CourierBold";
    user-select: none;
  }
  body {
    background-color: #2d2425;
    /*background-image: url('/bg pattern2.png');
    background-size: 10%;*/
    
    background-image: url('/bg pattern4.svg'), radial-gradient(transparent, #00000030);
    /*background-blend-mode: multiply;*/
    background-repeat: repeat, no-repeat;
    background-size: 10%, 100vw 100vh;

    /*background-image: url('/texture12.png');*/
    /*background-image: url('/texture13.jpg');*/
    margin: 0;
    padding: 0;
    position: relative;
    max-height: 1vh;
    cursor: default;
  }

  div.textbox {
    background-color: #827a6e;
    color: #2d2425;
    border-color: black;
    min-height: 300px;
    max-height: 596px; /*100vh-100px*/
  }
  
  /*div.textbox_overlay { /*НЕ БУДЕТ РАБОТАТЬ ИЗ-ЗА РЕСАЙЗА*/
  /*  position: absolute;*/
  /*  z-index: 2;*/
  /*  background-image: radial-gradient(transparent, transparent, #00000040);*/
  /*  width: 700px;*/
  /*  height: 100%;*/
  /*  margin: -5px;*/
  /*}*/

  hr {
    color: #2d2425;
    border-style: none;
    text-align: center;
    position: relative;
    margin-top: -3px; /*-5px;*/
    margin-bottom: 15px; /*10px;*/
    animation: bounce 0.5s ease-in-out infinite alternate;
  }

  @keyframes bounce {
      0% {
          transform: translateY(-3px);
      }
      90% {
          transform: translateY(3px);
      }
      100% {
          transform: translateY(3px);
      }
  }

  hr:before {
    content: "_▼_▼_▼_";
    font-size: 12px;
    font-weight: bolder;
    margin-left: auto;
    margin-right: auto;
  }

  hr.stop-animation {
      animation: none;
      transform: translateY(0);
  }

  .textbox {
    margin-left: auto;
    margin-right: auto;
    margin-top: 100px;
    max-width: 700px;
    height: 400px;
    border-radius: 18px;
    border-color: black;
    border: double 16px;
    overflow-y: scroll;
    overflow-x: hidden;
    font-size: 24px;
    padding: 4px;
    box-sizing: border-box;
    cursor: default;
    scrollbar-width: thin;
    scrollbar-color: #4E4A42 #827a6e;
    resize: vertical;
  }

  .textbox::-webkit-resizer {
      background-color: #4E4A42;
      border-radius: 4px;
      border: 2px solid #bababa;
      /*box-shadow: 0 0 2px rgba(0,0,0,0.5);*/
  }
  
  .textbox::-webkit-resizer:before {
    content: "⇲";
  }

  /*.textbox::-webkit-resizer:hover {*/
  /*    background-color: #6B655A;*/
  /*    border-color: #A89F90;*/
  /*}*/

  p.work {
    visibility: hidden;
  }

/*@media only screen and (max-width: 915px) {*/
/*@media only screen and (aspect-ratio < 10/16) {*/
@media only screen and (max-width: 700px) {
   div {
     visibility: hidden;
   }
   
   .textbox {
     height: 300px;
   }
   
   p.work {
     visibility: visible;
     position: fixed;
     top: 0px;
     bottom: 0px;
     left: 0px;
     right: 0px;
     margin: 0px;
     background-image: repeating-linear-gradient(
      -45deg,
      #201200, 
      #201200 50px, 
      #5a4800 50px, 
      #5a4800 100px
    );
   }
}

@media (max-width: 900px) {
  .decor {
    visibility: hidden;
  }
}

@media (max-width: 1140px) {
  .wires {
    visibility: hidden;
  }
}

.textbox::-webkit-scrollbar {
  width: 16px;
}

.textbox::-webkit-scrollbar-track {
  background: #827a6e;
  border-radius: 8px;
}

.textbox::-webkit-scrollbar-thumb {
  background: #4E4A42;
  border-radius: 8px;
  border: 2px solid #827a6e;
}

.textbox::-webkit-scrollbar-thumb:hover {
  background: #2d2425;
}

.choice-button {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2.5px solid #3e3233;
  background-color: #827a6e;
  margin-right: 8px;
  margin-bottom: -4px;
  text-align: center;
  line-height: 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.choice-button.selected {
  background-color: #2d2425;
  border-color: #2d2425;
  color: #827a6e;
}

.choice-button.disabled {
  cursor: default;
}

.choice-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  /*margin-bottom: 5px;*/
}

.choice-label.disabled {
  cursor: default;
}

.input-field {
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  font-size: 24px;
  width: auto;
  min-width: 10px;
  max-width: 400px;
  margin-left: 0px;
  color: inherit;
  caret-color: black;
}

.input-container {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.measure-span {
  position: absolute;
  visibility: hidden;
  white-space: pre;
  font-size: 24px;
  font-family: "WDXL Lubrifont TC";
  padding: 0;
}

.confirm-button {
  background: transparent;
  border: 2px solid #4E4A42;
  cursor: pointer;
  color: inherit;
  flex-shrink: 0;
}

.confirm-button:hover {
  background: #4E4A42;
  color: #827a6e;
}

.fullscreen-button {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 58px;
  height: 58px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 1000;
  transition: transform 0.2s;
}

.fullscreen-button:hover {
  transform: scale(1.1);
}

.fullscreen-button:active {
  transform: scale(0.95);
}

.settings-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 58px;
  height: 58px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 1000;
  transition: transform 0.2s;
}

.settings-button:hover {
  transform: scale(1.1);
}

.settings-button:active {
  transform: scale(0.95);
}

.settings-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #827a6e;
  border: double 8px #000;
  border-radius: 12px;
  padding: 20px;
  z-index: 1002;
  min-width: 300px;
  display: none;
}

.settings-modal h3 {
  margin-top: 0;
  text-align: center;
  border-bottom: 1px solid #000;
  padding-bottom: 10px;
}

.speed-control {
  margin: 15px 0;
}

.speed-control label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.speed-slider {
  width: 100%;
  margin: 10px 0;
}

.speed-value {
  text-align: center;
  font-size: 18px;
  margin: 5px 0;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.modal-button {
  background: #827a6e;
  border: 2px solid #000;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 16px;
}

.modal-button:hover {
  background: #a8a094;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  display: none;
}

.waiting-for-click {
  cursor: pointer !important;
}