:root {
    --color-bg: #faf7f2;
    --color-surface: #ffffff;
    --color-surface-soft: #fffaf5;
    --color-text: #2f2f2f;
    --color-muted: #76716c;
    --color-heading: #5a3928;
    --color-accent: #b86b3c;
    --color-accent-strong: #8f4725;
    --color-accent-soft: #f3e3d7;
    --color-border: #e7d8cc;
    --color-link: #9b5a2e;
    --shadow-soft: 0 12px 30px rgb(90 57 40 / 9%);
}

* {
    box-sizing: border-box;
}

html {
    color: var(--color-text);
    background: var(--color-bg);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
    overflow-x: hidden;
}

a {
    color: var(--color-link);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgb(255 250 245 / 96%);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 6px 22px rgb(90 57 40 / 7%);
    backdrop-filter: blur(12px);
}

.site-header__inner,
.site-footer__inner,
.site-main {
    width: min(100%, 1120px);
    margin-inline: auto;
    min-width: 0;
}

.site-header__inner {
    padding: 14px 16px 10px;
}

.site-logo {
    display: block;
    color: var(--color-heading);
    text-decoration: none;
}

.site-logo__name {
    display: block;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.site-logo__lead {
    display: block;
    color: var(--color-muted);
    font-size: 0.78rem;
    line-height: 1.6;
}

.site-nav {
    display: flex;
    gap: 8px;
    width: min(100%, 1120px);
    margin-inline: auto;
    overflow-x: auto;
    border-top: 1px solid var(--color-border);
    background: transparent;
    padding: 9px 14px 10px;
    scrollbar-width: none;
    white-space: nowrap;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.footer-nav {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-top: 10px;
    white-space: nowrap;
}

.site-nav a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-heading);
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 12px;
    text-align: center;
    text-decoration: none;
}

.footer-nav a {
    color: var(--color-heading);
    font-size: 0.9rem;
    text-decoration: none;
}

.site-main {
    padding: 18px 0 40px;
}

.hero,
.page-header,
.page-body,
.post,
.profile-strip,
.sidebar section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.hero,
.page-header,
.page-body,
.profile-strip {
    padding: 24px 20px;
}

.hero h1,
.page-header h1,
.page-body h1,
.post h1 {
    margin: 0 0 14px;
    color: var(--color-heading);
    font-size: 1.42rem;
    line-height: 1.45;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.hero p,
.page-header p,
.page-body p,
.profile-strip p {
    margin: 0 0 1em;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--color-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
}

.section-block {
    margin-top: 28px;
    padding-inline: 16px;
}

.content-grid .section-block:first-child {
    margin-top: 0;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.section-heading h2,
.profile-strip h2,
.sidebar h2 {
    margin: 0;
    color: var(--color-heading);
    font-size: 1.2rem;
    line-height: 1.5;
}

.section-heading a,
.profile-strip a,
.sidebar a {
    font-size: 0.9rem;
}

.category-grid,
.side-links,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-grid a,
.side-links a,
.tag-list a,
.tag-list span {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-accent-soft);
    color: var(--color-heading);
    padding: 4px 12px;
    font-size: 0.88rem;
    text-decoration: none;
}

.article-list {
    display: grid;
    gap: 14px;
}

.article-card {
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgb(90 57 40 / 7%);
}

.article-card__link {
    display: grid;
    min-height: 148px;
    color: inherit;
    text-decoration: none;
}

.article-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--color-accent-soft);
    object-fit: cover;
}

.article-card__body {
    padding: 14px;
}

.article-card__meta,
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--color-muted);
    font-size: 0.84rem;
}

