/* ============ AdSense（レスポンシブユニット） ============ */
/* ヘッダー直下・記事中・フッター直前の共通枠。
   .adsbygoogle は display:block のみ指定し、幅は枠側で決める。 */
.uj-ad {
    width: 100%;
    max-width: 1120px;
    margin: 24px auto;
    padding: 0 16px;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
}
.uj-ad .adsbygoogle { min-height: 100px; }
.uj-ad--top    { margin-top: 16px; }
.uj-ad--mid    { margin: 32px auto; max-width: none; padding: 0; }
.uj-ad--bottom { margin: 32px auto 40px; }

@media screen and (max-width: 768px) {
    .uj-ad        { margin: 18px auto; padding: 0 12px; }
    .uj-ad--mid   { margin: 24px auto; padding: 0; }
    .uj-ad--bottom{ margin: 24px auto 28px; }
}

/* ============================================================
   SP専用フッターナビ（画面下部固定 / 767px以下でのみ表示）
   マークアップ: application/views/layout/sp_footer_nav_view.php

   - アイコンはインラインSVG（stroke: currentColor）。
     font-awesome.min.css が v4.7.0 で fa-house 等を持たず、
     アイコンが消えてバーの高さが潰れたため、フォント依存をやめた。
   - セレクタに .ufo-top を付けているのは、上部の `.ufo-top a { color: inherit }`
     （詳細度 0,0,1,1）に色指定が負けるため。
   - z-index は投稿モーダル(.bbs-modal / .pht-modal = 200)より下に置き、
     モーダル表示中はバーが隠れるようにしている。
   ============================================================ */
.uj-spnav {
    display: none;
}

@media (max-width: 767px) {
    .ufo-top .uj-spnav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 120;
        display: flex;
        align-items: stretch;
        background: #080d17;
        border-top: 1px solid #16202f;
        box-shadow: 0 -6px 18px rgba(0, 0, 0, .45);
        /* iPhone のホームインジケータ分を足す */
        padding-bottom: env(safe-area-inset-bottom);
    }

    .ufo-top .uj-spnav__item {
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        /* タップ領域は 48px 以上を確保する */
        min-height: 52px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 6px 2px;
        color: #8d99ab;
        text-decoration: none;
        font-size: 10px;
        line-height: 1.2;
        letter-spacing: .02em;
        -webkit-tap-highlight-color: transparent;
    }

    .ufo-top .uj-spnav__icon {
        display: block;
        width: 22px;
        height: 22px;
        flex: none;
    }

    .ufo-top .uj-spnav__label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 投稿ボタンは常時アクセント色（CV導線として目立たせる） */
    .ufo-top .uj-spnav__item--post {
        color: #ff8a1e;
    }

    /* 現在地は色＋上辺のアクセントライン */
    .ufo-top .uj-spnav__item.is-current {
        color: #ff8a1e;
    }

    .ufo-top .uj-spnav__item.is-current::before {
        content: "";
        position: absolute;
        top: 0;
        width: 34px;
        height: 2px;
        background: #ff8a1e;
        border-radius: 0 0 2px 2px;
    }

    .ufo-top .uj-spnav__item:active {
        color: #ffb066;
        background: #101826;
    }

    /* バーに隠れないよう本文の下に余白を作る */
    body.ufo-top {
        padding-bottom: calc(62px + env(safe-area-inset-bottom));
    }
}

/* SPヘッダー: 検索/メニューアイコンを右端へ寄せる */
@media (max-width: 900px) {
    .uj-header__inner {
        padding-right: 12px;
    }
    .uj-header__tools {
        margin-left: auto;
    }
}

