/* =============================================================================
   assets/css/base.css — reset, типографика, layout-обёртка
   ========================================================================== */

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

* { margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.5;
    color: var(--text);
    background-color: var(--bg);
    /* Мягкий кофейный градиент фона */
    background-image:
        radial-gradient(120% 60% at 50% -10%, rgba(200, 153, 104, 0.18), transparent 60%),
        radial-gradient(100% 50% at 90% 110%, rgba(111, 78, 55, 0.10), transparent 55%);
    background-attachment: fixed;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, picture, svg { display: block; max-width: 100%; }

button, input, select, textarea {
    font: inherit;
    color: inherit;
    border: none;
    background: none;
}

button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

/* Центрированный мобильный макет на широких экранах */
.app-shell {
    max-width: var(--app-max-w);
    margin: 0 auto;
    min-height: 100dvh;
    background: var(--bg);
    position: relative;
    box-shadow: var(--shadow-lg);
}

.app-main {
    min-height: 100dvh;
    padding-top: var(--safe-top);
    padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + var(--space-5));
}

/* Скрытый визуально, но доступный для скринридеров */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* Тонкий скроллбар */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

/* Запрет выделения для UI-элементов, но разрешён для контента */
button, nav, .bottom-nav, .no-select { user-select: none; -webkit-user-select: none; }
