.rules_menu {
    display: flex;
    color: var(--text-custom);
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid var(--button);
    cursor: pointer;
    transition: 0.3s;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  
  .rules_menu:hover {
    background: var(--button);
  }
  
  .rules_block {
    color: var(--text-default);
    font-weight: 400;
    font-size: 13px;
    padding: 10px 10px 0;
    display: none;
    width: 100%;
  }
  
  .rules_block > a {
    display: flex;
    color: var(--span);
    font-weight: 600;
    font-size: 17px;
    text-align: center;
    justify-content: center;
  }
  
  .rules_block img {
    border-radius: 16px;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
  }
  
  .rules_text {
    color: var(--text-default);
    font-weight: 400;
    font-size: 14px;
    margin-left: 10px;
  }
  
  .rules_text_punishment {
    color: var(--red);
    font-weight: 400;
    font-size: 14px;
  }
  
  .rules_warning {
    color: var(--span);
    font-weight: bold;
    font-size: 14px;
  }
  
  .rules_active {
    background: var(--button);
    color: var(--text-default);
  }
  
  .rules_active svg {
    opacity: 1 !important;
    transition: 0.3s;
  }
  
  .rules_card_header {
    float: left;
    margin: 5px 0px 0px 10px;
  }
  
  .rules_card {
    background: var(--card);
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-direction: column;
  }
  
  .rules_card_block {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .rules_sticky {
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px); /* Учитывает отступы */
    overflow-y: auto;
  }
  
  .rules_chapter {
    font-weight: 700;
    font-family: "Unbounded";
    color: var(--text-custom);
    margin: 5px 10px 12px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
  }
  
  .rules_number {
    color: var(--text-custom);
  }
  
  .rules_title {
    font-weight: 700;
    font-family: "Unbounded";
  }
  
  .time_short_text,
  .time_long_text {
    font-weight: 400;
    font-size: 12px;
    position: absolute;
    right: 40px;
    top: 31px;
    color: var(--text-custom);
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.5;
  }
  
  .rules_chapter svg {
    height: 15px;
    fill: var(--text-custom);
  }
  
  .rules_menu svg {
    height: 13px;
    fill: var(--text-custom);
    opacity: 0.4;
  }
  
  .rules_card_left {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .time_short_text svg,
  .time_long_text svg {
    height: 13px;
    fill: var(--text-custom);
  }
  
  @media (max-width: 575.98px) {
    .time_short_text,
    .time_long_text {
      display: none;
    }
  }
  
  @media (max-width: 768px) {
    .rules_card {
      display: block;
    }
    .rules_choose {
      display: none;
    }
    .rules_card_left {
      padding: 0;
      border: none;
      min-width: auto;
    }
  
    .rules_sticky {
      position: static;
      height: auto;
      top: 25px;
    }
  }
  
  .rules_margin {
    width: 100%;
  }
  
  .rules_text a {
    text-decoration: underline;
  }
  
  .rules_text_punishment {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    background-color: rgba(255, 61, 61, 0.08); /* Очень светлый фон */
    color: #ff3d3d; /* Ярко-красный текст */
    font-size: 14px;
    font-weight: 500; /* Полужирный (но не слишком жирный) */
    border-radius: 4px;
 }

 .rules_text_exception {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    background-color: rgba(46, 204, 113, 0.08); /* Светло-зелёный фон */
    color: #2ecc71; /* Ярко-зелёный текст */
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    font-style: italic;
 }

 .rules_text_link {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: rgba(52, 152, 219, 0.15); /* Светло-синий фон */
    color: #7E9DFF; /* Синий текст */
    font-size: 14px;
    font-weight: 500;
}