/* SPフッター: 導線を折りたたみ式にして見やすくする */
@media (max-width: 767px) {
    .ufo-top .uj-footer__nav {
        display: block;
        gap: 0;
        padding-bottom: 8px;
    }
    .ufo-top .uj-footer__col {
        min-width: 0;
        border-bottom: 1px solid #16202f;
    }
    .ufo-top .uj-footer__ttl {
        position: relative;
        margin: 0;
        padding: 15px 36px 15px 2px;
        min-height: 48px;
        font-size: 15px;
        letter-spacing: .02em;
        color: #ffa24d;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .ufo-top .uj-footer__ttl::after {
        content: "";
        position: absolute;
        right: 8px;
        top: 50%;
        width: 8px;
        height: 8px;
        margin-top: -6px;
        border-right: 2px solid #8d99ab;
        border-bottom: 2px solid #8d99ab;
        transform: rotate(45deg);
        transition: transform .2s;
    }
    .ufo-top .uj-footer__col.is-open .uj-footer__ttl::after {
        margin-top: -2px;
        transform: rotate(225deg);
    }
    .ufo-top .uj-footer__ttl:focus-visible {
        outline: 2px solid #ff8a1e;
        outline-offset: -2px;
    }
    .ufo-top .uj-footer__col ul {
        display: none;
        gap: 0;
        padding: 0 0 10px;
    }
    .ufo-top .uj-footer__col.is-open ul {
        display: flex;
    }
    .ufo-top .uj-footer__col li + li {
        border-top: 1px solid #101826;
    }
    .ufo-top .uj-footer__col a {
        display: block;
        padding: 12px 4px 12px 10px;
        font-size: 14px;
        line-height: 1.5;
        color: #c3ccda;
    }
    .ufo-top .uj-footer__col a:active {
        background: #101826;
    }
}

/* 上部広告: SPでは高さを抑えてファーストビューを本文に使う */
@media screen and (max-width: 768px) {
    .uj-ad--top { margin: 10px auto 6px; max-height: 120px; }
    .uj-ad--top .adsbygoogle { min-height: 50px; max-height: 110px; }
}

/* Font Awesome 4.7 に無い v6 名のアイコンを、4.7 の近い字形に割り当てる（全ページ共通） */
.fa-user-astronaut:before    { content: "\f21b"; }
.fa-hand-sparkles:before     { content: "\f0d0"; }
.fa-sun:before               { content: "\f185"; }
.fa-handshake:before         { content: "\f2b5"; }
.fa-meteor:before            { content: "\f135"; }
.fa-compact-disc:before      { content: "\f192"; }
.fa-ring:before              { content: "\f10c"; }
.fa-plane-up:before          { content: "\f072"; }
.fa-mountain-sun:before      { content: "\f1bb"; }
.fa-city:before              { content: "\f1ad"; }
.fa-satellite-dish:before    { content: "\f012"; }
.fa-circle-user:before       { content: "\f2be"; }
.fa-clock:before             { content: "\f017"; }
.fa-pen:before               { content: "\f040"; }
.fa-cow:before               { content: "\f1b0"; }
.fa-tower-broadcast:before   { content: "\f09e"; }
.fa-building-shield:before   { content: "\f19c"; }
.fa-triangle-exclamation:before { content: "\f071"; }
.fa-calendar-days:before     { content: "\f073"; }
.fa-location-dot:before      { content: "\f041"; }
.fa-comment-dots:before      { content: "\f075"; }
.fa-pen-to-square:before     { content: "\f044"; }
.fa-house:before             { content: "\f015"; }


/* ヘッダーナビ: PC幅で2行に折り返して文字が縦に割れるのを防ぐ。
   1181px以上は折り返さず詰めて表示し、901〜1180pxはモバイルと同じハンバーガーにする。 */
