#menu-doc-mn {
  bottom: calc(1.5rem + var(--height-btn-round) + 3rem);
  right: calc((var(--height-btn-round) + 1.5rem) * 2);
  white-space: nowrap;
  max-height: min(calc(var(--menu-datalist-li) * 7), 50vh);
  overflow-y: auto;
}

.table-content-line {
  table-layout: fixed;
}

.table-content-line td > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#table-ques th:nth-child(1),
#table-ques td:nth-child(1) {
  min-width: 20rem;
}

#table-ques th:nth-child(3),
#table-ques td:nth-child(3) {
  width: 20rem;
}

#table-ques th:nth-child(2),
#table-ques td:nth-child(2),
#table-ques th:nth-child(4),
#table-ques td:nth-child(4) {
  width: 15rem;
  text-align: center;
}

#table-ques th:nth-child(5),
#table-ques td:nth-child(5) {
  text-align: center;
  width: 10rem;
}

.weld {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  background-color: var(--seam-bg-color);
  --size: 0.4rem;
  height: var(--size);
  border-radius: calc(var(--size) * 0.5);
  margin-bottom: 1rem;
}

.seam {
  --size: 0.4rem;
  height: var(--size);
  display: inline-block;
  width: 100%;
  border-radius: calc(var(--size) * 0.5);
  animation: growBar 10s linear infinite;
  background: linear-gradient(
    to left,                                                
    gold 0,
    var(--color-red-400) 0.4rem,            
    var(--seam-cool-color) 7rem,
    var(--seam-cool-color) 100%);
}

.spark {
  position: relative;
  --size: 0.9rem;
  margin-left: -0.2rem;
  width: var(--size);
  height: var(--size);
  background: radial-gradient(circle, orange 30%, gold 70%, transparent 80%);
  border-radius: 50%;
  animation: flicker 0.1s linear infinite alternate;
  z-index: 2;
}

.spark::before,
.spark::after {
  content: "";
  position: absolute;
  inset: -1.1rem;
  background: radial-gradient(circle, rgba(255,165,0,0.4) 20%, transparent 70%);
  border-radius: 50%;
  animation: sparks 0.6s infinite;
}

.spark::after {
  animation-delay: 0.15s;
}

@keyframes flicker {
  0% {transform: scale(0.9); opacity: 0.9;}
  100% {transform: scale(1.1); opacity: 1;}
}

@keyframes sparks {
  0%   {transform: scale(0.5); opacity: 0.6;}
  50%  {transform: scale(1);   opacity: 0.4;}
  100% {transform: scale(0.5); opacity: 0.6;}
}

@keyframes growBar {
  0%   { width: 0%; }
  99.999% { width: 100%; }
  100% { width: 0%; }
}

.error-code-alert {
  color: var(--service-text-color); 
  font-size: var(--font-size-small);
  text-align: right;
}

#menu-language-mn {
  left: var(--height-btn-round);
  bottom: calc(var(--height-btn-round) + 3rem);
}

.block-btn-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.display-inline-block {
  display: inline-block;
}

#table-1 th:nth-child(1),
#table-1 td:nth-child(1) {
  min-width: 20rem;
}

#table-1 td:nth-child(2),
#table-1 td:nth-child(3) {
  text-align: center;
} 

table {
  border: 0.1rem solid var(--table-border-color);
  border-collapse: collapse; /* убирает двойные границы */
  font-size: var(--def-font-size);
}

table,
th,
td {
  box-sizing: border-box;
}

th {
  background-color: var(--table-header-bg-color);
  text-align: center;
  padding: 1.5rem 1rem;
  font-weight: normal;
  user-select: none;  
}

td {
  padding: 0.6rem 1rem;
}

th,
td {
  border: 0.1rem solid var(--table-border-color);
}

tr.edit {
  cursor: pointer;
  user-select: none;
}

tr.dark {
  background-color: var(--table-tr-dark-bg-color);
}

.wrap-price {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: space-evenly;
  margin: 3rem 0 1.5rem 0;
}