.article-card h3 {
    margin: 8px 0;
    color: var(--color-heading);
    font-size: 1rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.article-card p {
    margin: 0 0 12px;
    color: var(--color-muted);
    font-size: 0.94rem;
}

.content-grid {
    display: grid;
    gap: 24px;
    min-width: 0;
    padding-inline: 12px;
}

.content-grid > * {
    min-width: 0;
}

.hero + .content-grid,
.page-header + .content-grid {
    margin-top: 24px;
}

.sidebar {
    display: grid;
    gap: 14px;
}

.sidebar section {
    padding: 18px;
    scroll-margin-top: 92px;
}

.sidebar p {
    margin: 8px 0 10px;
    color: var(--color-muted);
    font-size: 0.94rem;
}

.side-search {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.side-search input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
}

.side-search button {
    border: 0;
    border-radius: 8px;
    background: var(--color-accent);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 9px 12px;
}

.contact-form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.contact-form label {
    display: grid;
    gap: 7px;
    color: var(--color-heading);
    font-weight: 700;
}

.contact-form input,
.contact-form textarea,
.mobile-sidebar-search input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
    padding: 11px 12px;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form em {
    color: #a33c26;
    font-size: 0.86rem;
    font-style: normal;
    font-weight: 600;
}

.contact-form button {
    border: 0;
    border-radius: 6px;
    background: var(--color-accent);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 12px 16px;
}

.form-message {
    margin-top: 18px;
    border: 1px solid #d6b394;
    border-radius: 6px;
    background: #fff8f0;
    color: var(--color-heading);
    padding: 12px 14px;
    font-weight: 700;
}

.post {
    overflow: hidden;
    min-width: 0;
}

.post-header {
    padding: 18px 16px 0;
    min-width: 0;
}

.post-category {
    display: inline-flex;
    margin-bottom: 12px;
    border-radius: 999px;
    background: var(--color-accent-soft);
    color: var(--color-heading);
    padding: 4px 12px;
    font-size: 0.88rem;
    text-decoration: none;
}

.post-eyecatch {
    width: 100%;
    max-width: 100%;
    margin: 18px 0 0;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--color-accent-soft);
}

.post-body {
    padding: 22px 16px 26px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.post-body > * {
    max-width: 100%;
    min-width: 0;
}

.page-body h2,
.post-body h2 {
    margin: 2.1em 0 0.8em;
    border-left: 4px solid var(--color-accent);
    color: var(--color-heading);
    padding-left: 10px;
    font-size: 1.18rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.page-body h3,
.post-body h3 {
    margin: 1.8em 0 0.7em;
    color: var(--color-heading);
    font-size: 1.14rem;
}

.page-body ul,
.page-body ol,
.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body table {
    margin: 0 0 1.25em;
}

.page-body p,
.post-body p {
    overflow-wrap: anywhere;
    word-break: normal;
}

.page-body strong,
.page-body .text-emphasis,
.post-body strong,
.post-body .text-emphasis {
    color: var(--color-accent-strong);
    font-weight: 800;
}

.page-body mark,
.page-body .marker,
.post-body mark,
.post-body .marker {
    border-radius: 2px;
    background: linear-gradient(transparent 58%, #f4d66b 58%);
    color: inherit;
    font-weight: 800;
    padding: 0 0.08em;
}

.page-body .note-box,
.post-body .note-box {
    position: relative;
    margin: 0 0 1.4em;
    border: 1px solid #e9c7ac;
    border-radius: 4px;
    background: #fffaf5;
    color: var(--color-text);
    padding: 18px 16px 16px;
    box-shadow: 0 6px 18px rgb(90 57 40 / 6%);
}

.page-body .note-box::before,
.post-body .note-box::before {
    content: "i";
    position: absolute;
    top: -10px;
    left: 50%;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 2px solid var(--color-surface);
    border-radius: 999px;
    background: var(--color-accent);
    color: #ffffff;
    font-family: Georgia, serif;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    transform: translateX(-50%);
}

.page-body .note-box p:last-child,
.post-body .note-box p:last-child {
    margin-bottom: 0;
}

.post-body img,
.post-body video,
.post-body iframe,
.post-body svg {
    width: auto;
    height: auto;
    max-width: 100%;
}

.post-body pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
}

.page-body ul,
.page-body ol,
.post-body ul,
.post-body ol {
    padding-left: 1.35em;
}

.page-body li + li,
.post-body li + li {
    margin-top: 0.35em;
}

.post-body blockquote {
    border-left: 4px solid var(--color-accent);
    background: #fff8f2;
    color: var(--color-heading);
    padding: 14px 16px;
}

.post-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    white-space: nowrap;
}

.post-body th,
.post-body td {
    border: 1px solid var(--color-border);
    padding: 8px 10px;
    text-align: left;
}

.post-body th {
    background: var(--color-accent-soft);
    color: var(--color-heading);
}

.post-footer {
    border-top: 1px solid var(--color-border);
    padding: 18px;
}

.profile-strip {
    margin-top: 24px;
}

.empty-text {
    margin: 0;
    color: var(--color-muted);
}

.site-footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.site-footer__inner {
    padding: 22px 18px;
}

.site-footer__copy {
    margin: 14px 0 0;
    color: var(--color-muted);
    font-size: 0.86rem;
}

.mobile-footer-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid rgb(184 107 60 / 28%);
    background: rgb(255 250 245 / 98%);
    box-shadow: 0 -10px 30px rgb(90 57 40 / 16%);
    padding-bottom: env(safe-area-inset-bottom);
    backdrop-filter: blur(14px);
}