@media (min-width: 1181px) {
    .uj-header__inner { gap: 18px; }
    .uj-nav ul { gap: 10px; }
    .uj-nav li, .uj-nav a { white-space: nowrap; }
    .uj-nav__ja { font-size: 12.5px; }
}
@media (min-width: 901px) and (max-width: 1180px) {
    .uj-header__inner { height: 60px; gap: 14px; }
    .uj-nav {
        position: fixed; top: 60px; left: 0; right: 0;
        max-height: calc(100vh - 60px); overflow-y: auto;
        padding: 6px 0 14px; background: #0a0f1a; border-bottom: 1px solid #16202f;
        opacity: 0; visibility: hidden; transform: translateY(-8px);
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .uj-nav.is-open { opacity: 1; visibility: visible; transform: none; }
    .uj-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .uj-nav li { border-bottom: 1px solid #16202f; }
    .uj-nav a { display: flex; align-items: baseline; gap: 10px; padding: 13px 20px; text-align: left; }
    .uj-burger { display: flex; flex-direction: column; }
    .uj-header__tools { margin-left: auto; }
}

/* Font Awesome 4.7 に無いv6名のアイコンを近い字形に割り当て（第2弾） */
.fa-arrow-trend-up:before { content: "\f201"; }
.fa-arrow-up-right-from-square:before { content: "\f08e"; }
.fa-up-right-from-square:before { content: "\f08e"; }
.fa-book-open:before { content: "\f02d"; }
.fa-broom:before { content: "\f12d"; }
.fa-chart-bar:before { content: "\f080"; }
.fa-chart-column:before { content: "\f080"; }
.fa-circle-check:before { content: "\f058"; }
.fa-circle-exclamation:before { content: "\f06a"; }
.fa-circle-info:before { content: "\f05a"; }
.fa-circle-question:before { content: "\f059"; }
.fa-clipboard-check:before { content: "\f0ea"; }
.fa-cloud-arrow-up:before { content: "\f0ee"; }
.fa-cookie-bite:before { content: "\f111"; }
.fa-crown:before { content: "\f091"; }
.fa-earth-asia:before { content: "\f0ac"; }
.fa-globe-asia:before { content: "\f0ac"; }
.fa-file-lines:before { content: "\f0f6"; }
.fa-floppy-disk:before { content: "\f0c7"; }
.fa-ghost:before { content: "\f21b"; }
.fa-images:before { content: "\f03e"; }
.fa-landmark:before { content: "\f19c"; }
.fa-laptop-code:before { content: "\f109"; }
.fa-layer-group:before { content: "\f1b3"; }
.fa-lightbulb:before { content: "\f0eb"; }
.fa-line:before { content: "\f075"; }
.fa-location-crosshairs:before { content: "\f05b"; }
.fa-magnifying-glass:before { content: "\f002"; }
.fa-map-location-dot:before { content: "\f041"; }
.fa-map-marked-alt:before { content: "\f279"; }
.fa-map-marker-alt:before { content: "\f041"; }
.fa-mountain:before { content: "\f1bb"; }
.fa-newspaper:before { content: "\f1ea"; }
.fa-rectangle-ad:before { content: "\f0a1"; }
.fa-right-from-bracket:before { content: "\f08b"; }
.fa-rotate:before { content: "\f021"; }
.fa-satellite:before { content: "\f135"; }
.fa-shapes:before { content: "\f12e"; }
.fa-share-nodes:before { content: "\f1e0"; }
.fa-table-cells:before { content: "\f00a"; }
.fa-user-shield:before { content: "\f21b"; }
.fa-video:before { content: "\f03d"; }
.fa-x-twitter:before { content: "\f099"; }
.fa-xmark:before { content: "\f00d"; }
.fa-yen-sign:before { content: "\f157"; }

/* トップ: 地図の注記は2カラムの下に全幅で置く（グリッドの1セルを占有して右が空白になっていた） */
.uj-mapwrap__note { grid-column: 1 / -1; margin: 0; font-size: 12px; color: #8a93a6; }

/* パンくずが縦積みになっていたページ（用語集・写真・移動・ランキング・タグ）を横並びにする */
.yogo-pan ul.breadcrumb,
.pht-pan ul.breadcrumb,
.mov-pan ul.breadcrumb,
.rk-pan ul.breadcrumb,
.tag-pan ul.breadcrumb,
.tgl-pan ul.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.yogo-pan ul.breadcrumb > li,
.pht-pan ul.breadcrumb > li,
.mov-pan ul.breadcrumb > li,
.rk-pan ul.breadcrumb > li,
.tag-pan ul.breadcrumb > li,
.tgl-pan ul.breadcrumb > li {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.yogo-pan ul.breadcrumb > li + li::before,
.pht-pan ul.breadcrumb > li + li::before,
.mov-pan ul.breadcrumb > li + li::before,
.rk-pan ul.breadcrumb > li + li::before,
.tag-pan ul.breadcrumb > li + li::before,
.tgl-pan ul.breadcrumb > li + li::before {
    content: "e";
    color: #4d5768;
    font-size: 10px;
}
