:root {
    --bg: #0f1220;
    --card: #171b2f;
    --text: #eef1ff;
    --muted: #a8b0d3;
    --accent: #6e8cff;
    /* コンテナ外左右（バナー寄りの青・中央より明るく差を出す） */
    --page-gutter-edge: #213c62;
    --page-gutter-mid: #2d4c78;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background-color: var(--bg);
}

body {
    display: block;
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--accent);
}

.container {
    width: min(1100px, 92%);
    max-width: 100%;
    margin: 0 auto;
    padding-left: clamp(0.85rem, 3.5vw, 1.5rem);
    padding-right: clamp(0.85rem, 3.5vw, 1.5rem);
    box-sizing: border-box;
}

.site-header,
.site-footer {
    padding: 1rem 0;
    background:
        linear-gradient(
            120deg,
            rgba(34, 60, 102, 0.9) 0%,
            rgba(28, 49, 84, 0.92) 52%,
            rgba(22, 38, 67, 0.95) 100%
        );
    border-top: 1px solid rgba(126, 200, 255, 0.25);
    border-bottom: 1px solid rgba(126, 200, 255, 0.25);
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 40;
    padding: clamp(1.2rem, 2.4vw, 1.5rem) 0 1rem;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.site-title {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.site-nav .menu {
    list-style: none;
    margin: 0;
    padding: 0.52rem 0.85rem 0.56rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
    align-items: center;
    justify-content: flex-end;
    border-radius: 12px;
    border: 1px solid rgba(126, 200, 255, 0.38);
    background:
        linear-gradient(
            120deg,
            rgba(34, 60, 102, 0.88) 0%,
            rgba(28, 49, 84, 0.9) 52%,
            rgba(22, 38, 67, 0.92) 100%
        );
    box-shadow:
        0 8px 20px rgba(8, 14, 32, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-nav .menu li {
    margin: 0;
    padding: 0;
}

.site-nav .menu li + li {
    border-left: 1px solid rgba(126, 200, 255, 0.35);
    padding-left: 0.8rem;
}

.site-nav .menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-block;
    padding: 0.1rem 0.15rem;
}

.site-nav .menu a:hover,
.site-nav .menu a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/*
 * メインは全幅にグラデ。子の .site-main-inner だけ単色で塗るので、
 * 「コンテナより左右の余白」= main の背景がそのまま見える（透過・z-index に依存しない）。
 */
.site-main {
    position: relative;
    isolation: isolate;
    width: 100%;
    padding-top: clamp(100px, 12vw, 138px);
    background: none;
}

body.home .site-main {
    padding-top: 0;
}

body.page:not(.home) .site-header {
    top: clamp(10px, 1.6vw, 18px);
}

.site-main::before,
.site-main::after {
    content: none;
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(160px, 19vw, 280px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.82;
    background-image:
        linear-gradient(
            180deg,
            rgba(248, 253, 255, 0.36) 0%,
            rgba(188, 225, 255, 0.24) 35%,
            rgba(114, 174, 232, 0.12) 100%
        ),
        url("../images/hero-banner-bg-night-snow.png");
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    filter: saturate(0.96) contrast(1.2) brightness(1.06);
}

.site-main::before,
.site-main::after {
    box-shadow: inset 0 0 95px rgba(196, 228, 255, 0.22);
}

.site-main::before,
.site-main::after {
    /* 月明かりの冷たい反射 */
    background-blend-mode: screen, normal;
}

.site-main::before {
    background-image:
        radial-gradient(130% 80% at 8% 6%, rgba(245, 252, 255, 0.5) 0%, rgba(206, 234, 255, 0.24) 24%, transparent 56%),
        linear-gradient(
            180deg,
            rgba(248, 253, 255, 0.36) 0%,
            rgba(188, 225, 255, 0.24) 35%,
            rgba(114, 174, 232, 0.12) 100%
        ),
        url("../images/hero-banner-bg-night-snow.png");
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-size: cover, cover, cover;
}

.site-main::after {
    background-image:
        radial-gradient(130% 80% at 92% 6%, rgba(245, 252, 255, 0.5) 0%, rgba(206, 234, 255, 0.24) 24%, transparent 56%),
        linear-gradient(
            180deg,
            rgba(248, 253, 255, 0.36) 0%,
            rgba(188, 225, 255, 0.24) 35%,
            rgba(114, 174, 232, 0.12) 100%
        ),
        url("../images/hero-banner-bg-night-snow.png");
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-size: cover, cover, cover;
}

.site-main::before {
    left: 0;
    background-position: left top, left top, left center;
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 68%, transparent 100%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 68%, transparent 100%);
}

.site-main::after {
    right: 0;
    background-position: right top, right top, right center;
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 68%, transparent 100%);
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 68%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.site-main-inner {
    position: relative;
    z-index: 1;
    padding-top: 0;
    padding-bottom: 3rem;
    background-color: transparent;
}

body.home .site-main-inner {
    padding-top: 0;
}

/* 固定ページ（トップ以外）タイトル帯 — ヘッダー・フッターと同系統のグラデーション */
.page-content-header {
    margin: 0 0 1.25rem;
    padding: 1rem 1.15rem 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(126, 200, 255, 0.25);
    background:
        linear-gradient(
            120deg,
            rgba(34, 60, 102, 0.9) 0%,
            rgba(28, 49, 84, 0.92) 52%,
            rgba(22, 38, 67, 0.95) 100%
        );
    box-shadow: 0 6px 18px rgba(8, 14, 32, 0.22);
}

.page-content-header h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2.8vw, 1.85rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    letter-spacing: 0.02em;
}

/* フロントページ等: 連続する section の間隔 */
.site-main-inner > section + section {
    margin-top: 3rem;
}

.site-main-inner section h2 {
    margin: 0 0 1.35rem;
    display: block;
    width: 100%;
    padding: 0.72rem 1rem 0.78rem;
    border-radius: 12px;
    border: 1px solid rgba(126, 200, 255, 0.38);
    background:
        linear-gradient(
            120deg,
            rgba(34, 60, 102, 0.88) 0%,
            rgba(28, 49, 84, 0.9) 52%,
            rgba(22, 38, 67, 0.92) 100%
        );
    color: #eaf2ff;
    font-size: clamp(1.02rem, 1.2vw, 1.24rem);
    line-height: 1.3;
    letter-spacing: 0.02em;
    box-shadow:
        0 8px 20px rgba(8, 14, 32, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-main-inner section h2.mtl-front-section-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    overflow: visible;
}

/* LINE 風会話（mtl_line_chat）と同系の丸アイコン枠 */
.mtl-front-section-heading__line-avatar {
    flex-shrink: 0;
    width: clamp(2.1rem, 5.2vw, 2.75rem);
    height: clamp(2.1rem, 5.2vw, 2.75rem);
    border-radius: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.mtl-front-section-heading__line-avatar--hakase {
    border-color: transparent;
}

.mtl-front-section-heading__line-avatar--ringo {
    border-color: transparent;
}

.site-main-inner section h2.mtl-front-section-heading .mtl-front-section-heading__line-avatar-img {
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    max-width: none;
    object-fit: contain;
    object-position: center center;
    display: block;
    margin: 2px;
    background: transparent;
}

/* タイトル＋マスコットをまとめ、マスコットをタイトル直後に置く（残り余白はクラスタ右側へ） */
.mtl-front-section-heading__cluster {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1 1 auto;
    min-width: 0;
}

.mtl-front-section-heading__text {
    flex: 0 1 auto;
    min-width: 0;
}

.site-main-inner .card-grid + p,
.site-main-inner .topic-card-grid + p,
.site-main-inner .card-grid + .mtl-section-actions,
.site-main-inner .topic-card-grid + .mtl-section-actions {
    margin-top: 1.5rem;
}

/* フロント各セクション末尾の「一覧へ」（見出し h2・テック「さらに表示」と同系チップ） */
.site-main-inner .mtl-section-actions {
    margin-bottom: 0;
    text-align: center;
}

.site-main-inner .mtl-section-actions .button.mtl-section-cta {
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.72rem 1.25rem 0.78rem;
    border-radius: 12px;
    border: 1px solid rgba(126, 200, 255, 0.38);
    background:
        linear-gradient(
            120deg,
            rgba(34, 60, 102, 0.88) 0%,
            rgba(28, 49, 84, 0.9) 52%,
            rgba(22, 38, 67, 0.92) 100%
        );
    color: #eaf2ff;
    font-weight: 600;
    font-size: clamp(0.95rem, 2.2vw, 1.06rem);
    line-height: 1.3;
    letter-spacing: 0.02em;
    box-shadow:
        0 8px 20px rgba(8, 14, 32, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    -webkit-tap-highlight-color: transparent;
    transition:
        color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.site-main-inner .mtl-section-actions .button.mtl-section-cta:hover,
.site-main-inner .mtl-section-actions .button.mtl-section-cta:focus-visible {
    color: var(--accent);
    border-color: rgba(126, 200, 255, 0.52);
    box-shadow:
        0 10px 24px rgba(8, 14, 32, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.site-main-inner .mtl-section-actions .button.mtl-section-cta:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .site-main-inner .mtl-section-actions .button.mtl-section-cta {
        transition: none;
    }
}

.post-archive-pagination {
    margin-top: 1.5rem;
}

.post-archive-pagination .navigation.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
}

.post-archive-pagination .navigation.pagination a.page-numbers,
.post-archive-pagination .navigation.pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    min-height: 2.35rem;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
    border: 1px solid rgba(126, 200, 255, 0.35);
    background: rgba(22, 38, 67, 0.65);
    color: #eaf2ff;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.post-archive-pagination .navigation.pagination a.page-numbers:hover {
    background: rgba(44, 62, 108, 0.85);
    border-color: rgba(160, 210, 255, 0.55);
    color: #fff;
}

.post-archive-pagination .navigation.pagination span.page-numbers.current {
    background: var(--accent);
    border-color: rgba(200, 220, 255, 0.65);
    color: #0b1020;
}

.post-archive-pagination .navigation.pagination span.page-numbers.dots {
    min-width: auto;
    padding: 0.25rem 0.35rem;
    border: none;
    background: transparent;
    color: var(--muted);
    font-weight: 500;
}

/* プロフィール固定ページ: フロントの section h2 と同系の行背景 */
.mtl-profile-public {
    margin: 0 0 2rem;
}

.mtl-profile-public__photo-wrap {
    margin: 0 auto 1.25rem;
    display: block;
    width: fit-content;
    max-width: min(320px, 100%);
}

.mtl-profile-public__photo {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(126, 200, 255, 0.38);
    box-shadow:
        0 8px 20px rgba(8, 14, 32, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mtl-profile-public__list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.mtl-profile-row {
    margin: 0;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(126, 200, 255, 0.38);
    box-shadow:
        0 8px 20px rgba(8, 14, 32, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: grid;
    grid-template-columns: minmax(6.5rem, 30%) 1fr;
    gap: 0;
    align-items: stretch;
    overflow: hidden;
}

.mtl-profile-row__label {
    margin: 0;
    padding: 0.72rem 1rem 0.78rem;
    color: #d8e2ff;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background:
        linear-gradient(
            120deg,
            rgba(42, 68, 118, 0.95) 0%,
            rgba(32, 54, 96, 0.96) 55%,
            rgba(26, 44, 82, 0.97) 100%
        );
    border-right: 1px solid rgba(126, 200, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.mtl-profile-row__value {
    margin: 0;
    padding: 0.72rem 1rem 0.78rem;
    color: #eaf2ff;
    font-size: 0.98rem;
    line-height: 1.5;
    background: rgba(12, 16, 30, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mtl-profile-row__empty {
    color: var(--muted);
    font-style: normal;
}

@media (max-width: 520px) {
    .mtl-profile-row {
        grid-template-columns: 1fr;
    }

    .mtl-profile-row__label {
        border-right: none;
        border-bottom: 1px solid rgba(126, 200, 255, 0.22);
    }
}

.hero {
    padding: 0;
}

body.home .hero {
    margin-top: -2rem;
    margin-left: calc(clamp(0.85rem, 3.5vw, 1.5rem) * -1);
    margin-right: calc(clamp(0.85rem, 3.5vw, 1.5rem) * -1);
    margin-bottom: 0;
}

/* テキスト列 + キャラ列。左は 2 行（見出し／英字＋キャッチ）、右はキャラが 2 行ぶん */
.hero-banner {
    position: relative;
    border-radius: 16px;
    border: 1px solid #2d3f6e;
    background-color: #0d1528;
    /* フォールバックは色面のみ。景色画像は .hero-banner-decor::before 側で描画する */
    background-image: linear-gradient(160deg, #101d36 0%, #0d1528 56%, #0a1222 100%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    isolation: isolate;
    box-shadow: 0 14px 34px rgba(8, 14, 32, 0.45);
    min-height: clamp(210px, 36vw, 300px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: stretch;
    gap: 0 clamp(0.45rem, 1.2vw, 0.75rem);
    row-gap: 0;
    /* キャラはクリップ対象外（兄弟配置）。装飾のみ .hero-banner-decor 内で overflow */
    overflow: visible;
}

.hero-banner--no-visual {
    grid-template-columns: 1fr;
}

/* 背景・雪・シルエット・看板だけを角丸内にクリップ。キャラ列は外に出してもバナー全体では切らない */
.hero-banner-decor {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}

.hero-banner-home-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-snow-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
    background: transparent;
}

.hero-snow-layer::before,
.hero-snow-layer::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    /* モバイル実機（Android Chrome 等）: 強制カラー／合成で粒が黒く潰れるのを防ぐ */
    -webkit-forced-color-adjust: none;
    forced-color-adjust: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    mix-blend-mode: normal;
    isolation: isolate;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* スマホ: 装飾がキャラ行のみのため、タイトル行まで雪を載せる（PC・画像なしでは非表示） */
.hero-snow-layer--full-banner {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 5;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}

.hero-snow-layer--full-banner::before,
.hero-snow-layer--full-banner::after {
    will-change: auto;
    mix-blend-mode: normal;
    filter: none;
    isolation: isolate;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.hero-snow-layer--full-banner::before {
    background-image: url("../images/hero-snow-tile-a.svg");
    background-size: 132px 132px;
    background-position: 0 0;
    background-repeat: repeat;
    opacity: 0.58;
    -webkit-animation: mtl-snow-fb-svg-a 44s linear infinite;
    animation: mtl-snow-fb-svg-a 44s linear infinite;
}

.hero-snow-layer--full-banner::after {
    background-image: url("../images/hero-snow-tile-b.svg");
    background-size: 168px 168px;
    background-position: 22px -40px;
    background-repeat: repeat;
    opacity: 0.22;
    visibility: visible;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-animation: mtl-snow-fb-svg-b 64s linear infinite;
    animation: mtl-snow-fb-svg-b 64s linear infinite;
}

/* エゾシカ・うさぎシルエット（装飾・タップは下のホームリンクへ透過） */
.hero-wildlife {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.hero-wildlife-deer,
.hero-wildlife-rabbit {
    position: absolute;
    display: block;
    color: rgba(24, 30, 44, 0.42);
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45));
}

.hero-wildlife-deer {
    width: clamp(52px, 12vw, 88px);
    height: auto;
    right: 36%;
    bottom: 20%;
    transform: scaleX(-1);
}

.hero-wildlife-rabbit {
    width: clamp(20px, 6vw, 36px);
    height: auto;
    left: 7%;
    bottom: 11%;
    color: rgba(28, 34, 48, 0.48);
}

/* 明かりの小屋は元画像で右側。::before が scaleX(-1) のため画面上は左寄り。看板は月明かりの当たる屋根面に沿う位置・ほぼ水平 */
.hero-cottage-sign {
    pointer-events: none;
    position: absolute;
    display: inline-block;
    z-index: 4;
    left: 13.25%;
    top: 66.4%;
    transform: rotate(-0.1deg) scale(1.2);
    transform-origin: 50% 50%;
    padding: 0.56rem 0.62rem 0.26rem;
    min-width: 9.4rem;
    font-size: clamp(0.54rem, 1.2vw, 0.78rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #9eb4c9;
    line-height: 1.2;
    white-space: nowrap;
    background:
        /* 雪の上辺を不揃いに見せる（高さを明確化） */
        radial-gradient(32% 84% at 5% -34%, rgba(173, 197, 220, 0.96) 0 63%, rgba(173, 197, 220, 0) 69%),
        radial-gradient(15% 54% at 15% -6%, rgba(156, 183, 208, 0.91) 0 58%, rgba(156, 183, 208, 0) 66%),
        radial-gradient(36% 102% at 32% -46%, rgba(170, 194, 218, 0.97) 0 62%, rgba(170, 194, 218, 0) 69%),
        radial-gradient(16% 48% at 45% -1%, rgba(146, 173, 198, 0.9) 0 56%, rgba(146, 173, 198, 0) 64%),
        radial-gradient(34% 94% at 58% -40%, rgba(169, 193, 218, 0.97) 0 63%, rgba(169, 193, 218, 0) 69%),
        radial-gradient(13% 42% at 70% 1%, rgba(142, 168, 193, 0.88) 0 54%, rgba(142, 168, 193, 0) 62%),
        radial-gradient(32% 86% at 84% -34%, rgba(168, 193, 218, 0.96) 0 62%, rgba(168, 193, 218, 0) 69%),
        radial-gradient(12% 38% at 94% 2%, rgba(136, 162, 188, 0.88) 0 53%, rgba(136, 162, 188, 0) 61%),
        linear-gradient(180deg, rgba(150, 175, 200, 0.52) 0 28%, rgba(150, 175, 200, 0) 54%),
        repeating-linear-gradient(
            90deg,
            rgba(126, 94, 62, 0.3) 0 6px,
            rgba(88, 64, 42, 0.26) 6px 12px
        ),
        linear-gradient(180deg, #5d4630 0%, #4d3928 58%, #3f2f21 100%);
    border: 1px solid rgba(23, 15, 10, 0.9);
    border-radius: 3px;
}

.hero-cottage-sign__label {
    display: block;
    position: relative;
    color: rgba(58, 38, 24, 0.94);
    /* 明るい縁と暗い底影で、板へ彫り込んだ凹み感を作る */
    text-shadow:
        0 -1px 0 rgba(188, 155, 126, 0.34),
        0 1px 0 rgba(34, 22, 14, 0.7),
        0 2px 2px rgba(20, 14, 10, 0.44),
        -0.4px 0 rgba(47, 31, 20, 0.42),
        0.4px 0 rgba(176, 144, 112, 0.2);
    opacity: 0.93;
    letter-spacing: 0.115em;
}

.hero-cottage-sign::before,
.hero-cottage-sign::after {
    content: "";
    position: absolute;
    top: calc(100% - 1px);
    width: clamp(3px, 0.34vw, 5px);
    height: clamp(24px, 3.1vw, 38px);
    border-radius: 2px;
    background: linear-gradient(180deg, #5d4832 0%, #4c3927 52%, #3f2e1f 100%);
    border: 1px solid rgba(36, 24, 14, 0.56);
}

.hero-cottage-sign::before {
    left: 14%;
}

.hero-cottage-sign::after {
    right: 14%;
}

.hero-cottage-snowmen {
    pointer-events: none;
    position: absolute;
    z-index: 5;
    width: clamp(118px, 16.2vw, 200px);
    height: auto;
    left: calc(11% + 6px);
    top: auto;
    bottom: 150px;
    transform: translateY(0.55rem);
    transform-origin: center bottom;
    opacity: 0.93;
    filter: drop-shadow(0 2px 4px rgba(4, 14, 32, 0.14));
}

.hero-banner-update {
    display: none;
}

/* 合掌写真：透過 PNG。枠は cover で常に塗る。位置は object-position（translate は見切れ・隙間の原因になるので使わない）。色は filter は inner のみ */
.hero-village-embed {
    display: none;
}

@media (min-width: 641px) {
    .hero-village-embed {
        display: block;
        position: relative;
        z-index: 1;
        align-self: center;
        width: min(13.5rem, 100%);
        margin: 0.12rem auto;
        line-height: 0;
        pointer-events: none;
        isolation: isolate;
        transform: translate(80px, 40px);
    }

    .hero-village-embed__inner {
        width: 100%;
        aspect-ratio: 37 / 25;
        border-radius: 12px;
        overflow: hidden;
        filter: brightness(0.74) contrast(1.06) saturate(0.42) hue-rotate(-42deg);
        -webkit-forced-color-adjust: none;
        forced-color-adjust: none;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    .hero-village-embed__img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 50% 50%;
        vertical-align: bottom;
        opacity: 0.86;
        transform: scale(1.06);
        transform-origin: center center;
        -webkit-forced-color-adjust: none;
        forced-color-adjust: none;
    }
}

.hero-banner-decor > .hero-snow-layer {
    display: none;
}

.hero-snow-layer::before {
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 2.6px, transparent 3.4px),
        radial-gradient(circle, rgba(220, 238, 255, 0.9) 0 2.1px, transparent 2.9px),
        radial-gradient(circle, rgba(255, 255, 255, 0.84) 0 1.8px, transparent 2.4px);
    background-size: 190px 190px, 142px 142px, 108px 108px;
    background-position: 0 -200px, 65px -175px, 28px -130px;
    background-repeat: repeat;
    -webkit-animation: mtl-snow-fall 15s linear infinite;
    animation: mtl-snow-fall 15s linear infinite;
    opacity: 0.78;
    will-change: transform;
}

.hero-snow-layer::after {
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 3.4px, transparent 4.2px),
        radial-gradient(circle, rgba(214, 234, 255, 0.82) 0 2.3px, transparent 3.1px);
    background-size: 350px 350px, 250px 250px;
    background-position: 42px -260px, 100px -205px;
    background-repeat: repeat;
    -webkit-animation: mtl-snow-fall 34s linear infinite;
    animation: mtl-snow-fall 34s linear infinite;
    opacity: 0.42;
    will-change: transform;
}

/* キーフレームは transform のみ（-webkit-transform と併記すると一部環境で合成が乱れることがある） */
@-webkit-keyframes mtl-snow-fall {
    from {
        transform: translate3d(0, -18px, 0);
    }
    to {
        transform: translate3d(0, 210px, 0);
    }
}

@keyframes mtl-snow-fall {
    from {
        transform: translate3d(0, -18px, 0);
    }
    to {
        transform: translate3d(0, 210px, 0);
    }
}

/* 全面雪（スマホ）: SVG タイルを縦スクロール（CSS グラデは Android で黒潰れするため使わない） */
@-webkit-keyframes mtl-snow-fb-svg-a {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 0 300px;
    }
}

@keyframes mtl-snow-fb-svg-a {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 0 300px;
    }
}

@-webkit-keyframes mtl-snow-fb-svg-b {
    from {
        background-position: 22px -40px;
    }
    to {
        background-position: 22px 320px;
    }
}

@keyframes mtl-snow-fb-svg-b {
    from {
        background-position: 22px -40px;
    }
    to {
        background-position: 22px 320px;
    }
}


/* 景色だけ左右反転（茅葺きをテキスト側へ／キャラと被らないように） */
.hero-banner-decor::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background-image: url("../images/hero-banner-bg-night-snow.png");
    background-repeat: no-repeat;
    background-position: center 62%;
    background-size: cover;
    transform: scaleX(-1);
    pointer-events: none;
}

.hero-banner-decor::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background-image:
        radial-gradient(
            72% 56% at 30% 26%,
            rgba(230, 244, 255, 0.34) 0%,
            rgba(175, 216, 250, 0.2) 28%,
            transparent 62%
        ),
        linear-gradient(
            152deg,
            rgba(10, 15, 31, 0.2) 0%,
            rgba(14, 21, 44, 0.18) 38%,
            rgba(18, 28, 52, 0.16) 72%,
            rgba(12, 20, 42, 0.28) 100%
        ),
        linear-gradient(
            90deg,
            rgba(6, 10, 22, 0.46) 0%,
            rgba(6, 10, 22, 0.24) 22%,
            rgba(6, 10, 22, 0.08) 44%,
            transparent 66%
        );
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: 28% 30%, center, center;
    background-size: cover, cover, cover;
    pointer-events: none;
}

.hero-banner-image-wrap {
    position: relative;
    z-index: 6;
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    align-self: stretch;
    display: grid;
    align-items: end;
    justify-items: end;
    /* テキスト列との間隔（装飾は .hero-banner-decor のみクリップ） */
    padding: 0 clamp(12px, 2.5vw, 28px) 0 0;
    min-height: 0;
    height: 100%;
    line-height: 0;
}

/* お腹下。横は画像中心よりやや左（48%）で、正回転時に上体が右へ出る量が増えて見えやすい */
.hero-banner-image-pivot {
    display: block;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    transform-origin: 48% 64%;
    animation: mtl-hero-breathe 8.5s ease-in-out infinite;
    will-change: transform;
    backface-visibility: hidden;
}

@keyframes mtl-hero-breathe {
    0%,
    100% {
        transform: translateZ(0) rotate(-5deg);
    }
    50% {
        transform: translateZ(0) rotate(15deg);
    }
}

.hero-banner-image {
    display: block;
    width: auto;
    max-width: min(50vw, 440px);
    max-height: 100%;
    height: auto;
    object-fit: contain;
    object-position: right bottom;
    margin-bottom: -14px;
    /* 少し左へ（テキストとのバランス・右振りの余裕） */
    transform: translateX(clamp(-18px, -2vw, -8px));
    /* 回転親と組み合わせると重いためブラーを抑える */
    filter: drop-shadow(0 6px 10px rgba(6, 10, 22, 0.38));
}

.hero-banner-content {
    position: relative;
    z-index: 3;
    margin: 0 0 0.62rem 0.85rem;
    transform: none;
    padding: 0.5rem 1.25rem 0.6rem;
    max-width: min(730px, 100%);
    min-width: 0;
    border: 1px solid rgba(180, 210, 255, 0.28);
    border-radius: 14px;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.hero-banner-badge {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #d8ecff;
    background: rgba(126, 200, 255, 0.2);
    border: 1px solid rgba(126, 200, 255, 0.45);
    border-radius: 999px;
    padding: 0.16rem 0.56rem;
    margin-bottom: 0.46rem;
}

.hero-banner h1,
.hero-banner-title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.65rem, 3.4vw, 2.55rem);
    line-height: 1.28;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.55),
        0 4px 28px rgba(0, 0, 0, 0.5);
    word-break: keep-all;
    line-break: strict;
    overflow-wrap: normal;
}

/* 「ましろAIツール研究所」と英字サブタイトルの間を段落のように空ける */
.hero-banner-title-primary {
    display: block;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    margin-bottom: 0.55em;
    line-height: 1.25;
    word-break: keep-all;
    line-break: strict;
}

.hero-banner-title-primary:only-child {
    margin-bottom: 0;
}

.hero-banner-title-sub {
    display: block;
    margin-top: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: clamp(1.12rem, 2.35vw, 1.75rem);
    font-weight: 700;
    letter-spacing: 0.065em;
    color: #e2ebff;
    line-height: 1.38;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.55),
        0 3px 22px rgba(0, 0, 0, 0.45),
        0 0 24px rgba(130, 180, 255, 0.18);
    overflow-wrap: break-word;
    word-break: normal;
}

/* サイトキャッチ：サブタイトルより一段抑えた同系トーン（色・影・フォントスタック） */
.hero-banner-tagline {
    margin: 0;
    font-family:
        "Plus Jakarta Sans",
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        "Hiragino Sans",
        "Hiragino Kaku Gothic ProN",
        "Yu Gothic UI",
        YuGothic,
        Meiryo,
        sans-serif;
    font-size: clamp(1.02rem, 1.85vw, 1.14rem);
    font-weight: 500;
    letter-spacing: 0.028em;
    line-height: 1.55;
    color: #d6e3ff;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.5),
        0 2px 16px rgba(0, 0, 0, 0.42),
        0 0 18px rgba(130, 180, 255, 0.1);
    overflow-wrap: break-word;
    word-break: break-word;
}

/* 英字サブ＋キャッチ：PC・タブレットは左列の通常フロー（641px 超）。スマホ＋画像ありは下記でキャラ左下に重ねる */
.hero-banner-secondary {
    align-self: flex-start;
    position: static;
    z-index: 3;
    margin: 0.12rem 0 0.62rem 0.85rem;
    padding: 0 1.25rem 0;
    max-width: min(730px, 100%);
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: auto;
}

.hero-banner-secondary a {
    pointer-events: auto;
}

.hero-banner-secondary .hero-banner-tagline:empty {
    display: none;
}

.hero-banner-secondary .hero-banner-title-sub + .hero-banner-tagline {
    margin-top: 0.32rem;
}

/* PC・タブレット：左の見出し＋サブをまとめてバナー下辺に寄せる（641px 超）。スマホは display:contents で子をグリッドに直接載せる */
@media (min-width: 641px) {
    .hero-banner-update {
        position: static;
        z-index: 4;
        display: flex;
        flex-direction: column;
        gap: 0.28rem;
        padding: 0.56rem 0.85rem 0.62rem;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-top: clamp(0.18rem, 0.9vw, 0.45rem);
        border: 2px solid rgba(208, 232, 255, 0.44) !important;
        border-radius: 10px;
        background: rgba(8, 16, 32, 0.34) !important;
        box-shadow:
            0 16px 36px rgba(2, 6, 16, 0.48),
            0 4px 14px rgba(6, 14, 30, 0.3),
            0 0 0 1px rgba(186, 220, 255, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.26),
            inset 0 -1px 0 rgba(18, 36, 66, 0.28) !important;
        backdrop-filter: blur(6px) saturate(1.12) !important;
        -webkit-backdrop-filter: blur(6px) saturate(1.12) !important;
        overflow: hidden;
        pointer-events: auto;
    }

    .hero-banner-update::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.16) 0%,
            rgba(255, 255, 255, 0.06) 34%,
            rgba(255, 255, 255, 0.01) 62%
        );
        opacity: 0.65;
    }

    .hero-banner-update__label {
        display: block;
        width: auto;
        font-size: 0.76rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        color: #d8ecff;
        line-height: 1.2;
        user-select: none;
        margin-inline: 0;
        padding: 0 0 0.12rem 0.52rem;
        border-radius: 0;
        background: transparent;
        border-left: 3px solid rgb(58, 128, 198);
    }

    body.logged-in .hero-banner-update-adjuster {
        position: absolute;
        right: clamp(0.6rem, 1.5vw, 1rem);
        bottom: clamp(0.55rem, 1.4vw, 0.9rem);
        z-index: 6;
        padding: 0.45rem 0.5rem;
        border-radius: 10px;
        border: 1px solid rgba(160, 205, 255, 0.4);
        background: rgba(9, 16, 30, 0.56);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.32);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

    body.logged-in .hero-banner-update-adjuster__title {
        margin: 0 0 0.32rem;
        font-size: 0.66rem;
        color: #d8ecff;
        line-height: 1.2;
        text-align: center;
    }

    body.logged-in .hero-banner-update-adjuster__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.26rem;
    }

    body.logged-in .hero-banner-update-adjuster__btn,
    body.logged-in .hero-banner-update-adjuster__action {
        border: 1px solid rgba(168, 210, 255, 0.45);
        background: rgba(22, 42, 76, 0.76);
        color: #edf6ff;
        font-size: 0.72rem;
        line-height: 1;
        border-radius: 7px;
        padding: 0.24rem 0.42rem;
        cursor: pointer;
    }

    body.logged-in .hero-banner-update-adjuster__actions {
        margin-top: 0.3rem;
        display: flex;
        justify-content: center;
    }

    body.logged-in .hero-banner-update-adjuster__btn:hover,
    body.logged-in .hero-banner-update-adjuster__action:hover {
        background: rgba(34, 66, 120, 0.85);
    }

    .hero-banner-update__list {
        margin: 0.06rem 0 0;
        margin-inline: -0.85rem;
        padding: 0.34rem 0.85rem 0;
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 0.34rem;
        border-top: 2px solid rgba(208, 232, 255, 0.32);
    }

    .hero-banner-update__item {
        min-width: 0;
    }

    .hero-banner-update__link {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        min-width: 0;
        color: #edf5ff;
        text-decoration: none;
    }

    .hero-banner-update__kind {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.12rem 0.38rem;
        border-radius: 999px;
        font-size: 0.62rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        color: #e4f3ff;
        border: 1px solid rgba(168, 218, 255, 0.45);
        background: rgba(36, 78, 136, 0.5);
        line-height: 1.15;
    }

    .hero-banner-update__kind--software {
        border-color: rgba(172, 255, 229, 0.44);
        background: rgba(37, 112, 94, 0.54);
    }

    .hero-banner-update__date {
        flex-shrink: 0;
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        color: #9fd0ff;
        line-height: 1.3;
    }

    .hero-banner-update__title {
        min-width: 0;
        font-size: 0.92rem;
        font-weight: 600;
        line-height: 1.4;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-banner-update__link:hover .hero-banner-update__title,
    .hero-banner-update__link:focus-visible .hero-banner-update__title {
        text-decoration: underline;
        text-underline-offset: 0.12em;
    }

    .hero-banner-text-stack {
        grid-column: 1;
        grid-row: 1 / span 2;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-self: stretch;
        min-width: 0;
        min-height: 0;
        z-index: 3;
        position: relative;
        row-gap: 0.62rem;
        /* 左上の余白を揃え、タイトルの下に更新情報を置く */
        --mtl-hero-pc-text-inset: clamp(0.9rem, 1.85vw, 1.25rem);
        margin-left: var(--mtl-hero-pc-text-inset);
        margin-top: var(--mtl-hero-pc-text-inset);
        margin-bottom: 0;
        width: min(74ch, 68vw);
        max-width: min(84ch, 72vw);
    }

    .hero-banner-text-stack .hero-banner-content {
        margin-bottom: 0;
        margin-left: 0;
    }

    .hero-banner-text-stack .hero-banner-secondary {
        position: relative;
        z-index: 4;
        margin-top: auto;
        margin-inline: clamp(0.85rem, 2.8vw, 1.5rem);
        margin-bottom: clamp(0.95rem, 2.6vw, 1.55rem);
        align-self: stretch;
        width: 100%;
        max-width: none;
        padding: 0.56rem 0.85rem 0.62rem;
        box-sizing: border-box;
        align-items: center;
        text-align: center;
        border: 2px solid rgba(208, 232, 255, 0.44) !important;
        border-radius: 10px;
        background: rgba(8, 16, 32, 0.34) !important;
        box-shadow:
            0 16px 36px rgba(2, 6, 16, 0.48),
            0 4px 14px rgba(6, 14, 30, 0.3),
            0 0 0 1px rgba(186, 220, 255, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.26),
            inset 0 -1px 0 rgba(18, 36, 66, 0.28) !important;
        backdrop-filter: blur(6px) saturate(1.12) !important;
        -webkit-backdrop-filter: blur(6px) saturate(1.12) !important;
        overflow: hidden;
        pointer-events: auto;
    }

    .hero-banner-text-stack .hero-banner-secondary::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        border-radius: inherit;
        background: linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.16) 0%,
            rgba(255, 255, 255, 0.06) 34%,
            rgba(255, 255, 255, 0.01) 62%
        );
        opacity: 0.65;
    }

    .hero-banner-text-stack .hero-banner-secondary .hero-banner-title-sub,
    .hero-banner-text-stack .hero-banner-secondary .hero-banner-tagline {
        position: relative;
        z-index: 1;
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .hero-banner-text-stack {
        display: contents;
    }
}

.hero-menu-nav {
    margin: 0 0 1.2rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid #2d3f6e;
    border-radius: 12px;
    background: rgba(12, 21, 42, 0.92);
}

.hero-menu-nav .menu {
    list-style: none;
    margin: 0;
    padding: 0.52rem 0.85rem 0.56rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem 1rem;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(126, 200, 255, 0.38);
    background:
        linear-gradient(
            120deg,
            rgba(34, 60, 102, 0.88) 0%,
            rgba(28, 49, 84, 0.9) 52%,
            rgba(22, 38, 67, 0.92) 100%
        );
    box-shadow:
        0 8px 20px rgba(8, 14, 32, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-menu-nav .menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-block;
    padding: 0.1rem 0.15rem;
}

.hero-menu-nav .menu li + li {
    border-left: 1px solid rgba(126, 200, 255, 0.35);
    padding-left: 0.8rem;
}

.hero-menu-nav .menu a:hover,
.hero-menu-nav .menu a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* ワイド画面: アコーディオン用 summary を隠し、パネルをレイアウトに直接参加させる */
@media (min-width: 1025px) {
    .mtl-primary-nav-accordion__summary {
        display: none !important;
    }

    .mtl-primary-nav-accordion__panel {
        display: contents;
    }
}

/* タブレット・スマホ: 縦並び＋開閉トグル（details） */
@media (max-width: 1024px) {
    .mtl-primary-nav-accordion {
        width: 100%;
        max-width: 100%;
    }

    .mtl-primary-nav-accordion__summary {
        list-style: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.62rem 0.95rem;
        margin: 0;
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--text);
        border-radius: 10px;
        border: 1px solid rgba(126, 200, 255, 0.38);
        background:
            linear-gradient(
                120deg,
                rgba(34, 60, 102, 0.88) 0%,
                rgba(28, 49, 84, 0.9) 52%,
                rgba(22, 38, 67, 0.92) 100%
            );
        box-shadow:
            0 6px 16px rgba(8, 14, 32, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mtl-primary-nav-accordion__summary::-webkit-details-marker {
        display: none;
    }

    .mtl-primary-nav-accordion__summary::after {
        content: '';
        flex-shrink: 0;
        width: 0.45rem;
        height: 0.45rem;
        margin-top: -0.2em;
        border-right: 2px solid rgba(200, 216, 255, 0.85);
        border-bottom: 2px solid rgba(200, 216, 255, 0.85);
        transform: rotate(45deg);
        transition: transform 0.2s ease;
    }

    .mtl-primary-nav-accordion[open] > .mtl-primary-nav-accordion__summary::after {
        transform: rotate(-135deg);
        margin-top: 0.15em;
    }

    @media (prefers-reduced-motion: reduce) {
        .mtl-primary-nav-accordion__summary::after {
            transition: none;
        }
    }

    .mtl-primary-nav-accordion__summary:hover,
    .mtl-primary-nav-accordion__summary:focus-visible {
        color: var(--accent);
    }

    .mtl-primary-nav-accordion__summary:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

    .hero-menu-nav .mtl-primary-nav-accordion__panel .menu,
    .site-nav .mtl-primary-nav-accordion__panel .menu {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 0;
        margin-top: 0.45rem;
        padding: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        border-radius: 10px;
        border: 1px solid rgba(126, 200, 255, 0.28);
        background: rgba(10, 18, 36, 0.55);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    /* 外枠は .hero-menu-nav のまま、内側の二重ボックスだけ抑える */
    .hero-menu-nav .menu {
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .hero-menu-nav .menu li + li,
    .site-nav .menu li + li {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(126, 200, 255, 0.22);
    }

    .hero-menu-nav .menu a,
    .site-nav .menu a {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 0.68rem 0.95rem;
    }

    .hero-menu-nav .menu .sub-menu,
    .site-nav .menu .sub-menu {
        list-style: none;
        margin: 0;
        padding: 0 0 0.35rem;
        border-top: 1px solid rgba(126, 200, 255, 0.12);
        background: rgba(6, 12, 26, 0.45);
    }

    .hero-menu-nav .menu .sub-menu a,
    .site-nav .menu .sub-menu a {
        padding-left: 1.35rem;
        font-size: 0.9rem;
        font-weight: 500;
    }

    .hero-menu-nav .menu .sub-menu li + li,
    .site-nav .menu .sub-menu li + li {
        border-top: 1px solid rgba(126, 200, 255, 0.1);
    }

    .site-nav {
        width: 100%;
    }
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.35rem;
}

/* ソフト一覧: 件数が少なくても最大 3 列（1 件＝1 マス分の幅に収まる） */
.card-grid.card-grid--software {
    grid-template-columns: 1fr;
}

@media (min-width: 560px) {
    .card-grid.card-grid--software {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .card-grid.card-grid--software {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.card {
    background: var(--card);
    border: 1px solid #2a3254;
    border-radius: 12px;
    padding: 1rem;
}

.button {
    display: inline-block;
    text-decoration: none;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    border: 1px solid #3b4674;
    margin-right: 0.5rem;
}

.button-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.software-cta {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

/* ソフト CTA: サイトのアクセント（--accent）で Primary / Secondary を統一 */
.software-cta .button {
    margin-right: 0;
    font-weight: 600;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.software-cta .button-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.software-cta .button-primary:hover {
    background: #8aa3ff;
    border-color: #8aa3ff;
    color: #fff;
}

.software-cta .button-primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.software-cta .button-software-secondary {
    color: var(--text);
    background: rgba(110, 140, 255, 0.14);
    border: 1px solid rgba(110, 140, 255, 0.55);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.software-cta .button-software-secondary:hover {
    background: rgba(110, 140, 255, 0.26);
    border-color: var(--accent);
    color: #fff;
}

.software-cta .button-software-secondary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ソフト詳細: タイトル帯（会話枠・記事末ソフトリンクと同系・やや明るめ） */
.software-single-header {
    margin: 0 0 1.25rem;
    padding: 1.05rem 1.15rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(150, 210, 255, 0.32);
    background: linear-gradient(
        155deg,
        rgba(44, 62, 108, 0.78) 0%,
        rgba(30, 42, 78, 0.85) 52%,
        rgba(22, 32, 58, 0.9) 100%
    );
    box-shadow:
        0 4px 18px rgba(8, 14, 32, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.software-single-title {
    margin: 0;
    font-size: clamp(1.22rem, 3.1vw, 1.62rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: var(--text);
}

.software-screenshots {
    margin: 0 0 1.5rem;
}

.software-screenshots__heading {
    margin: 0 0 0.85rem;
    font-size: clamp(1.02rem, 2.4vw, 1.15rem);
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.02em;
}

.software-screenshots__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
}

.software-screenshots__item {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #2a3254;
    background: #11172b;
    box-shadow: 0 4px 14px rgba(8, 14, 32, 0.2);
}

.software-screenshots__trigger {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    font: inherit;
    color: inherit;
    line-height: 0;
    border-radius: inherit;
    -webkit-tap-highlight-color: transparent;
}

.software-screenshots__trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.software-screenshots__trigger:hover .software-screenshots__img {
    opacity: 0.92;
}

.software-screenshots__img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
}

/* ソフト詳細: スクリーンショット拡大（<dialog> ライトボックス） */
.mtl-screenshot-lightbox {
    padding: 0;
    border: none;
    background: transparent;
    margin: auto;
    max-width: min(96vw, 1400px);
    max-height: 92vh;
    box-shadow: none;
}

.mtl-screenshot-lightbox::backdrop {
    background: rgba(6, 10, 22, 0.82);
    backdrop-filter: blur(3px);
}

.mtl-screenshot-lightbox__wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
    max-width: min(96vw, 1400px);
    max-height: 92vh;
}

.mtl-screenshot-lightbox__close-form {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 2;
    margin: 0;
    padding: 0;
    border: 0;
}

.mtl-screenshot-lightbox__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(200, 220, 255, 0.45);
    background: rgba(12, 18, 36, 0.88);
    color: #eaf2ff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.mtl-screenshot-lightbox__close:hover {
    background: rgba(44, 62, 108, 0.95);
    color: #fff;
}

.mtl-screenshot-lightbox__close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.mtl-screenshot-lightbox__img {
    display: block;
    max-width: min(96vw, 1400px);
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #2a3254;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.topic-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.35rem;
}

.topic-card {
    background: var(--card);
    border: 1px solid #2a3254;
    border-radius: 12px;
    overflow: hidden;
}

/* 枠で 16:9 を固定（WP が付ける img の width/height 属性の比率が違っても見た目は揃う） */
.topic-thumb-link {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    line-height: 0;
    background: #11172b;
}

.topic-thumb-link img.topic-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.topic-thumb-placeholder {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    background: #11172b;
    border-bottom: 1px solid #2a3254;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

/* 記事末のソフト詳細リンク（ショートコード mtl_remover_link 等）— タイトル帯と同系 */
.mtl-post-software-link-wrap {
    margin: 1.75rem 0 0;
    padding: 1.1rem 1rem 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(150, 210, 255, 0.32);
    background: linear-gradient(
        155deg,
        rgba(44, 62, 108, 0.78) 0%,
        rgba(30, 42, 78, 0.85) 52%,
        rgba(22, 32, 58, 0.9) 100%
    );
    box-shadow:
        0 4px 18px rgba(8, 14, 32, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
}

.mtl-post-software-link-wrap .mtl-post-software-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    color: #f7fbff;
    background: var(--accent);
    border: 1px solid rgba(160, 190, 255, 0.65);
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(0, 0, 0, 0.12) inset;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.mtl-post-software-link-wrap .mtl-post-software-link:hover {
    background: #8aa3ff;
    border-color: rgba(200, 220, 255, 0.85);
    color: #fff;
}

.mtl-post-software-link-wrap .mtl-post-software-link:focus-visible {
    outline: 2px solid rgba(130, 200, 255, 0.75);
    outline-offset: 3px;
}

.topic-card-body {
    padding: 0.8rem 1rem 1rem;
}

.topic-title {
    color: var(--text);
    text-decoration: none;
    display: block;
    margin-bottom: 0.45rem;
    line-height: 1.45;
}

.topic-meta {
    color: var(--muted);
    font-size: 0.88rem;
}

/* フロント「ましろ博士の開発者ブログ」カードの抜粋 */
.topic-card-excerpt {
    margin: 0.4rem 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--muted);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

/* ブログ一覧（/blog/ 等）: 縦リスト・左サムネ */
.post-archive-rows {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.post-archive-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem 1.15rem;
    margin: 0;
    padding: 0.65rem 0.9rem;
    background: var(--card);
    border: 1px solid #2a3254;
    border-radius: 12px;
    overflow: hidden;
}

.post-archive-thumb-link.topic-thumb-link {
    flex: 0 0 clamp(5.75rem, 24vw, 11.5rem);
    width: clamp(5.75rem, 24vw, 11.5rem);
}

.post-archive-body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.15rem 0;
}

.post-archive-title {
    display: block;
    margin: 0 0 0.35rem;
    font-size: clamp(1rem, 2.5vw, 1.14rem);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    text-decoration: none;
}

.post-archive-title:hover {
    color: #b8c8ff;
}

.post-archive-meta {
    display: block;
}

.post-archive-excerpt {
    margin: 0.45rem 0 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--muted);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

/* ソフト一覧アーカイブ（見出し下のリード） */
.software-archive-list .software-archive-lead {
    margin: -0.35rem 0 1.25rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 今日のおすすめテック情報: 18件・広い画面は初期9件、狭い画面は初期3件→さらに表示で+6→全件（data-tech-phase） */
@media (max-width: 1024px) {
    .tech-topics[data-tech-phase='0'] .tech-topics-grid .topic-card:nth-child(n + 4) {
        display: none;
    }

    .tech-topics[data-tech-phase='1'] .tech-topics-grid .topic-card:nth-child(n + 10) {
        display: none;
    }
}

@media (min-width: 1025px) {
    .tech-topics[data-tech-phase='0'] .tech-topics-grid .topic-card:nth-child(n + 10) {
        display: none;
    }
}

.tech-topics-actions {
    margin-top: 1.25rem;
    margin-bottom: 0;
    text-align: center;
}

button.button.tech-topics-toggle {
    cursor: pointer;
    font: inherit;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.72rem 1.25rem 0.78rem;
    border-radius: 12px;
    border: 1px solid rgba(126, 200, 255, 0.38);
    background:
        linear-gradient(
            120deg,
            rgba(34, 60, 102, 0.88) 0%,
            rgba(28, 49, 84, 0.9) 52%,
            rgba(22, 38, 67, 0.92) 100%
        );
    color: #eaf2ff;
    font-weight: 600;
    font-size: clamp(0.95rem, 2.2vw, 1.06rem);
    line-height: 1.3;
    letter-spacing: 0.02em;
    box-shadow:
        0 8px 20px rgba(8, 14, 32, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    -webkit-tap-highlight-color: transparent;
    transition:
        color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

button.button.tech-topics-toggle::after {
    content: '';
    flex-shrink: 0;
    width: 0.42rem;
    height: 0.42rem;
    margin-top: -0.15em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.88;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.tech-topics.tech-topics--toggle-collapse button.button.tech-topics-toggle::after {
    transform: rotate(-135deg);
    margin-top: 0.12em;
}

@media (prefers-reduced-motion: reduce) {
    button.button.tech-topics-toggle,
    button.button.tech-topics-toggle::after {
        transition: none;
    }
}

button.button.tech-topics-toggle:hover,
button.button.tech-topics-toggle:focus-visible {
    color: var(--accent);
    border-color: rgba(126, 200, 255, 0.52);
    box-shadow:
        0 10px 24px rgba(8, 14, 32, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

button.button.tech-topics-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.tech-topics.tech-topics--toggle-collapse button.button.tech-topics-toggle {
    box-shadow:
        0 6px 18px rgba(8, 14, 32, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 0 0 1px rgba(110, 140, 255, 0.2);
}

@media (max-width: 1024px) {
    button.button.tech-topics-toggle {
        width: 100%;
        max-width: 100%;
        font-size: clamp(0.95rem, 2.9vw, 1.06rem);
    }
}

/* プライバシー・利用規約（準備中）テンプレート */
.mtl-legal-placeholder-sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 46rem;
}

.mtl-legal-placeholder-block {
    margin: 0;
    padding: 1rem 1.15rem 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(126, 200, 255, 0.32);
    background: var(--card);
    box-shadow: 0 6px 18px rgba(8, 14, 32, 0.22);
}

.mtl-legal-placeholder-block h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1rem, 2.2vw, 1.12rem);
    font-weight: 600;
    color: #eaf2ff;
    letter-spacing: 0.02em;
}

.mtl-legal-placeholder-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.55;
}

/* 問い合わせ・ご意見フォーム: assets/css/contact-forms.css（該当テンプレートのみ enqueue） */

.post-featured-image-wrap {
    margin: 0 0 1.2rem;
}

.post-featured-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #2a3254;
}

.post-single {
    max-width: 46rem;
}

.post-single-header {
    margin-bottom: 1.25rem;
}

.post-single-header h1 {
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.post-single-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.post-single-content {
    margin-top: 0.5rem;
}

.post-single-content > *:first-child {
    margin-top: 0;
}

.post-page-nav {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #2a3254;
    color: var(--muted);
    font-size: 0.9rem;
}

.post-single-bottom-nav {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid #2a3254;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
}

.post-single-bottom-nav__item--prev {
    justify-self: start;
}

.post-single-bottom-nav__item--index {
    justify-self: center;
}

.post-single-bottom-nav__item--next {
    justify-self: end;
}

.post-single-bottom-nav__pager {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
}

.post-single-bottom-nav__pager:hover,
.post-single-bottom-nav__pager:focus-visible {
    color: var(--text);
    text-decoration: underline;
}

.post-single-bottom-nav__pager.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.post-single-bottom-nav__index-button {
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.62rem 1.08rem 0.67rem;
    border-radius: 10px;
    border: 1px solid rgba(126, 200, 255, 0.38);
    background: linear-gradient(
        120deg,
        rgba(34, 60, 102, 0.88) 0%,
        rgba(28, 49, 84, 0.9) 52%,
        rgba(22, 38, 67, 0.92) 100%
    );
    color: #eaf2ff;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.02em;
    box-shadow:
        0 6px 16px rgba(8, 14, 32, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.post-single-bottom-nav__index-button:hover,
.post-single-bottom-nav__index-button:focus-visible {
    color: var(--accent);
    border-color: rgba(126, 200, 255, 0.52);
    box-shadow:
        0 8px 20px rgba(8, 14, 32, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.post-single-bottom-nav__index-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .post-single-bottom-nav {
        grid-template-columns: 1fr 1fr;
        row-gap: 0.9rem;
    }

    .post-single-bottom-nav__item--index {
        grid-column: 1 / -1;
        order: -1;
    }
}

/* 全幅でテキスト左・キャラ右の横並びを維持（1つのバナーとして扱う） */
@media (max-width: 900px) {
    .hero-banner {
        min-height: clamp(176px, 34vw, 265px);
        gap: 0 0.35rem;
        padding: 0.25rem 0.35rem 0.25rem 0.3rem;
    }

    .hero-banner-content {
        margin: 0.35rem 0 0.45rem 0.4rem;
        transform: none;
        padding: 0.35rem 0.65rem 0.45rem;
        max-width: none;
    }

    .hero-banner-secondary {
        margin: 0.08rem 0 0.45rem 0.4rem;
        padding: 0 0.65rem 0;
        max-width: none;
    }

    /* 641〜900px でもテキスト列の左＝下の余白を揃える（子の margin はスタック側に集約） */
    .hero-banner-text-stack {
        --mtl-hero-pc-text-inset: clamp(0.42rem, 3.4vw, 1.05rem);
        margin-left: var(--mtl-hero-pc-text-inset);
        margin-bottom: var(--mtl-hero-pc-text-inset);
    }

    .hero-banner-text-stack .hero-banner-content {
        margin: 0;
        padding: 0.35rem 0.65rem 0.45rem;
    }

    .hero-banner-text-stack .hero-banner-secondary {
        margin-inline: 0;
        margin-top: auto;
        /* padding / ガラス枠は min-width:641px 側の指定を維持 */
    }

    .hero-banner h1,
    .hero-banner-title {
        font-size: clamp(1.12rem, 4vw, 1.9rem);
    }

    .hero-banner-title-primary {
        margin-bottom: 0.45em;
        font-size: clamp(0.95rem, 3.9vw, 1.78rem);
        line-height: 1.2;
        letter-spacing: -0.02em;
    }

    .hero-banner-title-sub {
        font-size: clamp(0.92rem, 3.35vw, 1.34rem);
        font-weight: 700;
        letter-spacing: 0.058em;
    }

    .hero-banner-tagline {
        font-size: clamp(0.88rem, 2.95vw, 1.06rem);
        font-weight: 500;
        letter-spacing: 0.024em;
        line-height: 1.52;
    }

    .hero-banner-image-wrap {
        padding: 0 clamp(10px, 2.2vw, 24px) 0 0;
    }

    .hero-banner-image {
        max-width: min(46vw, 320px);
        max-height: 100%;
        margin-bottom: -10px;
        transform: translateX(clamp(-14px, -1.8vw, -5px));
    }

    .hero-wildlife-deer {
        width: clamp(44px, 11vw, 72px);
        right: 32%;
        bottom: 18%;
    }

    .hero-wildlife-rabbit {
        width: clamp(18px, 5.5vw, 30px);
        left: 5%;
        bottom: 9%;
    }

    .hero-cottage-sign {
        left: 13.25%;
        top: 66.4%;
        transform: rotate(-0.1deg) scale(1.2);
        font-size: clamp(0.54rem, 1.2vw, 0.78rem);
        letter-spacing: 0.1em;
        padding: 0.56rem 0.62rem 0.26rem;
    }

    .hero-cottage-snowmen {
        width: clamp(118px, 16.2vw, 200px);
        left: calc(11% + 6px);
        top: auto;
        bottom: 150px;
        transform: translateY(0.55rem);
        transform-origin: center bottom;
    }
}

/* スマホのみ：上段はサイトタイトルを左に通常配置／下段はキャラ＋左下に英字・キャッチを重ねる */
@media (max-width: 640px) {
    .hero-banner:not(.hero-banner--no-visual) .hero-cottage-sign {
        display: none;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-cottage-snowmen {
        display: none;
    }

    .hero-banner:not(.hero-banner--no-visual) {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 0;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner-content {
        grid-column: 1;
        grid-row: 1;
        justify-self: stretch;
        align-self: end;
        z-index: 4;
        /* 下マージンを負にして大きなタイトルがキャラ行へかぶってもよいように */
        margin: 0.35rem 0.28rem -0.45rem 0.4rem;
        padding: 0.35rem 0.65rem 0.45rem;
        max-width: none;
        text-align: left;
    }

    /* 画像あり：480px 以下の極小タイトル・nowrap を打ち消し、大きめ＋太字（重なり可） */
    .hero-banner:not(.hero-banner--no-visual) .hero-banner-title-primary {
        margin-bottom: 0.35em;
        font-weight: 700;
        font-size: clamp(1.2rem, 6.2vw, 2.45rem);
        line-height: 1.18;
        letter-spacing: -0.025em;
        white-space: normal;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner h1,
    .hero-banner:not(.hero-banner--no-visual) .hero-banner-title {
        margin: 0 0 0.25rem;
        font-weight: 700;
        font-size: clamp(1.42rem, 6.6vw, 2.65rem);
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner-secondary {
        grid-column: 1;
        grid-row: 2;
        position: absolute;
        z-index: 5;
        align-self: auto;
        left: 0.32rem;
        right: auto;
        bottom: clamp(0.28rem, 3.8vw, 0.95rem);
        margin: 0;
        padding: 0.26rem 0.42rem 0.32rem;
        max-width: min(86%, 17.5rem);
        width: max-content;
        box-sizing: border-box;
        text-align: left;
        align-items: flex-start;
        pointer-events: none;
        border-radius: 10px;
        background: rgba(10, 18, 38, 0.09);
        border: 1px solid rgba(130, 185, 255, 0.1);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        box-shadow: 0 2px 10px rgba(4, 10, 24, 0.1);
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner-secondary .hero-banner-title-sub {
        max-width: 100%;
        text-align: left;
        font-size: clamp(0.84rem, 3.2vw, 1.08rem);
        font-weight: 700;
        letter-spacing: 0.05em;
        line-height: 1.3;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner-secondary .hero-banner-tagline {
        max-width: 100%;
        text-align: left;
        font-size: clamp(0.8rem, 2.85vw, 1.02rem);
        font-weight: 700;
        letter-spacing: 0.022em;
        line-height: 1.48;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner-image-wrap {
        grid-column: 1;
        grid-row: 2;
        z-index: 6;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        position: relative;
        justify-self: stretch;
        width: 100%;
        max-width: none;
        min-height: clamp(124px, 42vw, 196px);
        padding: 0 clamp(4px, 1.5vw, 12px) 0 0;
    }

    /* 実機で背景が欠落する端末があるため、スマホでも装飾はバナー全体(inset:0)に固定 */
    .hero-banner:not(.hero-banner--no-visual) .hero-banner-decor {
        position: absolute;
        inset: 0;
        z-index: 0;
        border-radius: inherit;
    }

    /* 装飾内の雪は2行目に閉じるため非表示。全面用レイヤーでタイトル〜キャラまで降らせる */
    .hero-banner:not(.hero-banner--no-visual) .hero-banner-decor > .hero-snow-layer {
        display: none;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-snow-layer--full-banner {
        display: block;
        position: absolute;
        inset: 0;
        border-radius: inherit;
        overflow: hidden;
    }

    /* 全面雪のみ: 実機の will-change+グラデ合成を弱め、粒は細かく多め（装飾内の雪とは別レイヤー） */
    .hero-banner:not(.hero-banner--no-visual) .hero-snow-layer--full-banner::before,
    .hero-banner:not(.hero-banner--no-visual) .hero-snow-layer--full-banner::after {
        will-change: auto;
        mix-blend-mode: normal;
        filter: none;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-snow-layer--full-banner::before {
        background-image: url("../images/hero-snow-tile-a.svg");
        background-size: 100px 100px;
        background-position: 0 0;
        background-repeat: repeat;
        opacity: 0.82;
        transform: none;
        -webkit-animation: mtl-snow-fb-svg-a 44s linear infinite;
        animation: mtl-snow-fb-svg-a 44s linear infinite;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-snow-layer--full-banner::after {
        background-image: url("../images/hero-snow-tile-b.svg");
        background-size: 120px 120px;
        background-position: 22px -40px;
        background-repeat: repeat;
        opacity: 0.42;
        visibility: visible;
        transform: none;
        -webkit-animation: mtl-snow-fb-svg-b 64s linear infinite;
        animation: mtl-snow-fb-svg-b 64s linear infinite;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-cottage-sign {
        display: none;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-cottage-snowmen {
        left: 7.75%;
        top: 68.75%;
        width: clamp(88px, 30vw, 138px);
    }

    /* 画像なし：左列の通常フローのまま（.hero-banner-text-stack は display:contents で子がグリッド子） */
    .hero-banner--no-visual .hero-banner-content {
        grid-column: 1;
        grid-row: 1;
        z-index: 3;
    }

    .hero-banner--no-visual .hero-banner-secondary {
        grid-column: 1;
        grid-row: 2;
        position: static;
        z-index: 3;
        margin: 0.08rem 0 0.45rem 0.4rem;
        padding: 0 0.65rem 0;
        max-width: none;
        pointer-events: auto;
    }

    /* 画像なしスマホ：サイトタイトル大きめ・太字（480px の極小指定より優先） */
    .hero-banner--no-visual .hero-banner-title-primary {
        font-weight: 700;
        font-size: clamp(1.2rem, 6.2vw, 2.45rem);
        line-height: 1.18;
        letter-spacing: -0.025em;
        white-space: normal;
    }

    .hero-banner--no-visual .hero-banner h1,
    .hero-banner--no-visual .hero-banner-title {
        font-weight: 700;
        font-size: clamp(1.42rem, 6.6vw, 2.65rem);
        margin: 0 0 0.4rem;
    }

    /* スマホ共通：英字サブ・キャッチは太字（オーバーレイ／フローどちらも） */
    .hero-banner .hero-banner-title-sub {
        font-weight: 700;
    }

    .hero-banner .hero-banner-tagline {
        font-weight: 700;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        gap: 0 0.28rem;
        padding: 0.2rem 0.28rem 0.2rem 0.22rem;
        border-radius: 12px;
    }

    .hero-banner-content {
        margin: 0.28rem 0.06rem 0.36rem 0.2rem;
        transform: none;
        padding: 0.28rem 0.38rem 0.38rem;
    }

    .hero-banner--no-visual .hero-banner-secondary {
        margin: 0.06rem 0 0.36rem 0.2rem;
        padding: 0 0.38rem 0;
    }

    .hero-banner-title-primary {
        white-space: nowrap;
        font-size: clamp(0.74rem, 2.95vw + 0.18rem, 1.12rem);
        line-height: 1.18;
        letter-spacing: -0.035em;
    }

    .hero-wildlife-deer {
        width: clamp(36px, 20vw, 52px);
        right: 28%;
        bottom: 16%;
    }

    .hero-wildlife-rabbit {
        width: clamp(16px, 9vw, 26px);
        left: 4%;
        bottom: 8%;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner-decor {
        border-radius: 0 0 12px 12px;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-cottage-sign {
        display: none;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-cottage-snowmen {
        left: 5.75%;
        top: 69.25%;
        width: clamp(78px, 34vw, 124px);
    }

    .hero-banner--no-visual .hero-cottage-sign {
        left: 20.75%;
        top: 46.25%;
        transform: rotate(-1deg) scale(0.8);
        font-size: clamp(0.48rem, 2.8vw, 0.58rem);
        letter-spacing: 0.08em;
    }

    .hero-banner-badge {
        font-size: 0.62rem;
        padding: 0.12rem 0.42rem;
    }

    .hero-banner-image-wrap {
        padding: 0 clamp(8px, 2vw, 18px) 0 0;
    }

    .hero-banner-image {
        max-width: min(44vw, 260px);
        max-height: 100%;
        margin-bottom: -8px;
        transform: translateX(clamp(-10px, -1.4vw, -3px));
    }

    /* 画像あり：タイトル枠の余白＋下は負でキャラへかぶせる */
    .hero-banner:not(.hero-banner--no-visual) .hero-banner-content {
        margin: 0.28rem 0.06rem -0.5rem 0.2rem;
        padding: 0.28rem 0.38rem 0.38rem;
    }

    /* 画像あり：左下オーバーレイを 480px 向けに微調整 */
    .hero-banner:not(.hero-banner--no-visual) .hero-banner-secondary {
        left: 0.22rem;
        bottom: clamp(0.22rem, 3.5vw, 0.85rem);
        max-width: min(88%, 16rem);
        padding: 0.22rem 0.36rem 0.28rem;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner-secondary .hero-banner-title-sub {
        font-size: clamp(0.8rem, 3.05vw, 1.02rem);
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner-secondary .hero-banner-tagline {
        font-size: clamp(0.76rem, 2.75vw, 0.98rem);
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner-image-wrap {
        min-height: clamp(116px, 44vw, 188px);
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner-image-pivot {
        position: relative;
        z-index: 7;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-banner-image {
        display: block;
        width: min(44vw, 260px);
        max-height: none;
        max-width: none;
        height: auto;
        flex: 0 0 auto;
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 340px) {
    .hero-banner-title-primary {
        white-space: normal;
    }
}

@media (max-width: 700px) {
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav .menu {
        justify-content: flex-start;
    }
}

/* 狭い画面は装飾ブロック内の雪だけ2層→1層（.hero-snow-layer--full-banner は子セレクタに含めない） */
@media (max-width: 540px) {
    .hero-banner-decor > .hero-snow-layer::after {
        opacity: 0;
        visibility: hidden;
        -webkit-animation: none;
        animation: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-banner-image-pivot {
        animation: none;
        will-change: auto;
    }
    .hero-snow-layer::before,
    .hero-snow-layer::after {
        -webkit-animation: none;
        animation: none;
        will-change: auto;
        /* アニメ停止時は初期 transform が効かず背景オフセットだけだと枠外になりやすい（視差効果を減らす設定など） */
        transform: translate3d(0, 96px, 0);
    }

    /* 全面雪（SVG タイル）: 中間フレーム相当の background-position で静止 */
    .hero-banner:not(.hero-banner--no-visual) .hero-snow-layer--full-banner::before {
        transform: none;
        background-position: 0 150px;
    }

    .hero-banner:not(.hero-banner--no-visual) .hero-snow-layer--full-banner::after {
        transform: none;
        background-position: 22px 140px;
    }
}

