#help_container {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.55);
}

/* Текст справки */
.help_lines {
    width: 100%;
    max-width: 650px;
    max-height: calc(100vh - 100px);
    min-width: 0;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    gap: 5px;

    padding: 15px;
    overflow-x: hidden;
    overflow-y: auto;

    background-color: #ffffd6;
    border: 1px solid #d6c76a;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;

    font-family: var(--font);
    font-size: 10pt;
    color: #333;
}

.help_line {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.help_line b {
    color: #b00000;
}

/* Кнопка закрытия */
.help_button {
    width: 100%;
    max-width: 650px;
    min-width: 0;
    box-sizing: border-box;

    display: flex;
    justify-content: flex-end;

    padding: 0 15px 10px;

    background-color: #ffffd6;
    border: 1px solid #d6c76a;
    border-top: 0;
    border-radius: 0 0 8px 8px;
}

.help_button a {
    color: #444;
    font-family: var(--font);
    font-size: 10pt;
    text-decoration: underline;
    cursor: pointer;
}

.help_button a:hover {
    color: #000;
}

/* Узкие экраны */
@media (max-width: 600px) {
    #help_container {
        padding: 10px;
    }

    .help_lines {
        padding: 10px;
    }

    .help_button {
        padding: 0 10px 10px;
    }
}