.block-price,
.block-image {
  display: inline-block;
  position: relative;
  box-sizing: border-box;
}

.block-price {
  min-width: 25rem;
  max-width: 25rem;
  min-height: 32rem;
  padding: 0.3rem;
}

.block-image {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 20rem;
}

.block-image img {
  max-width: 38rem;
  min-width: 0;
}

.plate-price {
  position: relative;
  z-index: 2;
  display: inline-block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 2rem;
  background-color: var(--color-gray-200);
  padding: 0 1.5rem 2rem 1.5rem;
  text-align: center;
  user-select: none;
}

.block-price .substrate {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  border-radius: 2.3rem
}

.substrate--junior {
  background:
    linear-gradient(90deg, var(--color-blue-300) 70%, var(--color-green-300) 0) top / 100% 45% no-repeat,
    linear-gradient(90deg, var(--color-blue-300) 70%, var(--color-red-300) 0) top / 100% 75% no-repeat,
    linear-gradient(90deg, var(--color-orange-300) 70%, var(--color-red-300) 0) top / 100% 100%;
}

.substrate--senior {
  background: 
    linear-gradient(90deg, var(--color-blue-300) 70%, var(--color-red-300) 0) top / 100% 45% no-repeat,
    linear-gradient(90deg, var(--color-blue-300) 70%, var(--color-orange-300) 0) top / 100% 75% no-repeat,
    linear-gradient(90deg, var(--color-green-300) 70%, var(--color-orange-300) 0) top / 100% 100%;
}

.plate-price .plan {
  text-align: center;
}

.plate-price .plan > div {
  display: inline-block;
  background-color: var(--color-gray-600);
  padding: 0 2rem;
  color: var(--color-white);
  font-size: 1.7rem;
  line-height: 3.6rem;
  min-width: 45%;
  clip-path: polygon(0 0, 0.8rem 100%, calc(100% - 0.8rem) 100%, 100% 0);
  margin-top: -0.3rem;
}

.plate-price .license {
  margin-top: 0.5rem;
  color: var(--color-black-400);
  line-height: 1.7;
}

.plate-price .license .period {
  font-size: 4.8rem;
}

.plate-price .license .month {
  display: inline-block;
  position: relative;
  top: -2.2rem;
  margin-left: 0.5rem;
}

.plate-price .price {
  --size: 4.5rem;
  display: inline-block;
  border-radius: calc(var(--size) / 2);
  height: var(--size);
  padding: 0 2rem;
  line-height: var(--size);
  background-color: var(--color-blue-300); 
}

.plate-price .price .number {
  font-size: 2.2rem;
}

.plate-price .cost {
  margin-top: 1.5rem;
  line-height: 1;
}

.plate-price .discount {
  margin-top: 1.5rem; 
  font-weight: bold;
  line-height: 1;
}

.plate-price .btn {
  width: 14rem;
  border-radius: 17rem;
  margin-top: 3rem;
}

.plate-price .note {
  margin-top: 1.5rem;
}

.plate-price .note ul {
  text-align: left;
}

.plate-price .note div {
  line-height: 1.6;
}

#menu-app-mn,
#menu-lan-mn {
  top: calc(1.5rem * 3 + 2.3rem));
  position: fixed;
  z-index: 5;
  right: calc((100% - var(--width-main-container)) / 2 + var(--pad-lr-window));
}

#menu-lan-mn {
  white-space: nowrap;
  max-height: min(calc(var(--menu-datalist-li) * 10), 50vh);
  overflow-y: auto;
} 

.mar-top-5 {
  margin-top: 0.5rem;
}

.mar-top-10 {
  margin-top: 1rem;
}

.mar-top-15 {
  margin-top: 1.5rem;
}

.mar-top-20 {
  margin-top: 2rem;
}

.mar-top-25 {
  margin-top: 2.5rem;
}

.mar-top-30 {
  margin-top: 3rem;
}

.mar-bot-5 {
  margin-bottom: 0.5rem;
}

.mar-bot-10 {
  margin-bottom: 1rem;
}

.mar-bot-15 {
  margin-bottom: 1.5rem;
}

