/* Mobile-friendly normalize and sensible defaults */

/* 1. Border-box sizing everywhere */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 2. Remove default margins */
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
    margin: 0;
}

/* 3. Improve text rendering on mobile */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 4. Make media elements responsive by default */
img, svg, video, canvas, audio, iframe {
    display: block;
    max-width: 100%;
}

img, video {
    height: auto;
}

/* 5. Inherit fonts for form controls */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

/* 6. Remove tap highlight on mobile */
*:focus {
    outline-color: #667eea;
}

html, body {
    -webkit-tap-highlight-color: transparent;
}

/* 7. Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 8. Safe-area support for devices with notches */
body {
    padding-left: max(env(safe-area-inset-left), 0px);
    padding-right: max(env(safe-area-inset-right), 0px);
}