.mobile-footer-nav a,
.mobile-footer-nav label {
    display: grid;
    min-height: 62px;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: var(--color-heading);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
}

.mobile-footer-nav a + a,
.mobile-footer-nav a + label,
.mobile-footer-nav label + a,
.mobile-footer-nav label + label {
    border-left: 1px solid rgb(184 107 60 / 18%);
}

.mobile-footer-nav span[aria-hidden="true"] {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: var(--color-accent-soft);
    color: var(--color-accent-strong);
    font-size: 0.95rem;
    line-height: 1;
}

.mobile-sidebar-toggle {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 49;
    display: none;
    background: rgb(47 47 47 / 48%);
}

.mobile-sidebar-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    width: min(82vw, 320px);
    overflow-y: auto;
    border-left: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: -18px 0 40px rgb(47 47 47 / 18%);
    padding: 18px 14px 92px;
    transform: translateX(100%);
    transition: transform 0.18s ease;
}

.mobile-sidebar-toggle:checked ~ .mobile-sidebar-panel {
    transform: translateX(0);
}

.mobile-sidebar-toggle:checked ~ .mobile-sidebar-backdrop {
    display: block;
}

.mobile-sidebar-close {
    display: grid;
    width: 44px;
    height: 44px;
    margin: 0 auto 8px;
    place-items: center;
    color: var(--color-text);
    cursor: pointer;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.mobile-sidebar-search {
    position: relative;
    margin-bottom: 20px;
}

.mobile-sidebar-search input {
    padding-right: 44px;
}

.mobile-sidebar-search button {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    width: 42px;
    height: 100%;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
    font: inherit;
    font-size: 1.2rem;
}

.mobile-sidebar-panel section + section {
    margin-top: 22px;
}

.mobile-sidebar-panel h2 {
    margin: 0 0 10px;
    color: var(--color-heading);
    font-size: 1rem;
    line-height: 1.5;
}

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

    .site-header__inner {
        padding: 22px 24px 14px;
    }

    .site-nav {
        justify-content: center;
        overflow-x: visible;
        padding: 12px 24px;
    }

    .site-nav a {
        min-width: 120px;
        min-height: 38px;
        font-size: 0.88rem;
    }

    .site-main {
        padding: 34px 24px 64px;
    }

    .section-block {
        padding-inline: 0;
    }

    .content-grid {
        padding-inline: 0;
    }

    .hero,
    .page-header,
    .page-body,
    .profile-strip {
        padding: 34px;
    }

    .hero h1,
    .page-header h1,
    .page-body h1,
    .post h1 {
        font-size: 2rem;
    }

    .article-card__link {
        grid-template-columns: 220px 1fr;
    }

    .article-card__image {
        height: 100%;
        aspect-ratio: auto;
    }

    .content-grid {
        grid-template-columns: minmax(0, 1fr) 304px;
        align-items: start;
    }

    .hero + .content-grid,
    .page-header + .content-grid {
        margin-top: 28px;
    }

    .sidebar {
        position: sticky;
        top: 18px;
        display: grid;
    }

    .post-header {
        padding: 34px 34px 0;
    }

    .post-eyecatch {
        margin-top: 24px;
    }

    .post-body {
        padding: 30px 56px 40px;
    }

    .post-footer {
        padding: 22px 56px 30px;
    }

    .mobile-footer-nav,
    .mobile-sidebar-panel,
    .mobile-sidebar-backdrop {
        display: none;
    }
}