.mar-bot-20 {
  margin-bottom: 2rem;
}

.mar-bot-25 {
  margin-bottom: 2.5rem;
}

.mar-bot-30 {
  margin-bottom: 3rem;
}

.mar-left-5 {
  margin-left: 0.5rem;
}

.mar-left-10 {
  margin-left: 1rem;
}

.mar-left-15 {
  margin-left: 1.5rem;
}

.mar-right-5 {
  margin-right: 0.5rem;
}

.mar-right-10 {
  margin-right: 1rem;
}

.mar-right-15 {
  margin-right: 1.5rem;
}

.font-0 {
  font-size: 0;
}

.align-left {
  text-align: left;
}

.align-right {
  text-align: right;
}

.align-center {
  text-align: center;
}

.pad-left-5 {
  padding-left: 0.5rem;
}

.pad-left-10 {
  padding-left: 1rem;
}

.pad-left-15 {
  padding-left: 1.5rem;
}

.pad-left-20 {
  padding-left: 2rem;
}

.pad-left-22 {
  padding-left: 2.5rem;
}

.pad-left-30 {
  padding-left: 3rem;
}

.block-chat,
.block-input-chat {
  width: var(--width-block-chat); 
}

.block-chat {
  margin: 0 auto;
}

.block-chat .chat {
  position: relative;
  z-index: 3;
  padding-bottom: calc(1.5rem + var(--height-btn-round) + 1.5rem + var(--height-input-chat) + var(--padding-input-chat));
}

.block-input-chat {
  position: fixed;
  left: 50%;
  z-index: 4;
  background-color: var(--content-bg-color);
  padding: var(--padding-input-chat) 0 1.5rem 0;
  top: 50%;
  transform: translate(-50%, -50%);
}

#header-input-chat-mn {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--h-color);
  width: 100%;
  line-height: 3.2rem;
  user-select: none;
}

.block-btn-chat {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
  gap: 1.5rem;
}

.block-btn-chat .left,
.block-btn-chat .right {
  display: flex;
  gap: 1.5rem;
}

#modal-form-alert .icon-translate,
#modal-form-alert .icon-workspaces_filled,
#modal-form-alert .icon-workspaces_outline {
  font-size: 1.8rem;
  position: relative;
  top: 0.1rem;
}

.block-chat .user {
  text-align: right;
  font-size: 0;
  margin-bottom: calc(0.5rem + 3.5rem);
}

.block-chat .assistant {
  text-align: left;
  font-size: 0;
}

.block-chat .user .message,
.block-chat .assistant .message {
  line-height: 1.6;
  display: inline-block;
  font-size: var(--font-size-def);
  position: relative;
  min-width: 20%;
  text-align: left;
}

.block-chat .user .message {
  max-width: 65%;
  background-color: var(--message-user-bg-color);
  overflow-wrap: break-word;
  white-space: pre-wrap;
  padding: 0.85rem 2rem 0.85rem 2rem;
  user-select: none;
  cursor: text;
  color: var(--message-user-text-color);
  /* clip-path: polygon(0.8rem 0, 0 100%, calc(100% - 0.8rem) 100%, 100% 0); */ /* параллелограмм */
  /* clip-path: polygon(0.8rem 0, 0 100%, 100% 100%, 100% 0); */ /* срез слева */
  /* clip-path: polygon(0 0, 0 100%, 100% 100%, calc(100% - 0.8rem) 0); */ /* срез справа */
  clip-path: polygon(1rem 0, 0 1rem, 0 100%, calc(100% - 1rem) 100%, 100% calc(100% - 1rem), 100% 0); /* фаски по диагональным углам */
  /* padding: 0.85rem 2rem 1.65rem 2rem;
  clip-path: polygon(0 0, 0 calc(100% - 0.8rem), calc(100% - 1.2rem) calc(100% - 0.8rem), 100% 100%, 100% 0); */ /* с пиптиком вниз как в мессенджерах */ 
  /* padding: 0.85rem 2.8rem 0.85rem 2rem;
  clip-path: polygon(0 0, 0 100%, 100% 100%, calc(100% - 0.8rem) calc(100% - 1rem), calc(100% - 0.8rem) 0); */ /* с пиптиком вправо как в мессенджерах */ 
}

