/* MIKU Store — Base Reset, Typography & Unified Layout Container */

html {
    height: 100%;
    box-sizing: border-box;
    scrollbar-gutter: stable;
    color-scheme: dark;
}

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

body {
    min-height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-4);
}

@media (min-width: 769px) {
    .container {
        padding-inline: var(--space-6);
    }
}

main.container {
    flex: 1 0 auto;
    padding-block: var(--space-6) var(--space-12);
}

h1, h2, h3, h4 {
    color: var(--text);
    margin-top: 0;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

h1 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
}

h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
}

h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
}

h4 {
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
}

@media (max-width: 768px) {
    main.container {
        padding-block: var(--space-4) var(--space-8);
    }

    h1 {
        font-size: var(--text-lg);
    }

    h2 {
        font-size: var(--text-lg);
    }
}

h1,
.logo,
.hero-title,
.balance-amount,
.product-card-price {
    font-family: var(--font-display);
}

.balance-amount,
.product-card-price,
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.hidden {
    display: none !important;
}

.visually-hidden:where(:not(:focus-within, :active)) {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
