:root {
    --color-primary: #d00000;
    --color-primary-dark: #a80000;
    --color-text: #222222;
    --color-muted: #626262;
    --color-background: #ffffff;
    --color-background-light: #f2f2f2;
    --color-background-dark: #454847;
    --color-border: #d7d7d7;
    --color-focus: #005fcc;
    --content-width: 1200px;
    --content-padding: clamp(20px, 4vw, 48px);
    --header-height: 88px;
    --header-height-mobile: 60px;
    --scroll-offset: calc(var(--header-height) + 24px);
    --font-sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    --font-display: Inter, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
    --transition-duration: 200ms;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--scroll-offset);
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--color-text);
    background: var(--color-background);
    font-family: var(--font-sans);
    font-optical-sizing: auto;
    font-synthesis: none;
    letter-spacing: 0.012em;
    line-height: 1.8;
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
}

body.is-menu-open {
    overflow: hidden;
}

address {
    font-style: normal;
}

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

iframe {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    max-width: 100%;
    font: inherit;
}

a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--color-focus);
}

.site-main:focus {
    outline: none;
    box-shadow: none;
}

[id] {
    scroll-margin-top: var(--scroll-offset);
}

body.admin-bar {
    --scroll-offset: calc(var(--header-height) + 56px);
}

@media (max-width: 959px) {
    :root {
        --scroll-offset: calc(var(--header-height-mobile) + 20px);
    }

    body.admin-bar {
        --scroll-offset: calc(var(--header-height-mobile) + 52px);
    }
}

@media (max-width: 782px) {
    body.admin-bar {
        --scroll-offset: calc(var(--header-height-mobile) + 66px);
    }
}

@media (forced-colors: active) {
    :focus-visible {
        outline: 2px solid CanvasText;
        box-shadow: none;
        forced-color-adjust: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