.block-chat .user .message.edit:focus {
  outline: 0;
  border: none;
}

.block-chat .user .message.edit {
  background-color: var(--message-user-edit-bg-color);
  border: none;
  overflow: hidden;
  word-wrap: break-word;
  white-space: pre-wrap;
  font-size: var(--font-size-def);
  text-align: left;
  color: var(--message-user-edit-text-color);
}

.block-chat .assistant .message {
  max-width: 100%;
  border: none;
  color: var(--text-color);
  margin: 0;
}

.block-chat .assistant .block-btn {
  display: flex;
  height: 3.5rem;
  gap: 0.2rem;
  align-items: center;
  margin-top: 0.5rem;
}

.block-chat .assistant .block-btn .btn {
  --size: 3rem;
  color: var(--service-text-color);
  display: none;
  min-width: 0;
  width: var(--size);
  height: var(--size);
  border-radius: calc(var(--size) / 2);
  padding: 0;
  cursor: pointer;
  font-size: 1.7rem;
  align-items: center;
  justify-content: center;
  position: relative;
  line-height: 1;
}

.block-chat .assistant .block-btn .btn-copy.icon-done {
  font-size: 1.9rem;
}

.block-chat .user .strict::before,
.block-chat .user .flexible::before {
  content: "";
  --size: 0.6rem;
  display: inline-block;
  position: absolute;
  height: var(--size);
  width: var(--size);
  border-radius: calc(var(--size) / 2);
  bottom: 0.8rem;
  right: 0.8rem;
  box-sizing: border-box;
}

.block-chat .user .strict::before {
  /* background-color: var(--message-mark-strict-color); */
}

.block-chat .user .flexible::before {
  /* border: 0.1rem solid var(--message-mark-flexible-color); */
}

.voice-bar {
  --pad: 1.7rem;
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(100% - var(--pad));
  height: 5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
  overflow: hidden;
  background-color: var(--input-bg-color);
  box-sizing: border-box;
  padding: 0 1.5rem 1rem calc(var(--pad) + 1.5rem);
  border-radius: 1.5rem 1.5rem 0 0;
}

.voice-bar div {
  --width-item: 2px;
  display: inline-block;
  width: var(--width-item);
  margin: 0 1px;
  border-radius: calc(var(--width-item) / 2);
  background-color: var(--voice-bar-color);
  min-height: 3px;
}

@keyframes gradientFlowIndic {
  0%   {background-position: 100% 0;}
  100% {background-position: 0% 0;}
}

.block-chat .user .message.process-indic {
  background: var(--message-process-indic-bg);
  background-size: 300% 100%;
  animation: gradientFlowIndic 1.0s infinite linear;
}

#block-new-message-mn {
  width: 100%;
  position: relative;
  display: inline-block;
}

.small-text {
  font-size: var(--font-size-small);
}

.service-text {
  color: var(--service-text-color);
}

a,
.a {
  color: var(--color-blue-400);
  text-decoration: none;
  user-select: none;
  background: transparent;
  cursor: pointer;
}

a:active {
  outline: 0;
  text-decoration: none;
}

.logo-about {
  width: 10rem;
}

.media-hide {
  display: flex;
  gap: 3rem;
}

.media-hide .text,
.media-hide .image {
  flex: 1 1 0; 
}

.media-hide .image { 
  display: flex;
  justify-content: left;
  align-items: center;
}

.media-hide img,
.wrap-media img {
  height: auto;
  display: inline-block;
  border-radius: 3rem;
  background-color: var(--img-infographic-bg-color);
}

.media-hide img,
.wrap-media img {
  max-width: 38rem;
  min-width: 0;
}

