#az_agree,
#az_rememberme {
    position: relative;
    flex-grow: 0;
    flex-shrink: 0;
    align-self: auto;
    width: 100%;
}
#az_agree      { margin: 8px 0 5px; }
#az_rememberme { margin: 6px 0 1px; }

#az_agree, #az_agree *, #az_agree *::before, #az_agree *::after,
#az_rememberme, #az_rememberme *, #az_rememberme *::before, #az_rememberme *::after {
    box-sizing: border-box;
}

#az_agree input[type='checkbox'],
#az_rememberme input[type='checkbox'] {
    position: relative;
    padding: 0;
    margin: 0;
    opacity: 0;
    z-index: 1;
    width: 22px;
    height: 22px;
    left: 0;
    top: 0;
}

#az_agree label,
#az_rememberme label {
    display: inline-block;
    vertical-align: middle;
    position: absolute;
    left: 0;
    top: 0;
    padding: 0;
}

#az_agree label::before,
#az_rememberme label::before {
    content: "";
    display: inline-block;
    position: absolute;
    width: 22px;
    height: 22px;
    left: 0;
    top: 0;
    background-color: #FFFFFF;
    border: 3px solid #FFA500;
    border-radius: 8px;
}

#az_agree label::after,
#az_rememberme label::after {
    display: inline-block;
    position: absolute;
    width: 22px;
    height: 22px;
    left: 0;
    top: 0;
    visibility: visible;
    padding: 0;
    text-align: center;
    line-height: 22px;
}

#az_agree input[type='checkbox']:checked + label::after,
#az_rememberme input[type='checkbox']:checked + label::after {
    content: " ";
    background: url('data:image/svg+xml,%3csvg%20style%3d%22fill:%23FFFFFF%22%20viewBox%3d%220%200%2088%2088%22%20version%3d%221.1%22%20xmlns%3d%22http://www.w3.org/2000/svg%22%3e%0d%0a%20%20%20%3cpath%20d%3d%22M82%2022%20C83%2023%2c%2083%2024%2c%2083%2026%20C83%2027%2c%2083%2029%2c%2082%2030%20L46%2065%20L40%2072%20C39%2073%2c%2037%2074%2c%2036%2074%20C34%2074%2c%2033%2073%2c%2032%2072%20L25%2065%20L7%2048%20C6%2047%2c%206%2045%2c%206%2044%20C6%2042%2c%206%2041%2c%207%2040%20L14%2033%20C15%2032%2c%2016%2031%2c%2018%2031%20C19%2031%2c%2021%2032%2c%2022%2033%20L36%2047%20L67%2015%20C68%2014%2c%2070%2014%2c%2071%2014%20C73%2014%2c%2074%2014%2c%2075%2015%22/%3e%0d%0a%3c/svg%3e%0d%0a') no-repeat center center;
    background-size: 80% 80%;
}

#az_agree input[type='checkbox']:checked + label::before,
#az_rememberme input[type='checkbox']:checked + label::before {
    background-color: #FFA500;
    background-image: none;
    border-color: #FFA500;
}

#az_agree input[type='checkbox']:focus + label::before,
#az_rememberme input[type='checkbox']:focus + label::before {
    outline: thin dotted;
}

/* --- Финальный label: значения различаются по страницам --- */
#az_agree label {
    position: absolute;
    left: 2px;
    top: 0;
    color: var(--text1);
    font-size: 11px;
    text-align: left;
    padding-left: 30px;
    height: 22px;
    display: flex;
    align-items: center;
}

/* Регистрация: три отметки согласия, каждая в своей строке */
#az_agree .agree-row {
    position: relative;
    min-height: 30px;
    margin-bottom: 4px;
}
#az_agree .agree-row label {
    display: block;
    height: auto;
    min-height: 22px;
    right: 0;
    padding-top: 4px;
    line-height: 1.3;
}
#az_agree .agree-row label a { color: inherit; text-decoration: underline; }

#az_rememberme label {
    position: absolute;
    left: 2px;
    top: 0;
    color: var(--text1);
    font-size: 14px;
    text-align: left;
    padding-left: 30px;
    height: 22px;
    display: flex;
    align-items: center;
}

/* ==================== INDEX (авторизация) ==================== */
.restore_prompt {
    text-align: center;
    display: flex;
    padding: 20px;
    flex-direction: column;
    max-width: 400px;
    box-sizing: border-box;
    background: var(--button-go);
    border-radius: 25px;
    z-index: 2;
    color: var(--button-text);
}

/* ==================== GETPASS (восстановление доступа) ==================== */
#mountain-container {
    width: 110%;
    position: fixed;
    display: flex;
    align-items: flex-end;
    bottom: 0;
}

#mountainCanvas {
    width: 100%;
    height: 100%;
}

.step {
    width: 100%;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--text3);
}

.step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-title {
    color: var(--text-info);
    font-size: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.step-content {
    color: var(--text2);
    font-size: 14px;
    line-height: 1.5;
}

.code-label {
    margin-bottom: 5px;
}

.code-input {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    padding-top: 5px;
}

.code-text-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resend-link {
    color: var(--text-info);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    margin-top: 10px;
    display: inline-block;
}

.resend-link:hover {
    text-decoration: underline;
}

.success-message {
    background: rgba(81, 207, 102, 0.1);
    border: 1px solid rgba(81, 207, 102, 0.3);
    border-radius: 12px;
    margin-bottom: 15px;
    text-align: center;
    color: #51cf66;
    padding: 0 10px;
}

.phone-display {
    background: rgba(255, 165, 0, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    display: inline-block;
    color: var(--text-info);
    font-weight: bold;
}

.error-message {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 12px 15px;
    margin: 15px 0;
    text-align: center;
    font-size: 14px;
    width: 100%;
}

.erase-consent-link {
    text-decoration: underline;
    text-align: left;
    color: var(--text0);
}

.help-button i {
    font-size: 30px;
    margin: 30px;
}