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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
}

img, video, picture, svg, canvas, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

table { max-width: 100%; border-collapse: collapse; }

p, span, a, h1, h2, h3, h4, h5, h6, li, blockquote {
    overflow-wrap: break-word;
    word-break: break-word;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; }

button, a, input, select, textarea, .tap-target { touch-action: manipulation; }

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

button, [role="button"] { min-height: 44px; }

input, select, textarea {
    font: inherit;
    font-size: var(--text-base);
    width: 100%;
    max-width: 100%;
}

a { color: var(--color-primary); }

body.no-scroll { overflow: hidden; height: 100dvh; }

/* ---- Auth (login / setup) ---- */
.auth-body {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.login-card {
    background: var(--color-surface);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
}

.login-title {
    text-align: center;
    font-size: var(--text-2xl);
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary-dark);
}

.login-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin: 0 0 var(--spacing-lg);
}

.form-group { margin-bottom: var(--spacing-md); }

.label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-muted);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}