.wrap-media {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.wrap-media--reverse {
  flex-wrap: wrap-reverse;
}

.wrap-media .text,
.wrap-media .image {
  min-width: 30rem;
  flex: 1 1 0;
}

.wrap-media .image {
  display: flex;
  justify-content: center;
  align-items: center;
}

hr {
  border: none;
  height: 0.1rem;
  background-color: var(--hr-color);
  margin: 1.5rem 0;
}

@media (max-width: 800px) {
  .media-hide .image {
    display: none;
  }
}

@media (any-pointer: coarse) { /* дисплеи с тачскрин */
    
  .block-chat .assistant .block-btn .btn {
    display: inline-flex;
  }
  
  .block-chat .user,
  .block-chat .user:not(:has(.message)) {
    margin-bottom: 2rem;
  }
  
  .block-chat .assistant {
    margin-bottom: 1rem;
  }
}

@media (max-width: 500px), /* стили для смартфонов */
(min-width: 501px) and (max-width: 1366px) { /* стили для планшетов */
  
  :root {
    --height-input-chat: 7.1rem;
  }
    
  .voice-bar {
    padding-bottom: 1rem;
    height: calc(var(--height-input-chat) - 1rem);
  }
  
  th {
    padding-top: 1.1rem 1rem;
  }
  
  td {
    padding: 0.6rem 1rem;
  }
  
  #menu-app-mn,
  #menu-lan-mn {
    right: var(--pad-lr-window);
  }
}

@media (max-width: 500px), (max-height: 500px) { /* стили для смартфонов */
  
  :root {
    --padding-input-chat: 1.5rem;
  }
  
  #menu-doc-mn {
    transform: translateX(50%);
    right: 50%;
  }
  
  #header-input-chat-mn {
    margin-bottom: calc(50vh - (1.5rem + var(--height-btn-round) + 1.5rem + var(--height-input-chat)));
  }
  
  #block-table-1 {
    display: block;
  }
  
  #table-1,
  #table-ques {
    width: 100%;
  }
    
  #table-ques th:nth-child(2),
  #table-ques td:nth-child(2),
  #table-ques th:nth-child(3),
  #table-ques td:nth-child(3),
  #table-ques th:nth-child(4),
  #table-ques td:nth-child(4),
  #table-ques th:nth-child(5),
  #table-ques td:nth-child(5),
  #table-1 th:nth-child(2),
  #table-1 td:nth-child(2),
  #table-1 th:nth-child(3),
  #table-1 td:nth-child(3),
  #table-1 th:nth-child(4),
  #table-1 td:nth-child(4) {
    display: none;
  }
  
  .block-chat {
    width: 100%;
  }
  
  .block-input-chat {
    width: calc(100% - (var(--pad-lr-window) * 2));
  }
        
  .block-chat .user .message,
  .block-chat .assistant .message {
    line-height: 1.5;
  }
  
  .wrap-media .text,
  .wrap-media .image {
    min-width: 20rem;
  }
  
  .block-price {
    width: calc(100vw - (var(--pad-lr-window) * 2) - (1.5rem * 2));
  }
  
  .block-input-chat {
    bottom: 0;
    transform: translateX(-50%);
    top: auto;
  }
    
}

@media (min-width: 501px) and (max-width: 820px) { /* стили для планшетов */
  
  .block-chat,
  .block-input-chat {
    width: 80vw;
  }
  
}

@media (min-width: 821px) and (max-width: 1366px) { /* стили для планшетов */
  
  .block-chat,
  .block-input-chat {
    width: 60vw;
  }
  
}

@media (hover: hover) and (pointer: fine) and (min-width: 501px) and (min-height: 501px) { /* дисплей с мышей и разрешением больше чем у смартфонов */

  .block-chat .assistant:hover .block-btn .btn {
    display: inline-flex;
  }
  
}

@media (hover: hover) and (pointer: fine) { /* дисплеи с мышей */
  
  .block-chat .assistant .block-btn .btn:hover {
    background-color: var(--btn-hov-bg-color);
  }
  
  tr.edit:hover {
    background-color: var(--table-tr-hov-bg-color);
  }
    
  .a:hover {
    outline: 0;
    text-decoration: underline;
  }
    
}