*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-overlay) var(--bg-base);
}

body {
    -webkit-user-select: none;
    user-select: none;
}

html.phone {
    -webkit-tap-highlight-color: transparent;
}

.msg-text,
input,
textarea,
[contenteditable="true"],
.selectable {
    -webkit-user-select: text;
    user-select: text;
}

a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

@media (hover: hover) {
    a:hover {
        color: var(--text-secondary);
    }
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: transparent;
}

input, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: var(--bg-overlay);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

input:focus, textarea:focus {
    border-color: var(--accent-primary);
}

img {
    max-width: 100%;
    height: auto;
    -webkit-user-drag: none;
}

iframe {
    border: none;
}
