/* 宿也 · 基础层：重置、排版、焦点、无障碍 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 var(--fs-body)/1.7 var(--font-sans);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1024px) {
    body {
        padding-bottom: 0;
    }
}

h1,
h2,
h3,
h4,
p,
ol,
ul {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: .02em;
}

h1 { font-size: var(--fs-h1); line-height: 1.3; }
h2 { font-size: var(--fs-h2); line-height: 1.35; }
h3 { font-size: var(--fs-h3); line-height: 1.45; }

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

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

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

button {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--pine);
    outline-offset: 2px;
}

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

.wrap {
    width: 100%;
    max-width: calc(var(--content-max) + var(--page-pad) * 2);
    margin-inline: auto;
    padding-inline: var(--page-pad);
}

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -100px;
    z-index: 100;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-m);
    background: var(--pine);
    color: #fff;
    font-weight: 600;
}

.skip-link:focus {
    top: var(--space-3);
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
