/* 萩nonta SNS 画面スタイル（たたき台 page-test-map.php から移植。投稿フロー用の部品は除く） */

:root {
    --bg: #fdfcf5;          /* クリーム色（メインサイトの背景色 $colorSubBg と同じ）。パネル・画面の地 */
    --bg-sub: #f4f1e4;      /* クリームの一段濃い色（地の上の入れ子の面：同意の枠・検索欄など） */
    --ink: #2b3a4a;         /* 濃紺 */
    --ink-sub: #7b8794;
    --accent: #1f3a5f;      /* ブランドの紺色（2026-10-21 ユーザー指示でオレンジから変更） */
    --accent-dark: #162b47;
    --navy: #1f3a5f;        /* 主なボタン（次へ・送信など）の紺色。夜の地図では少し明るくする（body.is-dark） */
    --line: #e3ded4;
    --sheet-radius: 20px;
    --tabbar-h: 56px;       /* 画面下メニューの高さ（安全領域を除く） */
    /* ホームインジケーターにメニューが重ならないようにする余白。
       ここを削るとタップがシステム側に取られて反応しなくなるため、必ず確保する */
    /* 表示領域が画面より狭いとき（PWA の black-translucent）は、その不足分（--viewport-gap。layouts/app.blade.php が入れる）を差し引く */
    --tabbar-pad: max(0px, calc(env(safe-area-inset-bottom, 0px) - var(--viewport-gap, 0px)));
    --tabbar-space: calc(var(--tabbar-h) + var(--tabbar-pad));
    --place-photo-ratio: 4 / 3;   /* 場所のパネルの写真の縦横比（幅 / 高さ）。2026-10-24 に 16:9 → 1:1 → 4:5 → 1:1 → 4:3（「もっと小さく」の指示）。変えるならここだけ。写真なしの枠も同じ */
    --feed-top: 36%;        /* SP の近くの投稿: 一覧の上端（ここより上は地図を見せる） */
    --face-default: #b4bac1; /* アイコンの無い人（未登録・名無しさん）の丸。地図のピン（sns-map.js の PIN_FACE_FILL）と同じ */
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Vue が起動するまで、テンプレートのままの要素を隠す */
[v-cloak] {
    display: none !important;
}

/* user-scalable=no を外した代わりに、ダブルタップ拡大だけ抑える（指2本の拡大は残る。地図の上の操作は地図が処理する）。
   #app の外にある部品（画面下のメニュー・知らせ・お知らせの帯など）をダブルタップしても画面ごと拡大しないよう、全部の要素に付ける。
   地図ライブラリが自分の要素に付ける指定（クラス指定）は、こちらより強いのでそのまま効く */
html,
body,
body * {
    touch-action: manipulation;
}

html,
body {
    height: 100%;
    margin: 0;
}

/* テーマ hagi-nonta から移植した CSS は「1rem = 10px」前提で書かれているため、基準を合わせる。
   この画面自身の指定はすべて px なので影響しない（body の大きさだけ明示しておく） */
html {
    font-size: 62.5%;
}

body {
    font-size: 15px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
    color: var(--ink);
    /* standalone で表示領域が画面の下端まで届かない端末では、この色が隙間に出る。画面下メニューと同じ色にして境目を消す */
    background: var(--bg);
    overscroll-behavior: none;
    /* 画面の文字（ボタン・見出し・案内など）は選んでコピーできないようにする（2026-10-13 ユーザー指示）。
       選べるのは、コメント（.feed-text・.can-copy）・場所の詳細（.sheet--place）・入力欄・規約の本文・管理画面だけ */
    -webkit-user-select: none;
    user-select: none;
}

/* コピーしてよいもの。入力欄は選べないと iPhone で文字を打てないことがあるので必ず戻す */
input,
textarea,
select,
[contenteditable="true"],
.can-copy,
.feed-text,
.sheet--place,
.legal-body,
.page.admin {
    -webkit-user-select: text;
    user-select: text;
}

/* 場所の詳細の中でも、ボタンは選ばない */
.sheet--place button,
.sheet--place .btn {
    -webkit-user-select: none;
    user-select: none;
}

#app {
    position: fixed;
    inset: 0;
}

#map {
    position: absolute;
    inset: 0;
    background: #f5f4f0;
}

/* 地図（MapKit）を出せなかったときの案内。軽量マップへの切り戻しは無いので、読み込み直しを案内する */
.hn-map-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    pointer-events: none;
}

.hn-map-error__card {
    pointer-events: auto;
    max-width: 320px;
    padding: 18px 20px;
    border-radius: 14px;
    background: #fff;
    color: #2b3a4a;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
}

.hn-map-error__card p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.7;
}

.hn-map-error__card button {
    padding: 8px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--accent, #1f3a5f);
    color: #fff;
    font: inherit;
    font-size: 14px;
}

/* ---------- ヘッダー ---------- */
.hdr {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: calc(env(safe-area-inset-top) + 10px) 12px 8px;
    pointer-events: none;
}

/* SP の場所タブの一覧を開いている間は、一覧が右下の更新・現在地のボタン（.locate・1000）より手前に出るよう、ヘッダーごと上げる
   （シート 1100・下のメニュー 1300 よりは下） */
body.is-place-tabs-open .hdr {
    z-index: 1050;
}

.hdr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.hdr h1 {
    font-size: 15px;
    margin: 0;
    font-weight: 700;
    letter-spacing: .04em;
}

.hdr .count {
    font-size: 11px;
    color: var(--ink-sub);
    margin-left: auto;
}

/* チップ（地図デザイン切替・絞り込み） */
.chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    pointer-events: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.chips::-webkit-scrollbar {
    display: none;
}

.hdr-row .chips {
    margin-left: auto;
}

.chip {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    background: var(--bg);
    border-radius: 99px;
    padding: 5px 11px;
    font-size: 12px;
    font-family: inherit;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.chip.on {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

/* チェックボックス（名前の前のアイコンの場所）。出している＝黒地に白いチェック・一部だけ＝黒地に白い横線・出していない＝枠だけ。
   チェックは2本の線を順に伸ばして描く（短い線→長い線） */
.place-check {
    display: block;
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: 2px solid #9aa3ab;
    border-radius: 4px;
    background: var(--bg);
    transition: background-color .15s, border-color .15s;
}

.place-check::before,
.place-check::after {
    content: "";
    position: absolute;
    height: 2px;
    width: 0;
    border-radius: 1px;
    background: #fff;
    transform-origin: 0 50%;
}

.place-check::before {
    left: 2px;
    top: 6px;
    transform: rotate(45deg);
}

.place-check::after {
    left: 5.5px;
    top: 9.5px;
    transform: rotate(-45deg);
}

.chip.on .place-check,
.chip.part .place-check {
    background: var(--ink);
    border-color: var(--ink);
}

.chip.on .place-check::before {
    width: 5px;
    transition: width .12s ease-out;
}

.chip.on .place-check::after {
    width: 9px;
    transition: width .16s ease-out .12s;
}

/* 一部だけ: チェックを横線に */
.chip.part .place-check::before {
    left: 3px;
    top: 6px;
    width: 8px;
    transform: none;
}

/* カテゴリの中の種類を開く・閉じる（Vue の transition name="place-items"）。高さを0から広げ、ふわっと出す */
.place-items-enter-active,
.place-items-leave-active {
    overflow: hidden;
}

/* 開く: ゆっくり広がりながらぼかしが取れる／閉じる: すっと畳む */
.place-items-enter-active {
    transition: height .42s cubic-bezier(.22, .8, .3, 1), opacity .32s ease-out, filter .32s ease-out;
}

.place-items-leave-active {
    transition: height .22s ease, opacity .18s ease;
}

.place-items-enter-from,
.place-items-leave-to {
    opacity: 0;
}

.place-items-enter-from {
    filter: blur(3px);
}

/* 「元に戻す」の登場・退場（Vue の transition name="place-undo"）。その場でふわっと出る・消えるだけ（軽く） */
.place-undo-enter-active,
.place-undo-leave-active {
    transition: opacity .15s ease;
}

.place-undo-enter-from,
.place-undo-leave-to {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .place-undo-enter-active,
    .place-undo-leave-active,
    .place-tabs,
    .place-items-enter-active,
    .place-items-leave-active {
        transition: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .place-check,
    .chip.on .place-check::before,
    .chip.on .place-check::after {
        transition: none;
    }
}

/* 場所タブ（名所を見る・お店を探す・便利な場所）。SP は今のタブ名のボタンで開閉するアコーディオン、PC は横に並べる */
@media (max-width: 767px) {
    /* 開いた一覧（.place-tabs）を重ねる基準。一覧は absolute なので、開いても下の段（熱の面）は動かない */
    .hdr-row .chips-place {
        position: relative;
        flex: 1 1 auto;
        flex-wrap: wrap;
        justify-content: flex-end;
        overflow: visible;
    }

    .place-tabs-toggle {
        font-weight: 700;
    }

    /* 開閉の矢印は飾りなので疑似要素の Font Awesome（angle-down） */
    .place-tabs-toggle::after {
        content: "\f107";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        margin-left: 2px;
        transition: transform .2s;
    }

    .chips-place.open .place-tabs-toggle::after {
        transform: rotate(180deg);
    }

    /* 開いた中身: 地図の上でも読めるよう背景つきのパネルに、縦1列のリストで並べる。
       ボタンのすぐ下に重ねて出し（absolute）、下の段（熱の面）を押し下げない。左上のサービス名・天気より手前（z-index） */
    .place-tabs {
        display: flex;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        z-index: 2;
        flex-direction: column;
        /* 開閉は、ふわっと出る・消える（上の端は動かさない＝fitPlaceTabs で測る位置がずれない）。閉じている間は触れず・読み上げもされない */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: scale(.92);
        filter: blur(4px);
        transform-origin: top right;
        /* 閉じる動き: 速めにすっと消す */
        transition: opacity .18s ease, transform .18s ease, filter .18s ease, visibility 0s .18s;
        max-height: calc(100dvh - 240px);
        overflow-y: auto;
        background: var(--bg);
        color: var(--ink);
        border-radius: 14px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    }

    .chips-place.open .place-tabs {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        filter: none;
        /* 開く動き: ゆっくり・やわらかく（広がりながらぼかしが取れる。終わりにほんの少し余韻） */
        transition: opacity .32s ease-out, transform .42s cubic-bezier(.16, .9, .3, 1), filter .32s ease-out, visibility 0s;
    }

    /* .chip の丸い札の見た目を外して、リストの行にする（夜の地図の body.is-dark .chip より強く当てる） */
    .chips-place .place-tabs .chip {
        width: 100%;
        gap: 10px;
        padding: 10px 16px;
        font-size: 14px;
        background: transparent;
        color: inherit;
        border: 0;
        border-radius: 0;
    }

    /* 名前の前のアイコン。幅をそろえて名前の頭を縦に並べる */
    .place-tab-icon {
        width: 1.25em;
        text-align: center;
        opacity: .75;
    }

    .chips-place .place-tabs .chip.on {
        background: transparent;
        color: inherit;
    }

    /* 「すべて」の行: 名前の行の右端に「元に戻す」を収める（押した直後だけ出る） */
    .place-all {
        display: flex;
        align-items: stretch;
    }

    .chips-place .place-tabs .place-all > .chip:first-child {
        flex: 1 1 auto;
        width: auto;
    }

    .chips-place .place-tabs .place-all .place-undo {
        flex: 0 0 auto;
        width: auto;
        gap: 6px;
        padding: 10px 16px;
        border-top: 0;
        color: var(--accent);
        font-size: 13px;
        font-weight: 700;
    }

    /* パネルを閉じる ×。パネルの右上（「すべて」の行の右端）に × の印だけ置く */
    .place-tabs-close {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        border: 0;
        background: transparent;
        color: var(--ink-sub);
        font-size: 18px;
        cursor: pointer;
    }

    /* カテゴリ（観光・お食事…）。名前の行と、中を開く ▼ を横に並べる。開いた中身は一段ひっこめて、薄い地の行にする。
       行と行の間の区切り線は引かない（2026-10-21） */
    .place-group-head {
        display: flex;
        align-items: stretch;
    }

    .chips-place .place-tabs .place-group-main {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        font-weight: 700;
    }

    .place-group-count {
        margin-left: auto;
        font-size: 12px;
        font-weight: 400;
        opacity: .65;
    }

    .place-group-more {
        flex: 0 0 52px;
        border: 0;
        background: transparent;
        color: inherit;
        cursor: pointer;
    }

    .place-group-more::after {
        content: "\f107";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        display: inline-block;
        transition: transform .2s;
    }

    .place-group.open .place-group-more::after {
        transform: rotate(180deg);
    }

    .place-group-items {
        display: flex;
        flex-direction: column;
        background: rgba(0, 0, 0, .04);
    }

    .chips-place .place-tabs .place-group-items .chip {
        padding-left: 36px;
        font-size: 13px;
    }
}

@media (min-width: 768px) {
    .place-tabs-toggle {
        display: none;
    }

    .place-tabs {
        display: contents;
    }

    .place-tab-icon {
        display: none;
    }

    /* 中の種類を下に重ねて開くので、横スクロール（overflow-x）をやめて、入りきらなければ折り返す */
    .hdr-row .chips-place {
        overflow: visible;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .place-all {
        display: flex;
    }

    /* PC は札が横に並ぶだけでパネルではないので、閉じる × は出さない */
    .place-tabs-close {
        display: none;
    }

    .place-undo {
        margin-left: 6px;
        color: var(--accent);
        font-weight: 700;
    }

    /* 上に並ぶ札にはアイコンを出さず、中の一覧の行にだけ出す */
    .place-group-items .place-tab-icon {
        display: inline-block;
        width: 1.25em;
        text-align: center;
        opacity: .75;
    }

    /* カテゴリ: 名前の札と ▼ を1つの丸い札につなげる */
    .place-group {
        position: relative;
        display: flex;
        flex: 0 0 auto;
    }

    .place-group-head {
        display: flex;
    }

    .place-group-main {
        border-radius: 99px 0 0 99px;
    }

    /* ▼ がある札は、名前と ▼ の間に区切りの線を引かない（全部出している・一部だけ・出していない、のどの状態でも） */
    .place-group-main:not(:last-child) {
        border-right: 0;
    }

    .place-group-main:last-child {
        border-radius: 99px;
    }

    .place-group-main.part {
        background: #e9edf0;
        border-color: var(--ink);
    }

    /* 一部だけ出しているときは ▼ も名前の側と同じ色に（色の段差が区切りに見えないように） */
    .place-group-main.part + .place-group-more {
        background: #e9edf0;
        border-color: var(--ink);
    }

    .place-group-count {
        font-size: 11px;
        opacity: .7;
    }

    .place-group-more {
        width: 26px;
        border: 1px solid var(--line);
        border-left: 0;
        border-radius: 0 99px 99px 0;
        background: var(--bg);
        color: var(--ink);
        cursor: pointer;
    }

    .place-group-main.on + .place-group-more {
        background: var(--ink);
        color: #fff;
        border-color: var(--ink);
    }

    .place-group-more::after {
        content: "\f107";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        display: inline-block;
        font-size: 12px;
        transition: transform .2s;
    }

    .place-group.open .place-group-more::after {
        transform: rotate(180deg);
    }

    /* 中の種類（観光なら名所・観光案内所…）: 札の下に重ねる一覧 */
    .place-group-items {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        z-index: 5;
        display: flex;
        flex-direction: column;
        min-width: 190px;
        padding: 4px 0;
        background: var(--bg);
        border-radius: 12px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    }

    .place-group-items .chip {
        border: 0;
        border-radius: 0;
        padding: 8px 14px;
        font-size: 13px;
        background: transparent;
        color: var(--ink);
        text-align: left;
    }

    .place-group-items .chip.on {
        background: transparent;
    }

    /* 上に並ぶ札にはチェックボックスは出さず、中の一覧の行にだけ出す */
    .place-check {
        display: none;
    }

    .place-group-items .place-check {
        display: block;
    }

    body.is-dark .place-group-main.part {
        background: #2c3338;
        border-color: #f2f2f2;
    }

    body.is-dark .place-group-more {
        background: #1f2428;
        color: #e8e8e8;
        border-color: #3a4147;
    }

    body.is-dark .place-group-main.part + .place-group-more {
        background: #2c3338;
        border-color: #f2f2f2;
    }

    body.is-dark .place-group-main.on + .place-group-more {
        background: #f2f2f2;
        color: #1f2428;
        border-color: #f2f2f2;
    }

    /* カテゴリの中の一覧は、夜の地図でも明るい地に黒文字（2026-10-21 ユーザー指示。地はクリーム色） */
    body.is-dark .place-group-items {
        --accent: #1f3a5f;
        --accent-dark: #162b47;
        background: var(--bg);
        box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    }

    body.is-dark .place-group-items .chip,
    body.is-dark .place-group-items .chip.on {
        background: transparent;
        color: var(--ink);
        border: 0;
    }
}

/* ---------- 現在地ボタン ---------- */
.locate {
    position: absolute;
    z-index: 1000;
    right: 14px;
    bottom: calc(var(--tabbar-space) + 26px + 44px + 12px);   /* 下から 投稿ボタン（.post-fab）・現在地・更新 */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font-size: 19px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    cursor: pointer;
}

/* 更新ボタン（画面ごと読み込み直す）。見た目は現在地ボタンと同じで、その上に置く */
.locate.reload {
    bottom: calc(var(--tabbar-space) + 26px + (44px + 12px) * 2);
    font-size: 17px;
}

/* ---------- 現在地の丸 ---------- */
/* 地図モジュールが作るマーカーの中身。名所のバッジ（四角）と区別できるよう丸にする。縁は夜の地図でも白（2026-10-13 ユーザー指示。以前は夜だけ暗い縁） */
.hn-user {
    position: relative;
    width: 18px;
    height: 18px;
}

.hn-user-core {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .35);
}

/* 鼓動。ゆっくり広がって消える */
.hn-user-pulse {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    background: var(--accent);
    opacity: .4;
    animation: hn-user-pulse 2.4s cubic-bezier(.22, .61, .36, 1) infinite;
}

@keyframes hn-user-pulse {
    0% {
        transform: scale(1);
        opacity: .4;
    }

    70% {
        transform: scale(3.4);
        opacity: 0;
    }

    100% {
        transform: scale(3.4);
        opacity: 0;
    }
}

/* 動きを減らす設定の端末では動かさない */
@media (prefers-reduced-motion: reduce) {
    .hn-user-pulse {
        animation: none;
        transform: scale(2);
        opacity: .2;
    }
}

/* ---------- 場所のアイコン（MapKit 版の地図だけ。MapLibre 版は地図の中で描く） ---------- */
/* 絵は sns-map.js と同じ Canvas の画像。名前は MapLibre 版の文字の層と同じ色・縁取りにする */
.hn-mk-place {
    position: relative;
    z-index: 1;
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 絵。寄せると座標（transform-origin・sns-map-mapkit.js が置く）を中心に大きくする。押せるのは絵だけ */
.hn-mk-place-icon {
    position: absolute;
    inset: 0;
    background-size: 100% 100%;
    transform: scale(var(--hn-mk-icon-scale, 1));
    pointer-events: auto;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.hn-mk-label {
    display: none;
    position: absolute;
    transform: translateX(-50%);
    width: max-content;
    max-width: 9em;
    color: #5a5148;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
    text-shadow: 0 0 1.2px #fff, 0 0 1.2px #fff, 1px 0 1px #fff, -1px 0 1px #fff, 0 1px 1px #fff, 0 -1px 1px #fff;
}

.hn-mk-place--place .hn-mk-label {
    max-width: 8em;
    color: var(--ink);
}

/*
 * チェーンの店の名前（「チェーン名\n店舗名」。sns-map.js の placeLabel）は改行のところだけで折り返す。
 * 9em で折ると「ドラッグストアコス／モス」のように固有名詞の途中で割れるため（2026-10-14 ユーザー指示「固有名詞 改行」）
 */
.hn-mk-label.hn-mk-label--lines {
    white-space: pre;
    max-width: none;
}

/*
 * まぁーるバスの停留所（MapKit 版）。場所のアイコンより下。点は止まる回りの色（西回り W＝オレンジ・東回り E＝青・両回り＝左半分が西・右半分が東。
 * sns-map.js の BUS_COLORS と同じ）。区間表示の出発・到着は濃い丸、乗換は大きな丸。出発・到着の指定は回りの指定より後に書く（同じ詳細度のため）
 */
.hn-mk-stop {
    position: relative;
    z-index: 0;
    box-sizing: border-box;
    border-radius: 50%;
    background: #d9480f;
    border: 2px solid #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.hn-mk-stop--east {
    background: #1565c0;
}

.hn-mk-stop--both {
    background: linear-gradient(90deg, #d9480f 50%, #1565c0 50%);
}

.hn-mk-stop--origin,
.hn-mk-stop--dest {
    background: var(--ink);
    border-width: 3px;
}

.hn-mk-stop--transfer {
    border-width: 3px;
}

.hn-mk-stop-label {
    display: none;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 4px;
    width: max-content;
    max-width: 10em;
    /* 折り返しは空白のところだけ（「出発 W1・E1」／「萩市役所」。MapLibre 版の文字と同じ）。
       日本語は1文字ごとに折れてしまい「萩市役／所」となっていた。空白の無いとても長い名前だけは途中で折る */
    word-break: keep-all;
    overflow-wrap: anywhere;
    color: #b13a0b;
    font-size: 10px;
    line-height: 1.2;
    pointer-events: none;
    text-shadow: 0 0 1.2px #fff, 0 0 1.2px #fff, 1px 0 1px #fff, -1px 0 1px #fff, 0 1px 1px #fff, 0 -1px 1px #fff;
}

/* 名前も回りの色（両回りは中間の灰）。BUS_COLORS の labelWest / labelEast / labelBoth */
.hn-mk-stop--east .hn-mk-stop-label {
    color: #1565c0;
}

.hn-mk-stop--both .hn-mk-stop-label {
    color: #4a5663;
}

/* 名前はズーム15から。区間の出発・到着・乗換は引いていても出す */
.hn-mk-zoom-bus .hn-mk-stop-label,
.hn-mk-stop--origin .hn-mk-stop-label,
.hn-mk-stop--dest .hn-mk-stop-label,
.hn-mk-stop--transfer .hn-mk-stop-label {
    display: block;
}

.hn-mk-stop--origin .hn-mk-stop-label,
.hn-mk-stop--dest .hn-mk-stop-label,
.hn-mk-stop--transfer .hn-mk-stop-label {
    font-size: 12px;
}

.hn-mk-stop--origin .hn-mk-stop-label,
.hn-mk-stop--dest .hn-mk-stop-label {
    color: var(--ink);
}

.hn-mk-stop-label.is-hidden {
    visibility: hidden;
}

/*
 * 夜の地図は暗い下地に沈まないよう明るい色（sns-map.js の BUS_COLORS.night と同じ）。縁は昼と同じ白（2026-10-13 ユーザー指示）。
 * 区間の出発・到着は白い丸なので、縁だけ暗くして輪郭を出す
 */
.hn-mk-dark .hn-mk-stop {
    background: #ffa04d;
}

.hn-mk-dark .hn-mk-stop--east {
    background: #4fb3ff;
}

.hn-mk-dark .hn-mk-stop--both {
    background: linear-gradient(90deg, #ffa04d 50%, #4fb3ff 50%);
}

.hn-mk-dark .hn-mk-stop--origin,
.hn-mk-dark .hn-mk-stop--dest {
    background: #fff;
    border-color: #141a1f;
}

.hn-mk-dark .hn-mk-stop-label {
    color: #ffc48a;
    text-shadow: 0 0 1.2px #14181c, 0 0 1.2px #14181c, 1px 0 1px #14181c, -1px 0 1px #14181c, 0 1px 1px #14181c, 0 -1px 1px #14181c;
}

.hn-mk-dark .hn-mk-stop--east .hn-mk-stop-label {
    color: #9dd3ff;
}

.hn-mk-dark .hn-mk-stop--both .hn-mk-stop-label {
    color: #e3e9ef;
}

.hn-mk-dark .hn-mk-stop--origin .hn-mk-stop-label,
.hn-mk-dark .hn-mk-stop--dest .hn-mk-stop-label {
    color: #fff;
}

/*
 * 熱の光の柱（MapKit 版）。寄せたときだけ出す（2026-10-20 ユーザー指示「イメージはライトピラー。幻想的なかたちに」「SP でできる限り軽く」）。
 * 冬の夜に街の灯りの上へ伸びるライトピラーの形: 地面のまぶしい灯り・横に走るきらめき・地面に広がる光だまりと、そこから空へ伸びる細い光の帯。
 * 帯は芯が白く（昼の地図では熱の色を深くした色）、縁に熱の色が残って外へぼけ、上へいくほどわずかに広がりながら空に溶ける。
 * 絵は .hn-mk-pillar-light 1つの背景のグラデーションの重ね合わせだけ（画像・filter は使わない）。
 * 柱そのものは止まっている間に動かない（以前の波紋・抜ける光は 300本×2 で、試験で 7fps まで落ちていた）。出る・消えるときだけ動かす
 * （is-entering / is-leaving。sns-map-mapkit.js の placePillars）。動き続けるのは下の光の粒（.hn-mk-pillar-fx）だけで、画面に見えている熱い柱 24 本にだけ付ける。
 * 色は sns-map-mapkit.js の pillarAnnotation が根に付ける --hn-heat-rgb（熱の段階の body の r,g,b）・--hn-heat-light-rgb（light）・--hn-heat-deep-rgb（deep）
 */
.hn-mk-pillar {
    position: relative;
    z-index: 0;
    width: 40px;
    pointer-events: none;
    /* 足元（地面の灯り）を基準に、ズームに合わせて大きくする（--hn-pillar-k は sns-map-mapkit.js の declutter） */
    transform: scale(var(--hn-pillar-k, 1));
    transform-origin: 50% 100%;
    /* 昼の地図: 芯は熱の色を深くした色（白っぽい芯や黄色は明るい下地に溶けてしまう）。--hn-pillar-haze は外のにじみの濃さ */
    --hn-pillar-core: var(--hn-heat-deep-rgb);
    --hn-pillar-haze: .3;
}

/* 夜の地図: 芯は白に近い光（写真のライトピラーは芯が白く飛んで、縁に色が残る） */
.hn-mk-dark .hn-mk-pillar {
    --hn-pillar-core: var(--hn-heat-light-rgb);
    --hn-pillar-haze: .26;
}

/*
 * 光の柱の絵（1本につきこの要素1つ）。幅は枠（40px）の中央の 32px。枠の下端より 9px 下まで伸ばしてあり（地面の灯りの下半分）、
 * 地面（座標＝枠の下端）はこの要素の下から 9px の高さ。出る・消えるのアニメーションもこの要素で行う（足元基準）。
 * 上から順に:
 *   地面の灯り（32×18 の範囲だけに描く）: まぶしい光源の点・横に走る光の筋・地面に広がる光だまり
 *   光の帯（地面から上・幅 30px の範囲だけに描く。2026-10-20 に太さを 1.4 倍にした）: 細長い楕円を重ね、幅がほぼ一定で上へ薄れる帯にする。
 *   芯（中ほどまで明るさを保つ）・色の帯・中ほどの広がり・外のにじみ（上ほど横に広い楕円で、空へ向かってわずかに広がって見える）
 */
.hn-mk-pillar-light {
    position: absolute;
    display: block;
    left: 4px;
    bottom: -9px;
    width: 32px;
    height: calc(100% + 9px);
    transform-origin: 50% calc(100% - 9px);
    background:
        radial-gradient(circle 9px at 50% 50%, rgba(255, 255, 255, .9) 0, rgba(var(--hn-heat-light-rgb), .85) 1.3px, rgba(var(--hn-heat-rgb), .62) 3px, rgba(var(--hn-heat-rgb), .2) 5.5px, rgba(var(--hn-heat-rgb), 0)),
        radial-gradient(ellipse 11px 1px at 50% 50%, rgba(var(--hn-pillar-core), .42), rgba(var(--hn-pillar-core), 0)),
        radial-gradient(ellipse 16px 6.5px at 50% 50%, rgba(var(--hn-heat-rgb), .4), rgba(var(--hn-heat-rgb), .1) 60%, rgba(var(--hn-heat-rgb), 0)),
        radial-gradient(ellipse 2.24px 86% at 50% 100%, rgba(var(--hn-pillar-core), .95), rgba(var(--hn-pillar-core), .82) 45%, rgba(var(--hn-pillar-core), .38) 74%, rgba(var(--hn-pillar-core), 0)),
        radial-gradient(ellipse 6.3px 88% at 50% 100%, rgba(var(--hn-heat-rgb), .62), rgba(var(--hn-heat-rgb), .34) 45%, rgba(var(--hn-heat-rgb), .1) 80%, rgba(var(--hn-heat-rgb), 0)),
        radial-gradient(ellipse 9.8px 42% at 50% 38%, rgba(var(--hn-heat-rgb), .17), rgba(var(--hn-heat-rgb), 0)),
        radial-gradient(ellipse 14px 92% at 50% 100%, rgba(var(--hn-heat-rgb), var(--hn-pillar-haze)), rgba(var(--hn-heat-rgb), 0));
    background-repeat: no-repeat;
    background-size: 32px 18px, 32px 18px, 32px 18px, 30px calc(100% - 9px), 30px calc(100% - 9px), 30px calc(100% - 9px), 30px calc(100% - 9px);
    background-position: 0 100%, 0 100%, 0 100%, 1px 0, 1px 0, 1px 0, 1px 0;
    /* 消えるときは transition（消える途中でまた出すことになって is-leaving を外すと、いまの所からなめらかに戻る） */
    transition: transform .32s cubic-bezier(.5, 0, .9, .6), opacity .32s cubic-bezier(.5, 0, .9, .6);
}

/*
 * 出る（.64s。sns-map-mapkit.js の PILLAR_ENTER_MS と合わせる）: 地面に灯りがともり、ひと揺らぎしてから、光が空へ立ち上がって柱になる。
 * 出始めは柱ごとに少しずらす（--hn-pillar-delay。いっせいにそろって伸びると機械的に見える）。倍率は 1 を超えない（超えると大きく描き直す）
 */
.hn-mk-pillar.is-entering .hn-mk-pillar-light {
    animation: hn-mk-pillar-rise .64s var(--hn-pillar-delay, 0s) both;
}

@keyframes hn-mk-pillar-rise {
    0% {
        opacity: 0;
        transform: scale(.5, .06);
        animation-timing-function: cubic-bezier(.3, .9, .4, 1);
    }

    20% {
        opacity: 1;
        transform: scale(1, .14);
        animation-timing-function: cubic-bezier(.3, .55, .2, 1);
    }

    32% {
        opacity: .5;
    }

    44% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

/* 消える（.32s。PILLAR_LEAVE_MS と合わせる）: 光が細くほどけながら、空へ浮かんで薄れて消える */
.hn-mk-pillar.is-leaving .hn-mk-pillar-light {
    opacity: 0;
    transform: translateY(-14px) scaleX(.6);
}

/*
 * 柱の光の粒（2026-10-20。sns-map-mapkit.js の decoratePillars が、画面に見えている熱い柱 24 本にだけ付ける）。
 * 動かすのは transform と opacity だけ（コンポジタで動く）。遅れは負の値にして、付いた瞬間からもう登っている途中にする（そろって始まらない）。
 * 粒が見えるのは登る高さの 60% まで（そこで透明度が 0）。それより上は見えないので、周期は「見えている時間 ÷ 0.4」で、見えない間は 60%。
 * 入れ物は contain: layout paint style で、粒の描き直しが柱の外に及ばないようにする（粒は入れ物の中に収まる）
 */
.hn-mk-pillar-fx {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    contain: layout paint style;
    transition: opacity .32s;
}

.hn-mk-pillar.is-entering .hn-mk-pillar-fx,
.hn-mk-pillar.is-leaving .hn-mk-pillar-fx {
    opacity: 0;
}

/*
 * 地図を動かしている間（移動・拡大・縮小。sns-map-mapkit.js が地図に hn-mk-moving を付ける）は粒を外す（2026-10-26 ユーザー「SP でピンチ・地図移動が重い」）。
 * 粒は柱1本に7個・最大24本で、動かしている間は注釈と一緒に毎フレーム動かすことになるため。止めたら、ふわっと戻す（@starting-style。未対応の端末はそのまま出る）
 */
.hn-mk-moving .hn-mk-pillar-fx {
    display: none;
}

@starting-style {
    .hn-mk-pillar-fx {
        opacity: 0;
    }
}

.hn-mk-pillar-fx b {
    position: absolute;
    left: 50%;
    bottom: 4px;
    opacity: 0;
}

/* 粒: 芯は白（昼は熱の深い色）・まわりは熱の色でにじむ丸。7個を、大きさ・横のゆれ・速さ・遅れをずらして登らせる（2026-10-20 ユーザー指示: 数は 8 の 2/3 ほど・速さは 0.6 倍＝周期は 1/0.6 倍） */
.hn-mk-pillar-fx b {
    width: 9px;
    height: 9px;
    margin-left: -4.5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--hn-pillar-core), 1) 0, rgba(var(--hn-pillar-core), .9) 22%, rgba(var(--hn-heat-rgb), .6) 48%, rgba(var(--hn-heat-rgb), 0) 76%);
    /* 登る速さは下が速く上が遅い（ease-out。2026-10-20 ユーザー指示）。最高速度は 5.5 → 2.25（約 60% 減・2026-10-20）。位置は ease-out、透明度は時間どおり（linear）に分けて動かす */
    animation:
        hn-mk-pillar-mote-rise var(--t, 12s) var(--d, 0s) infinite cubic-bezier(.2943, .3271, .5886, .6939),
        hn-mk-pillar-mote-fade var(--t, 12s) var(--d, 0s) infinite linear;
}

.hn-mk-pillar-fx b:nth-child(1) { --x0: -3px;  --x1: 8px;   --t: 10.5s; --d: -0.5s; }
.hn-mk-pillar-fx b:nth-child(2) { --x0: 6px;   --x1: -9px;  --t: 13.4s; --d: -7.6s; width: 7px;  height: 7px;  margin-left: -3.5px; }
.hn-mk-pillar-fx b:nth-child(3) { --x0: -8px;  --x1: 3px;   --t: 9.2s; --d: -2.8s; width: 8px;  height: 8px;  margin-left: -4px; }
.hn-mk-pillar-fx b:nth-child(4) { --x0: 2px;   --x1: -4px;  --t: 14.8s; --d: -11.8s; width: 11px; height: 11px; margin-left: -5.5px; }
.hn-mk-pillar-fx b:nth-child(5) { --x0: -6px;  --x1: -10px; --t: 12.7s; --d: -2.3s; width: 8px;  height: 8px;  margin-left: -4px; }
.hn-mk-pillar-fx b:nth-child(6) { --x0: 8px;   --x1: -3px;  --t: 11.6s; --d: -7.9s;  width: 7px;  height: 7px;  margin-left: -3.5px; }
.hn-mk-pillar-fx b:nth-child(7) { --x0: -2px;  --x1: 5px;   --t: 13.6s; --d: -6.1s; width: 9px;  height: 9px;  margin-left: -4.5px; }

/*
 * 粒が見えているのは、登る高さの 60% まで（そこで透明度が 0）。そこから先は見えないので、周期は「見えている時間 ÷ 0.4」にして、
 * 見えない間を 60% に抑える（以前は登りきるまでの曲線を丸ごと回していて、見えない間が 74% もあり、粒がほとんど出てこなかった）。
 * 位置の曲線は、元の cubic-bezier(.2,.44,.4,1) の高さ 60% までの部分（0〜0.303）を取り出したもの（cubic-bezier(.2943,.3271,.5886,.6939)）。
 * 動きは元の曲線と同じ（最高速度 2.25・上へ行くほど遅い）。高さ 60% の位置＝上までの 0.57 倍・横は x0 から x1 の 0.6 の所・大きさ .48
 */
@keyframes hn-mk-pillar-mote-rise {
    0% {
        transform: translate(var(--x0, 0px), 0) scale(.6);
        animation-timing-function: cubic-bezier(.2943, .3271, .5886, .6939);
    }

    40% {
        transform: translate(calc(var(--x0, 0px) + (var(--x1, 0px) - var(--x0, 0px)) * .6), calc(var(--hn-pillar-h, 80px) * -.57)) scale(.48);
    }

    100% {
        transform: translate(calc(var(--x0, 0px) + (var(--x1, 0px) - var(--x0, 0px)) * .6), calc(var(--hn-pillar-h, 80px) * -.57)) scale(.48);
    }
}

/* 透明度: 登る高さの 11%（周期の 6%）で最も濃く、25%（15%）で .7、60%（40%）で 0 */
@keyframes hn-mk-pillar-mote-fade {
    0% {
        opacity: 0;
    }

    6% {
        opacity: 1;
    }

    15% {
        opacity: .7;
    }

    40% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hn-mk-pillar-fx {
        display: none;
    }

    .hn-mk-pillar .hn-mk-pillar-light,
    .hn-mk-pillar.is-entering .hn-mk-pillar-light,
    .hn-mk-pillar.is-leaving .hn-mk-pillar-light {
        animation: none;
        transition: none;
    }
}

/* 投稿ピン（MapKit 版）。場所のアイコンより上に出す。ひとこと（吹き出し）はズームしたときだけ */
.hn-mk-pin {
    position: relative;
    z-index: 2;
    background-size: 100% 100%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ひとこと（吹き出し）。ピンとは別の注釈で、いつもいちばん手前に足す（sns-map-mapkit.js の raisePins）。押すとピンと同じ投稿を開く */
.hn-mk-bubble {
    display: none;
    position: relative;
    background-size: 100% 100%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 名所へのコメントの続きがある印（吹き出しの下の ⋮。位置は sns-map-mapkit.js）。押しても投稿は開かない（下の名所のアイコンを押せるように） */
.hn-mk-bubble-more {
    position: absolute;
    background-size: 100% 100%;
    pointer-events: none;
}

/* 名所へのコメント（ピンなし・吹き出しだけ）。透明なピンの枠が名所のアイコンを押すのを邪魔しないよう、枠は押せなくする */
.hn-mk-pin.is-bubble-only {
    pointer-events: none;
}

.hn-mk-zoom-pin .hn-mk-bubble {
    display: block;
}

/* 投稿した人のアイコン。ピンの中の丸に重ねる（位置と大きさは sns-map-mapkit.js が付ける） */
.hn-mk-pin-avatar {
    position: absolute;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

/* まとめた投稿のピンは、投稿した人たちのアイコンを順にクロスフェードする（約2秒ごとに is-on を移す。sns-map-mapkit.js の FACE_CYCLE_MS）。
   アイコンの無い人の番は、どれも消えて下の灰色の人の形が見える */
.hn-mk-pin-avatar.is-fade {
    opacity: 0;
    transition: opacity .6s ease;
}

.hn-mk-pin-avatar.is-fade.is-on {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .hn-mk-pin-avatar.is-fade {
        transition: none;
    }
}

/* まとめた投稿の件数の丸（ピンの右上。絵は sns-map.js の createPinCountImage）。吹き出しを出すズームでは、吹き出しの「+N」に任せて隠す */
.hn-mk-pin-count {
    position: absolute;
    background-size: 100% 100%;
    pointer-events: none;
}

.hn-mk-zoom-pin .hn-mk-pin.has-bubble .hn-mk-pin-count {
    display: none;
}

/* 近くの投稿の一覧で見ている投稿。ピンの先端（座標）に、地面に置いた輪のように付ける（MapLibre 版は円の層） */
.hn-mk-pin.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    top: var(--hn-mk-pin-tip, 100%);
    width: 20px;
    height: 8px;
    margin: -4px 0 0 -10px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    background: rgba(31, 58, 95, .25);
    box-sizing: border-box;
    pointer-events: none;
}

/* 名前を出すかは sns-map-mapkit.js の declutter が決める（種類ごとのズームと、ほかの名前・アイコンに重ならないか。案C） */
.hn-mk-label.is-on {
    display: block;
}

/*
 * 場所のアイコン・停留所が出る・消えるときのアニメーション（2026-10-14 ユーザー指示「表示非表示する時にアイコンにアニメーションを入れてみて」）。
 * sns-map-mapkit.js の declutter が is-entering（出る）・is-leaving（消える。終わってから地図から外す）を付ける。
 * 2026-10-24 ユーザー指示「アイコンの登場・退場のアニメーションをシンプルに組み換えて」: 拡大・縮小とバウンスをやめ、透明度のフェードだけにした。
 * 描画の軽い opacity だけ（位置も大きさも動かさない）。長さは sns-map-mapkit.js の ENTER_MS・LEAVE_MS と合わせる
 */
@keyframes hn-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hn-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

.hn-mk-place.is-entering,
.hn-mk-stop.is-entering {
    animation: hn-fade-in .2s ease-out both;
}

.hn-mk-place.is-leaving,
.hn-mk-stop.is-leaving {
    animation: hn-fade-out .15s ease-in both;
}

/* 消えていくものは押せない */
.hn-mk-place.is-leaving .hn-mk-place-icon,
.hn-mk-stop.is-leaving {
    pointer-events: none;
}

.hn-mk-dark .hn-mk-label {
    color: #cfc8bd;
    text-shadow: 0 0 1.2px #12161a, 0 0 1.2px #12161a, 1px 0 1px #12161a, -1px 0 1px #12161a, 0 1px 1px #12161a, 0 -1px 1px #12161a;
}

.hn-mk-dark .hn-mk-place--place .hn-mk-label {
    color: #ece6dc;
}

/* ---------- トースト ---------- */
/* 知らせは画面の上（ヘッダーのすぐ下）に出す。下はシート・一覧・現在地ボタンなどで埋まっていることが多いため。
   左右いっぱいまで使えるようにし（left: 50% だと幅が画面の半分に縮んで改行が増える）、短い文はその幅で真ん中に置く */
.toast {
    position: absolute;
    top: max(calc(env(safe-area-inset-top) + 8px), calc(var(--hdr-h, 130px) - 4px));
    left: 12px;
    right: 12px;
    width: fit-content;
    margin: 0 auto;
    z-index: 1200;
    background: rgba(43, 58, 74, .94);
    color: #fff;
    font-size: 12px;
    padding: 10px 16px;
    border-radius: 99px;
    text-align: center;
    line-height: 1.5;
}

.toast.err {
    background: rgba(192, 57, 43, .95);
}

/* マイページ（.page。地図の画面ではない）の知らせ。ヘッダーが無いので画面の一番上に出す。
   中身がスクロールしても動かないよう fixed。長い文は何行かになるので、角は丸薬ではなく少しだけ丸める */
.page > .toast {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 12px);
    max-width: 496px;
    border-radius: 14px;
    font-size: 13px;
    text-align: left;   /* 2026-10-21 ユーザー指示。複数行になる長い文を読みやすく左寄せ（地図の画面の .toast は中央のまま） */
    cursor: pointer;
}

/* ---------- ボトムシート（名所の詳細・一覧） ---------- */
/* 画面下メニューの上に出す。閉じたときはメニューの裏（画面外）まで下げる */
.sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--tabbar-space);
    z-index: 1100;
    background: var(--bg);
    border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
    padding: 8px 18px 18px;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .18);
    transform: translateY(calc(100% + var(--tabbar-space) + 30px));
    transition: transform .26s cubic-bezier(.32, .72, 0, 1);
    max-height: calc(88% - var(--tabbar-space));
    overflow-y: auto;
    will-change: transform;
}

.sheet.open {
    transform: translateY(0);
}

/* 右上の閉じるボタン（×）。スクロールしても上に残す。
   下の余白を詰めて、後ろの見出し・写真の上に重ねる（場所を取らないように） */
.sheet-close {
    position: sticky;
    top: 0;
    z-index: 3;
    display: block;
    width: 34px;
    height: 34px;
    margin: -8px -8px -34px auto;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(253, 252, 245, .94);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    cursor: pointer;
}

.sheet-close::before,
.sheet-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    border-radius: 1px;
    background: var(--ink);
}

.sheet-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.sheet-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* バスのシートには見出しが無く、× が入力欄（検索ボタン）に重なるので、× の分だけ下げて置く */
.sheet--bus .sheet-close {
    width: 28px;
    height: 28px;
    margin: -2px -2px 6px auto;
}

/* SP（〜767px）: シートは下にスワイプして閉じるので、× は出さない */
@media (max-width: 767px) {
    .sheet .sheet-close {
        display: none;
    }
}

/* PC（768px〜）: 画面いっぱいの下からのシートではなく、左端のコンパクトなパネルで出す */
@media (min-width: 768px) {
    .sheet {
        left: 16px;
        right: auto;
        width: 380px;
        bottom: calc(var(--tabbar-space) + 16px);
        border-radius: var(--sheet-radius);
        /* 上はヘッダー（2段）の下まで */
        max-height: calc(100% - var(--tabbar-space) - 132px);
        box-shadow: 0 6px 28px rgba(0, 0, 0, .22);
        transform: translateX(calc(-100% - 40px));
    }

    .sheet.open {
        transform: translateX(0);
    }

    /* つまみ（下へ引く目印）はスマホのシート用 */
    .sheet .grip {
        display: none;
    }

    .sheet .sheet-close {
        margin-top: 0;
    }
}

.grip {
    width: 38px;
    height: 4px;
    border-radius: 99px;
    background: var(--line);
    margin: 0 auto 14px;
}

.sheet h2 {
    font-size: 14px;
    margin: 0 0 10px;
    font-weight: 700;
}

.btn-row {
    display: flex;
    gap: 9px;
}

.btn {
    flex: 1;
    height: 38px;           /* 2026-10-21 ユーザー指示「ボタンがでかすぎる」で 50px から小さくした */
    padding: 0 16px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.btn.primary {
    background: var(--navy);
    color: #fff;
}

/* 夜の地図は下地が暗いので、紺色を少し明るくして見分けやすくする */
body.is-dark .btn.primary {
    background: #35598f;
}

body.is-dark .btn.primary:disabled {
    background: #3a4147;
}

.btn.primary:disabled {
    background: #d8d2c8;
    color: #fff;
}

.btn.ghost {
    flex: 0 0 80px;
    background: #f1eee8;
    color: var(--ink-sub);
}

.detail-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.detail-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
}

/* 名前＋種類。右端のバスのボタンと並ぶので、長い名前は折り返す */
.detail-head-body {
    flex: 1 1 auto;
    min-width: 0;
}

/* 写真が無い（枠も出さない・読み込めず隠した）場所は名前の行が一番上に来て、右上の × とバスのボタンが重なる。× の分だけ下げる（× を出すのは PC だけ） */
@media (min-width: 768px) {
    .place-fixed > .detail-head:first-child,
    .place-photo[hidden] + .detail-head {
        padding-top: 36px;
    }
}

.detail-cat {
    font-size: 12px;
    font-weight: 700;
}

.detail-time {
    font-size: 11px;
    color: var(--ink-sub);
    margin-top: 3px;
}

.detail-body {
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
    margin: 0 0 14px;
    word-break: break-word;
}

.place-source {
    margin: 0 0 12px;
    font-size: 11px;
    color: #8a8f96;
}

/* 外へのリンク（宿の予約・公式サイト・電話。2026-11-05）。2026-10-21 に消したボタン群と同じ見た目 */
.place-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}

.place-links a {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--bg);
    color: var(--ink);
    font-size: 13px;
    text-decoration: none;
}

body.is-dark .place-links a {
    background: #2b3238;
    color: #e8e8e8;
    border-color: #3a4147;
}

/* 広告（バナー・2026-11-05）。名所・お店の詳細とマイページ。上に小さく「広告」の札。画像は大きさを持ったまま、幅に収まるよう縮める */
.ad-slot {
    position: relative;
    margin: 16px 0 8px;
    text-align: center;
}

.ad-slot__box {
    display: inline-block;
    max-width: 100%;
    text-align: left;
    vertical-align: top;
}

.ad-slot__label {
    display: block;
    margin-bottom: 3px;
    color: var(--ink);
    font-size: 10px;
    line-height: 1.4;
    opacity: .6;
}

body.is-dark .ad-slot__label {
    color: #e8e8e8;
}

.ad-slot__box a {
    display: block;
    line-height: 0;
}

.ad-slot__box img {
    max-width: 100%;
    height: auto;
}

/* 計測用の 1px（A8 の 0.gif）。読み込ませるだけで、場所は取らない */
.ad-slot__px {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.place-empty {
    color: #8a8f96;
}

/* 営業時間・定休日・時間・料金などの定型の表（罫線なし。2026-10-24 ユーザー指示）。左が項目名、右が内容。営業時間は曜日と時間を行ごとにそろえる */
.info-table {
    width: 100%;
    margin: 0 0 12px;
    border: none;
    border-collapse: collapse;
    font-size: 13px;   /* 2026-10-24 ユーザー指示「もう少し小さく」で 14px から小さくした（項目名・内容とも） */
    line-height: 1.6;
}

.info-table th,
.info-table td {
    padding: 3px 0;
    border: none;
    text-align: left;
    vertical-align: top;
}

.info-table th {
    width: 5.5em;
    padding-right: 12px;
    color: inherit;   /* 項目名の色は本文と同じ（2026-10-24 ユーザー指示。以前は薄いグレーだった） */
    font-weight: 700;
    white-space: nowrap;
}

.info-table td {
    overflow-wrap: anywhere;
}

.info-table td.is-empty {
    color: #8a8f96;
}

.info-line {
    display: flex;
    gap: 10px;
}

.info-days {
    flex: 0 0 auto;
    min-width: 5.2em;
}

.info-time {
    min-width: 0;
}

/* この中にあるもの（グループの中の場所。種類の札の色は PlaceCategories::badge） */
.tenants {
    margin-bottom: 14px;
}

.tenants .tenants-head {
    font-weight: 700;
}

.tenants .detail-body {
    margin-bottom: 6px;
}

/* テナントの中の店（押すとその店の詳細へ） */
.tenant-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 6px;
    padding: 8px 10px;
    border: 1px solid rgba(128, 128, 128, .35);
    border-radius: 10px;
    background: rgba(128, 128, 128, .08);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tenant-row:active {
    background: rgba(128, 128, 128, .2);
}

.tenant-thumb {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #eee;
    background-size: cover;
    background-position: center;
}

.tenant-name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.tenant-name small {
    display: block;
    color: #7a7068;
    font-size: 11px;
    font-weight: 400;
}

.tenant-go {
    flex: 0 0 auto;
    color: #b0a79c;
    font-size: 18px;
    line-height: 1;
}

.tenant-badge {
    display: inline-block;
    margin-right: 6px;
    padding: 0 7px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    vertical-align: 2px;
}

/* 場所のパネルの「情報」「コメント」のタブ（2026-10-21）。下線が付いているほうが開いている */
.place-pane-tabs {
    display: flex;
    margin: 0 0 8px;
    border-bottom: 1px solid var(--line);
}

.place-pane-tab {
    flex: 1;
    margin-bottom: -1px;
    padding: 8px 0 7px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--ink-sub);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.place-pane-tab.on {
    border-bottom-color: var(--accent);
    color: var(--ink);
}

.place-pane-tab-n {
    margin-left: 5px;
    font-size: 12px;
    font-weight: 400;
}

/* 場所の「写真」タブ（2026-10-24 ユーザー指示。Google マップのように写真を足せる。運営の確認後に出る） */
.place-photos {
    margin: 0 0 16px;
}

.place-photos-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 6px;
}

.place-photos-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.place-photos-add.busy {
    opacity: .6;
    cursor: default;
}

.place-photos-note {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--ink-sub);
}

.place-photos-head .place-photos-note {
    margin: 0;
}

.place-photos-note a {
    color: var(--accent-dark);
}

/* 写真は3列の正方形（切り抜き）。タップで大きく見る */
.place-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.place-photos-item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: var(--line);
    overflow: hidden;
    cursor: pointer;
}

.place-photos-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.place-photos-badge {
    position: absolute;
    left: 4px;
    bottom: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

/* 写真を大きく見る（どこをタップしても閉じる） */
.photo-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: calc(env(safe-area-inset-top, 0px) + 52px) 12px calc(env(safe-area-inset-bottom, 0px) + 24px);
    background: rgba(0, 0, 0, .92);
    animation: hn-viewer-in .22s ease-out;
}

.photo-viewer img {
    display: block;
    max-width: 100%;
    max-height: calc(100% - 40px);
    object-fit: contain;
    border-radius: 6px;
}

.photo-viewer-credit {
    margin: 0;
    color: #cfd3d8;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}

.photo-viewer-credit a {
    color: inherit;
}

.photo-viewer-close {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    cursor: pointer;
}

.photo-viewer-close::before,
.photo-viewer-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    border-radius: 1px;
    background: #fff;
}

.photo-viewer-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.photo-viewer-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

@keyframes hn-viewer-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .photo-viewer {
        animation: none;
    }
}

/* 名所へのコメントの一覧（2026-10-12）。見た目は投稿の一覧（.feed-item）にそろえる。コメントのタブの中身（2026-10-21） */
.place-comments {
    margin: 0 0 16px;
}

/* コメントのタブの一番上の入力欄（YouTube ショートのコメント欄の形。2026-10-21）: 丸いアイコン・丸い入力欄・送信ボタン */
.place-compose {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 2px 0 12px;
    border-bottom: 1px solid var(--line);
}

.place-compose > .feed-avatar {
    margin-top: 4px;
}

.place-compose-main {
    flex: 1 1 auto;
    min-width: 0;
}

/* 入力シートの textarea（.sheet textarea）より強くして、1行の丸い入力欄にする。16px 以上は iOS で拡大されないため */
.sheet .place-compose-input {
    display: block;
    width: 100%;
    min-height: 38px;
    max-height: 96px;
    padding: 7px 14px;
    border-radius: 19px;
    line-height: 1.5;
    resize: none;
    overflow-y: auto;
}

.sheet .place-compose-input:focus {
    border-color: var(--accent);
    outline: none;
}

.place-compose-hint {
    display: flex;
    gap: 8px;
    margin: 4px 4px 0;
    color: var(--ink-sub);
    font-size: 11px;
}

.place-compose-hint .len {
    flex: none;
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.place-compose-send {
    flex: none;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

.place-compose-send:disabled {
    background: #d8d2c8;
    cursor: default;
}

.place-compose-note {
    margin: 4px 0 10px;
    color: var(--ink-sub);
    font-size: 13px;
}

.place-compose-note a {
    color: var(--accent-dark);
}

.place-comments-empty {
    margin: 6px 0 0;
    color: var(--ink-sub);
    font-size: 13px;
}

.place-comment {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.place-comment:last-child {
    border-bottom: none;
}

/* 場所のコメントの「いいね」と「消す」（2026-10-21）: ハートを少し小さくし、「消す」は下線なしで本文に詰める */
.place-comment .feed-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}

.place-comment .like-btn i {
    font-size: 13px;
}

.place-comment .comment-del {
    margin: 0;
    padding: 4px 0;
    text-decoration: none;
}

.comment-del {
    margin-left: 6px;
    padding: 4px 6px;
    border: none;
    background: none;
    color: var(--ink-sub);
    font: inherit;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

/* 写真（名所・投稿の詳細）。元の縦横比に関わらず 16:9 で切り抜いて高さを揃える。名所のパネルだけは下の .sheet--place で 4:5（縦長）にする */
.place-photo {
    margin: 6px 0 12px;
}

.place-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    background: var(--line);
}

/* 名所のパネルの写真の縦横比は --place-photo-ratio（今は 4:3）。パネルの高さが変わっても（小さく出す／全画面）伸び縮みさせない（2026-10-24 ユーザー指示で 16:9 → 1:1 → 4:5） */
.sheet--place .place-photo img {
    aspect-ratio: var(--place-photo-ratio);
}

.place-photo figcaption {
    margin-top: 6px;
    color: #8a8f96;
    font-size: 11px;
    line-height: 1.5;
    overflow-wrap: anywhere;   /* 撮影者名・ライセンス名が長いので省略せず折り返す（表記は省けない） */
}

.place-photo figcaption a,
.place-source a {
    color: inherit;
}

/* 写真が無い場所（施設は除く）の枠。場所のパネルの写真と同じ比率（--place-photo-ratio）・角丸 12px */
.place-photo-none {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: var(--place-photo-ratio);
    border: 1px dashed #cfc9bd;
    border-radius: 12px;
    background: #f1eee8;
    color: #5a6672;
    font-size: 13px;
}

.place-photo-none i {
    font-size: 26px;
}

/* 写真の投稿ボタン（写真の無い場所・運営の承認制。2026-10-22） */
.place-photo-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #2b3a4a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.place-photo-none .place-photo-add i {
    font-size: 13px;
}

.place-photo-add.busy {
    opacity: .6;
    cursor: default;
}

.place-photo-sent {
    color: #2b7a4b;
    font-size: 12px;
    font-weight: 700;
}

/* 場所のパネル（SP）: Google マップのように2段階（2026-10-24 ユーザー指示）。中身（写真など）は伸び縮みさせず、パネルの高さだけが変わる。
   ・小さく出す（既定）: 写真（4:5）・場所の名前・詳細／コメントのタブまでが見える高さ（app.js の measurePlacePeek が測って --place-peek-h に入れる）。その下の中身は隠れる
   ・上へ引くと指に合わせて伸び、離すと全画面（.is-expanded。上端〜下メニューの上）。広げたあとは、パネル全体がスクロールして残り（保存・チェックイン・説明・営業時間・コメント）まで見られる
   ・下へ引くと小さくなり、小さい状態からさらに下へ引くと閉じる。
   PC は下のほうの @media (min-width: 768px)。SP で画面が低い（横向きなど）ときだけ、2段階にせず今までどおりパネル全体をスクロールにする */
@media (max-width: 767px) and (min-height: 561px) {
    .sheet--place {
        height: max(var(--place-peek-h, 70%), 180px);
        max-height: calc(100% - var(--tabbar-space) - 24px);
        padding-bottom: 0;
        overflow: hidden;
    }

    .place-scroll {
        padding-bottom: 18px;
    }

    /* 広げた状態: 画面いっぱい。パネル全体がスクロールする */
    .sheet--place.is-expanded {
        height: calc(100% - var(--tabbar-space));
        max-height: calc(100% - var(--tabbar-space));   /* none だと高さのアニメーションに入らないので、同じ長さで書く */
        padding-top: calc(env(safe-area-inset-top, 0px) + 8px);
        border-radius: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    /* つまみは指で押しやすいよう当たりを広げる（タップで広げる・小さくする） */
    .sheet--place .grip {
        position: relative;
        cursor: pointer;
    }

    .sheet--place .grip::after {
        content: '';
        position: absolute;
        inset: -12px -40px;
    }
}

/* 場所のパネル（PC）: パネル全体がスクロールする（写真は 4:5 のまま）。タブのある場所は高さを固定して、タブを切り替えてもパネルの高さが変わらないようにする */
@media (min-width: 768px) {
    .sheet--place {
        scrollbar-gutter: stable;   /* スクロール棒の出入りで、中身の幅がずれないように */
    }

    .sheet--place.has-pane-tabs {
        height: min(720px, calc(100% - var(--tabbar-space) - 132px));
    }
}

/* ---------- 暗色（夜向け）デザイン ---------- */
body.is-dark {
    background: #1f2428;    /* 画面下メニューと同じ色 */
    /* 暗い面では紺色が沈むので、紺色系のまま明るくする（文字・塗りの両方で読める中間の青） */
    --accent: #5f86c6;
    --accent-dark: #8fb0e0;
}

body.is-dark #map {
    background: #2b2b2b;
}

body.is-dark .hdr h1,
body.is-dark .hdr .count {
    color: #f2f2f2;
}

body.is-dark .chip,
body.is-dark .locate {
    background: #1f2428;
    color: #e8e8e8;
    border-color: #3a4147;
}

body.is-dark .chip.on {
    background: #f2f2f2;
    color: #1f2428;
    border-color: #f2f2f2;
}

/* 名所の詳細パネルの見出し */
.place-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

/* ---------- 近くの名所・保存（一覧） ---------- */
.save-tabs {
    margin-bottom: 6px;
}

.locate.busy {
    opacity: .6;
}

.sheet-note {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 400;
    color: var(--ink-sub);
}

.nearby-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nearby-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 2px;
    border: none;
    border-bottom: 1px solid var(--line);
    background: none;
    font-family: inherit;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.nearby-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
}

.nearby-body {
    flex: 1 1 auto;
    min-width: 0;
}

/* 長い名前も「…」で切らずに折り返して全部出す（No.31） */
.nearby-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.nearby-kind {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--ink-sub);
}

/* リスト: 名前だけの行の下に、アイコン＋種類（カテゴリ）を横に並べる */
.nearby-item--kind-icon .nearby-kind {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.nearby-item--kind-icon .nearby-icon {
    width: 24px;
    height: 24px;
}

.nearby-dist {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--ink-sub);
    font-variant-numeric: tabular-nums;
}

/* チェックインできる距離の目安に入っているもの */
.nearby-dist.near {
    color: var(--accent-dark);
    font-weight: 700;
}

body.is-dark .sheet {
    background: #1f2428;
    color: #e8e8e8;
}

body.is-dark .nearby-item {
    color: #e8e8e8;
    border-bottom-color: #3a4147;
}

body.is-dark .btn.ghost {
    background: #2b3238;
    color: #b9c0c6;
}

/* 写真が無い場所の枠（夜の地図） */
body.is-dark .place-photo-none {
    border-color: #434b52;
    background: #2b3238;
    color: #a3aab1;
}

body.is-dark .place-photo-add {
    background: #f4f1ea;
    color: #1f2a33;
}

body.is-dark .place-photo-sent {
    color: #7fd1a0;
}

body.is-dark .place-pane-tabs {
    border-bottom-color: #3a4147;
}

body.is-dark .place-pane-tab {
    color: #a3aab1;
}

body.is-dark .place-pane-tab.on {
    border-bottom-color: var(--accent);
    color: #e8e8e8;
}

body.is-dark .place-compose {
    border-bottom-color: #3a4147;
}

body.is-dark .place-compose-send {
    background: #35598f;
}

body.is-dark .place-compose-send:disabled {
    background: #3a4147;
}

/* ---------- まぁーるバス乗換案内のシート ---------- */
/* 移植した bus-route.css が濃紺の背景を前提にしているため、このシートの中だけ配色を変える */
.sheet--bus {
    background: #001727;
    color: #fff;
    /* 検索前は中身の分（画面の 1/8 ほど）だけの高さ。結果が出たらここまで伸びる */
    max-height: calc(64% - var(--tabbar-space));
    padding: 6px 12px 10px;
}

.sheet--bus .grip {
    margin-bottom: 8px;
}

.sheet--bus h2 {
    color: #fff;
}

.sheet--bus .bus-sheet__hint {
    margin: 6px 0 0;
    font-size: 1rem;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, .7);
}

/* 地図の破線と同じ色で、西回り・東回りを示す */
.sheet--bus .bus-sheet__legend {
    margin: 0 2px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    color: #fff;
}

.sheet--bus .bus-sheet__legend--west {
    background: #d9480f;
}

.sheet--bus .bus-sheet__legend--east {
    background: #1565c0;
}

/* 夜の地図の線の色（sns-map.js の BUS_COLORS.night）。地が明るいので文字は濃い色 */
body.is-dark .sheet--bus .bus-sheet__legend {
    color: #10202c;
}

body.is-dark .sheet--bus .bus-sheet__legend--west {
    background: #ffa04d;
}

body.is-dark .sheet--bus .bus-sheet__legend--east {
    background: #4fb3ff;
}

.sheet--bus .grip {
    background: rgba(255, 255, 255, .35);
}

.sheet--bus .btn.ghost {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

/*
 * 停留所を選んでいる間（候補の一覧が開いている間・app.js の busPick。.is-picking と data-picking="origin|dest"）。
 * 選んでいる欄と候補だけを出し、候補は欄の下にシートの中で並べる（以前は欄の下に重ねて出し、シートの枠で切れていた）。
 * SP はシートを画面の上まで広げる（キーボードに欄と候補が隠れないように。名前で探すを上から出したのと同じ理由）。
 * PC は左下のパネルが上へ伸びる
 */
.sheet--bus.is-picking .grip,
.sheet--bus.is-picking .sheet-close,
.sheet--bus.is-picking .bus-sheet__geo,
.sheet--bus.is-picking .bus-sheet__search,
.sheet--bus.is-picking .bus-route-form > :not(.bus-route-form__pair),
.sheet--bus.is-picking .page--bus-route > :not(.bus-route-form),
.sheet--bus[data-picking="origin"] .bus-sheet__row--dest,
.sheet--bus[data-picking="dest"] .bus-sheet__row--origin {
    display: none;
}

.sheet--bus.is-picking .bus-route-form__pair {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
}

.sheet--bus.is-picking .bus-route-form__row {
    grid-area: auto;
}

/* 高さの上限は PC 用。SP は app.js（fitBusPickList）がキーボードの上端までに合わせる */
.sheet--bus.is-picking .bus-route-combo__list {
    position: static;
    margin-top: 8px;
    max-height: min(400px, calc(100vh - 360px));
    box-shadow: none;
    transform: none;
}

.bus-pick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 8px;
}

.bus-pick-head__title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.bus-pick-head__back {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 4px 14px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
}

body:not(.is-dark) .bus-pick-head__back {
    border-color: rgba(0, 0, 0, .2);
    background: rgba(0, 0, 0, .04);
}

@media (max-width: 767px) {
    .sheet--bus.is-picking {
        top: 0;
        max-height: none;
        border-radius: 0;
        padding-top: calc(env(safe-area-inset-top) + 10px);
        /* スクロールは候補の一覧の中だけ */
        overflow: hidden;
    }

    /* 指で選びやすいよう、1件ずつの高さを取る */
    .sheet--bus.is-picking .bus-route-combo__item,
    .sheet--bus.is-picking .bus-route-combo__empty {
        padding: 11px 12px;
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    /* 上はほかのパネルと同じくヘッダーの下まで伸ばせる */
    .sheet--bus.is-picking {
        max-height: calc(100% - var(--tabbar-space) - 132px);
    }
}

/*
 * バスのシートもほかのシートと色をそろえる（No.29）。
 * 昼・標準の地図: 白い下地に濃紺の文字（移植元の濃紺前提の色を、ここで明るい配色に上書きする）。
 * 夜の地図: ほかのシートと同じ暗い色（#1f2428）。
 */
body.is-dark .sheet--bus,
body.is-dark .sheet--bus .page--bus-route {
    background: #1f2428;
}

body:not(.is-dark) .sheet--bus {
    background: var(--bg);
    color: var(--ink);
}

body:not(.is-dark) .sheet--bus h2 {
    color: var(--ink);
}

body:not(.is-dark) .sheet--bus .bus-sheet__hint,
body:not(.is-dark) .sheet--bus .bus-route-disclaimer {
    color: var(--ink-sub);
}

body:not(.is-dark) .sheet--bus .grip {
    background: rgba(0, 0, 0, .2);
}

body:not(.is-dark) .sheet--bus .btn.ghost {
    background: rgba(0, 0, 0, .06);
    color: var(--ink);
}

body:not(.is-dark) .sheet--bus .page--bus-route {
    background: transparent;
    color: var(--ink);
}

body:not(.is-dark) .sheet--bus .page--bus-route .c-link,
body:not(.is-dark) .sheet--bus .page--bus-route .c-link:hover {
    color: var(--ink);
    text-decoration-color: rgba(0, 0, 0, .35);
}

body:not(.is-dark) .sheet--bus .bus-route-form {
    background: rgba(0, 0, 0, .03);
    border-color: var(--line);
}

body:not(.is-dark) .sheet--bus #bus-route-geo-btn,
body:not(.is-dark) .sheet--bus .bus-route-save-btn {
    background-color: rgba(0, 0, 0, .04);
    border-color: rgba(0, 0, 0, .2);
    color: var(--ink);
}

body:not(.is-dark) .sheet--bus #bus-route-geo-btn:hover,
body:not(.is-dark) .sheet--bus .bus-route-save-btn:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, .08);
    color: var(--ink);
}

body:not(.is-dark) .sheet--bus #bus-route-search-btn,
body:not(.is-dark) .sheet--bus #bus-route-search-btn:hover {
    background-color: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

body:not(.is-dark) .sheet--bus .bus-route-saved__heading {
    color: var(--ink);
}

/* ---------- アクセスモードのシート（2026-11-05。萩の外の駅・空港・バスのりば・駅の一覧と、萩までの行き方） ---------- */
/* SP は上の地図が見えるよう半分弱まで（中はスクロール。引いた地図で新山口駅〜益田駅がシートの上に収まる高さ）。PC はほかのパネルと同じ左のパネル */
@media (max-width: 767px) {
    .sheet--access {
        max-height: calc(44% - var(--tabbar-space));
    }
}

.sheet--access h2 {
    margin-bottom: 4px;
}

.access-hint {
    margin: 0;
    font-size: 11px;
    line-height: 1.6;
    color: var(--ink-sub);
}

/* 地図の点線の見本（sns-map.js の ACCESS_LINE_COLORS と同じ色） */
.access-legend {
    display: inline-block;
    width: 22px;
    margin: 0 4px 0 2px;
    border-top: 3px dotted #37474f;
    vertical-align: middle;
}

.access-sub {
    margin: 12px 0 2px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-sub);
}

.access-outside {
    list-style: none;
    margin: 0;
    padding: 0;
}

.access-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 9px 2px;
    border: none;
    border-bottom: 1px solid var(--line);
    background: none;
    font-family: inherit;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

/* 地図の萩の外の印（.hn-mk-gate-badge）と同じ丸 */
.access-row-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #37474f;
    color: #fff;
    font-size: 13px;
}

.access-row-body {
    flex: 1 1 auto;
    min-width: 0;
}

.access-row-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.access-row-name small {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 400;
    color: var(--ink-sub);
}

.access-row-note {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.55;
    color: var(--ink-sub);
}

/* バスのりば・駅は数が多いので、押せる札を折り返して並べる */
.access-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.access-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 4px 11px 4px 5px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--bg);
    font-family: inherit;
    font-size: 12px;
    color: var(--ink);
    cursor: pointer;
}

.access-chip img {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
}

/* 本文（/access と同じもの）。シートでは見出し「萩へのアクセス」は上の h2 があるので出さない */
.sheet--access .access-guide {
    margin-top: 16px;
    padding-top: 2px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    line-height: 1.75;
}

.sheet--access .access-guide h1 {
    display: none;
}

.sheet--access .access-guide h2 {
    margin: 18px 0 4px;
    font-size: 14px;
}

.sheet--access .access-guide h3 {
    margin: 14px 0 4px;
    font-size: 13px;
}

.sheet--access .access-guide hr {
    margin: 14px 0 8px;
    border: 0;
    border-top: 1px solid var(--line);
}

body.is-dark .access-legend {
    border-top-color: #e3e9ef;
}

body.is-dark .access-row,
body.is-dark .access-chip,
body.is-dark .sheet--access .access-guide {
    color: #e8e8e8;
    border-color: #3a4147;
}

body.is-dark .access-chip {
    background: #2b3238;
}

body.is-dark .access-row-icon {
    background: #e3e9ef;
    color: #1f2428;
}

body.is-dark .sheet--access .access-guide h3 {
    border-bottom-color: #3a4147;
}

body.is-dark .sheet--access .access-guide hr {
    border-top-color: #3a4147;
}

/* ---------- 画面下のメニュー（partials/tabbar.blade.php。地図ページ・通常ページ共通） ---------- */
/* #app の外に置き、ホームインジケーター周辺の安全領域まで背景を塗る */
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1300;
    /* メニュー（地図・投稿・リスト・バス・フォロワー）を同じ幅で5つ並べる。日記・マイページは 2026-11-04 に地図の右上のハンバーガー（.hdr-menu）へ移した。
       真ん中の＋は 2026-10-21 に現在地ボタンの下の丸（.post-fab）へ移した。フォロワーは 2026-11-04 に右端へ足した */
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: var(--tabbar-space);
    padding-bottom: var(--tabbar-pad);
    background: var(--bg);
    border-top: 1px solid var(--line);
}

/* standalone で表示領域が画面の下端まで届かない端末でも隙間が見えないよう、背景を下へ伸ばす */
.tabbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 80px;
    background: inherit;
}

/* 一時: 下メニューを隠して見比べる（ヘッダーの「下UI」で切り替え）。
   メニューの高さを 0 にするので、シート・現在地ボタン・著作権表示も自動で下へ寄る */
body.no-tabbar {
    --tabbar-h: 0px;
    /* --tabbar-space は :root で計算済みのため、こちらも上書きしないと他の部品が動かない */
    --tabbar-space: var(--tabbar-pad);
}

body.no-tabbar .tabbar {
    display: none;
}

/* PC: 横幅いっぱいに並べると項目の間が間延びするので、背景は端まで塗ったまま中身を 560px で中央に寄せる */
@media (min-width: 768px) {
    .tabbar {
        padding-inline: max(0px, calc((100% - 560px) / 2));
    }
}

.tabbar-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--ink-sub);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;   /* 幅の狭い端末でも「近くの投稿」「マイページ」を2行に折らない */
    text-decoration: none;
}

.tabbar-item svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tabbar-item:active {
    opacity: .6;
}

.tabbar-item[aria-current="page"] {
    color: var(--accent-dark);
}

.tabbar-item[aria-current="page"] svg {
    fill: rgba(31, 58, 95, .18);
}

/* 近くの名所を探している間 */
.tabbar-item.busy svg {
    animation: tabbar-busy 1s ease-in-out infinite;
}

@keyframes tabbar-busy {
    50% {
        opacity: .3;
    }
}

/* 投稿フォームの「位置を調整」 */
.post-where {
    margin: -6px 0 10px;
}

.post-where-btn {
    padding: 0;
    border: none;
    background: none;
    color: var(--accent-dark);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
}

/* 調整シートの「現在地に戻す」は折り返さない幅にする */
.post-adjust-here {
    flex: 0 0 auto;
    padding: 0 18px;
    white-space: nowrap;
}

/* 位置の調整中に画面中央へ出すピン。先端（下端）が地図の中心に来るよう持ち上げる */
.post-pin {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1050;
    width: 32px;
    height: 44px;
    transform: translate(-50%, -100%);
    pointer-events: none; /* 地図の操作を妨げない */
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3));
}

.post-pin svg {
    display: block;
    width: 100%;
    height: 100%;
}

.post-pin path {
    fill: var(--accent);
    stroke: #fff;
    stroke-width: 2;
}

.post-pin circle {
    fill: #fff;
}

/* 投稿ボタン（＋）。2026-10-21 に下のメニューの真ん中から、現在地ボタンの下の丸へ移した（試し）。白い丸に紺色の＋。
   戻すときは tabbar.blade.php のコメントを見る */
.post-fab {
    position: absolute;
    z-index: 1000;
    right: 14px;
    bottom: calc(var(--tabbar-space) + 26px);   /* いちばん下。その上に現在地・更新 */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;       /* クリーム色の地でも丸が浮くよう、ここだけ純白（2026-10-21 ユーザー指示） */
    color: var(--navy);     /* ＋は紺色。夜の地図でも --navy は変わらない */
    border: 1px solid var(--line);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
    cursor: pointer;
}

.post-fab svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
}

.post-fab:active {
    transform: scale(.94);
}

/* 現在地を取っている間の読み込み表示。萩nonta 本サイトのページ遷移の読み込み（四角が 90 度ずつ回る・1.2 秒）と同じ動きを 1 個の四角で。
   本サイトは紺地に白い四角、ここは白い丸なので四角は紺色 */
.post-fab__square {
    display: block;
    width: 10px;
    height: 10px;
    background: var(--navy);
    animation: sns-square-turn 1.2s ease-in-out infinite;
}

@keyframes sns-square-turn {
    0% {
        transform: rotate(0deg);
        animation-timing-function: ease-in-out;
    }
    33.33%,
    100% {
        transform: rotate(90deg);
    }
}

body.is-dark .tabbar {
    background: #1f2428;
    border-top-color: #3a4147;
}

body.is-dark .tabbar-item {
    color: #9aa3ab;
}

body.is-dark .tabbar-item[aria-current="page"] {
    color: #8fb0e0;
}

/* ---------- 近くの投稿（下のメニュー。地図と投稿の一覧） ---------- */
/* SP は地図を画面いっぱいのまま、下側に一覧を重ねる（画面の幅いっぱい）。一覧の上を空け、そこに地図が見えるようにする
   （投稿の地点は上の空いた所に出す。地図の枠の余白は app.js の applyFeedCover）。
   一覧は下のメニューの上まで。SP は一覧を出している間も下のメニューを出したままにする（2026-10-24 ユーザー指示。メニューの「投稿」でも一覧を閉じられる。
   右パネルをやめて下から出る形へ戻したとき、いったん隠れるようになっていたのを直した）。
   PC は一覧を右に 420px で出し、地図の枠をその左に縮める。PC は一覧を出している間は下のメニューを隠す（一覧の × で閉じる） */

/* 地図の上の部品は一覧に重なるので、近くの投稿の間は隠す（地図は投稿の地点を見せる役にする） */
body.is-feed .hdr,
body.is-feed .locate,
body.is-feed .post-fab {
    display: none;
}

@media (min-width: 768px) {
    body.is-feed .tabbar {
        display: none;
    }

    /* 下のメニューを隠した分、メニューの高さを 0 にする（body.no-tabbar と同じ） */
    body.is-feed {
        --tabbar-h: 0px;
        --tabbar-space: var(--tabbar-pad);
    }
}

.feed {
    position: absolute;
    top: var(--feed-top);
    left: 0;
    right: 0;
    bottom: var(--tabbar-space);   /* SP は下のメニューの上まで（PC は下のメニューを隠すので --tabbar-space は安全領域だけ） */
    z-index: 1050;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .1);
    transform: translateY(calc(100% + 24px));
    visibility: hidden;   /* 閉じている間は読み上げ・スクロールの対象にしない（閉じる動きが終わってから隠す） */
    transition: transform .26s cubic-bezier(.32, .72, 0, 1), visibility 0s .26s;
}

.feed.open {
    transform: none;
    visibility: visible;
    transition: transform .26s cubic-bezier(.32, .72, 0, 1), visibility 0s;
}

@media (min-width: 768px) {
    .feed {
        top: 0;
        bottom: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px); /* ホームインジケーターに最後の投稿が重ならないように */
        left: auto;
        width: 420px;
        border-top: none;
        border-left: 1px solid var(--line);
        border-radius: 0;
        box-shadow: -4px 0 16px rgba(0, 0, 0, .08);
        transform: translateX(calc(100% + 24px));
    }

    /* 下にある見出しの指定に負けないよう、詳しく書く */
    .feed .feed-head {
        padding-top: calc(env(safe-area-inset-top) + 12px);
    }

    body.is-feed #map {
        right: 420px;
    }
}

/* SP: 一覧を上へスクロールすると画面いっぱいに広がる（app.js の setFeedFull）。地図は隠れる */
@media (max-width: 767px) {
    .feed {
        transition: transform .26s cubic-bezier(.32, .72, 0, 1), top .22s ease, border-radius .22s ease, visibility 0s .26s;
    }

    .feed.open {
        transition: transform .26s cubic-bezier(.32, .72, 0, 1), top .22s ease, border-radius .22s ease, visibility 0s;
    }

    .feed.full {
        top: 0;
        border-top: none;
        border-radius: 0;
    }

    .feed.full .feed-head {
        padding-top: calc(env(safe-area-inset-top) + 12px);
    }
}

/* SP は下に引いて閉じる（ほかのパネルと同じ）。つまみを出し、× は出さない。広げている間（.full）は引くと元の大きさに戻るので、つまみも隠す */
/* 見出しは折り返す flex なので、左右の余白で1行を占めてつまみだけを真ん中に置く */
.feed-grip {
    flex: none;
    margin: -4px calc((100% - 38px) / 2) 2px;
}

.feed.full .feed-grip {
    display: none;
}

@media (max-width: 767px) {
    .feed-head .feed-close {
        display: none;
    }
}

@media (min-width: 768px) {
    .feed-grip {
        display: none;
    }
}

/* 一覧を閉じる ×（PC。下のメニューを隠すため、ここから地図へ戻る）。タブの行の右端に置く */
.feed-head .feed-close {
    position: relative;
    width: 30px;
    height: 30px;
    margin: 0 0 0 auto;
    background: #f1eee8;
    box-shadow: none;
}

body.is-dark .feed-head .feed-close {
    background: #2c3237;
}

body.is-dark .feed-head .feed-close::before,
body.is-dark .feed-head .feed-close::after {
    background: #e8e8e8;
}

/* 見出しと並び順。スクロールしても上に残す */
.feed-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 12px 12px 10px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.feed-tabs {
    display: flex;
    gap: 14px;
}

/* 近くの投稿｜自分の投稿 の切り替え（選んでいる方に下線） */
.feed-tab {
    padding: 2px 0 4px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-sub);
    cursor: pointer;
}

.feed-tab.on {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

/* 文字検索（タブの下・並び替えの上。一行いっぱい） */
.feed-search {
    position: relative;
    flex: 0 0 100%;
}

.feed-search i {
    position: absolute;
    top: 50%;
    left: 11px;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--ink-sub);
    pointer-events: none;
}

.feed-search input {
    width: 100%;
    height: 36px;
    padding: 0 34px 0 32px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--bg-sub);
    font-family: inherit;
    font-size: 16px;   /* 16px 未満だと iPhone が入力のたびに拡大する */
    color: var(--ink);
    -webkit-appearance: none;
    appearance: none;
}

/* 名前で探す（同じ見た目の入力欄をシートの見出しの下に置く） */
.place-search {
    margin: 2px 0 10px;
}

.feed-search input::-webkit-search-cancel-button {
    display: none;   /* 消すボタンは自前（.feed-search-clear） */
}

.feed-search-clear {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #c9c4ba;
    transform: translateY(-50%);
    cursor: pointer;
}

.feed-search-clear::before,
.feed-search-clear::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 2px;
    background: #fff;
}

.feed-search-clear::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.feed-search-clear::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

body.is-dark .feed-search input {
    background: #2b3238;
    border-color: #3a4147;
    color: #e8e8e8;
}

.feed-sort {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.feed-sort .chip {
    padding: 4px 9px;
    font-size: 11px;
}

.feed-note {
    flex: 0 0 100%;
    margin: 0;
    font-size: 11px;
    color: var(--ink-sub);
}

/* 地図のまとめたピンから開いたとき（その所の投稿だけ）。並び順の代わりに右へ置く */
.feed-here {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 0 auto;
    font-size: 12px;
    font-weight: 600;
}

.feed-here .chip {
    padding: 4px 9px;
    font-size: 11px;
}

/* 投稿1件（Threads のタイムラインのように、左に丸・右に本文と写真） */
.feed-item {
    display: flex;
    gap: 10px;
    padding: 12px 12px 14px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: background-color .2s;
}

/* 地図に出している投稿 */
.feed-item.active {
    background: #fbf4ee;
}

.feed-avatar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--face-default);
    color: #fff;
    font-size: 13px;
}

img.feed-avatar {
    object-fit: cover;
    background: #f1eee8;
}

.feed-item.active .feed-avatar {
    box-shadow: 0 0 0 3px rgba(31, 58, 95, .3);
}

.feed-body {
    flex: 1 1 auto;
    min-width: 0;
}

.feed-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-sub);
}

/* ユーザー名。長い名前は1行に収めて省く（距離と時刻は次の行へ回る） */
.feed-name {
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.feed-when {
    white-space: nowrap;
}

.feed-dist {
    margin-right: 6px;
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.feed-badge {
    padding: 0 7px;
    border-radius: 99px;
    background: #fdf0d5;
    color: #8a5a00;
    font-size: 10px;
    font-weight: 700;
}

/* 自分の投稿の状態（承認待ち・公開中・公開終了・チェックイン） */
.feed-state {
    padding: 0 7px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.feed-state.is-pending {
    background: #fdf0d5;
    color: #8a5a00;
}

.feed-state.is-live {
    background: #e2f1e4;
    color: #2e6b3a;
}

.feed-state.is-ended {
    background: #eceae5;
    color: var(--ink-sub);
}

.feed-state.is-checkin {
    background: #e6edf5;
    color: #35597a;
}

/* チェックインした場所 */
.feed-place {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--ink-sub);
}

.feed-place i {
    margin-right: 4px;
    color: var(--accent);
}

/* 投稿の詳細の名所名（押すと名所の詳細を開く） */
.feed-place-btn {
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.feed-text {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.feed-photo {
    display: block;
    width: 100%;
    max-height: 300px;
    margin-top: 8px;
    border-radius: 10px;
    object-fit: cover;
    background: #f1eee8;
}

/* いいね（押すと赤いハート） */
.feed-actions {
    margin-top: 8px;
}

.like-btn {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px 4px 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 13px;
    color: var(--ink-sub);
    cursor: pointer;
}

.like-btn i {
    font-size: 16px;
}

.like-btn.on {
    color: #e0245e;
}

.like-btn:active i {
    transform: scale(.85);
}

.feed-empty,
.feed-end {
    margin: 0;
    padding: 28px 16px;
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
    color: var(--ink-sub);
}

.feed-end {
    padding-bottom: 40px;
}

body.is-dark .feed {
    background: #1f2428;
    color: #e8e8e8;
    border-color: #3a4147;
}

body.is-dark .feed-head {
    background: #1f2428;
    border-bottom-color: #3a4147;
}

body.is-dark .feed-item {
    border-bottom-color: #3a4147;
}

body.is-dark .feed-item.active {
    background: #2b3238;
}

body.is-dark .feed-dist,
body.is-dark .feed-name,
body.is-dark .feed-tab.on {
    color: #e8e8e8;
}

/* 投稿の詳細シートの、投稿した人 */
.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
}

.post-author-avatar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--face-default);
    color: #fff;
    font-size: 12px;
    object-fit: cover;
}

.post-author-name {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ---------- 通常ページ（アカウント・パスワード再設定） ---------- */
/* 地図用の #app は position: fixed で画面に貼り付けるため、
   通常ページでは同じ強さ（id + class）で打ち消してスクロールできるようにする */
/* 地図以外の画面（マイページ・日記・お知らせ・規約）も、地図と同じく画面に固定した #app の中でスクロールする。
   文書ごとスクロールさせると、iOS のホーム画面アプリでは下メニュー（fixed）の安全領域の余白が地図の画面と変わるため（2026-10-11） */
#app.page {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--bg);
}

.page-inner {
    max-width: 520px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top) + 16px) 18px calc(var(--tabbar-space) + 40px);
    animation: mp-page-in .3s ease-out backwards;
}

/* マイページ（と、そこから開く日記・お知らせ・規約）を開いたときの軽いアニメーション（2026-10-21 ユーザー指示）。
 * 少し下からふわっと出る。マイページの中の切り替え（ログイン済み／未ログイン・ログイン／新規登録など）は
 * Vue の <transition>（mp-fade＝本文が出るとき・mp-swap＝切り替え）で、opacity と transform だけ動かす */
@keyframes mp-page-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* 運営画面も同じ動き（2026-10-21 ユーザー指示「広げて」）。地図（#app で .page でないもの）は地図ごと動かすと
 * 固定の部品とずれるので、位置は動かさずフェードインだけ。地図の中の切り替え（一覧・詳細）は、それぞれのシートの動きがある */
.admin-inner {
    animation: mp-page-in .3s ease-out backwards;
}

@keyframes mp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

#app:not(.page) {
    animation: mp-fade-in .35s ease-out backwards;
}

.mp-fade-enter-active {
    transition: opacity .28s ease-out;
}

.mp-fade-enter-from {
    opacity: 0;
}

.mp-swap-enter-active {
    transition: opacity .24s ease-out, transform .24s ease-out;
}

.mp-swap-leave-active {
    transition: opacity .12s ease-in;
}

.mp-swap-enter-from {
    opacity: 0;
    transform: translateY(6px);
}

.mp-swap-leave-to {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .page-inner,
    .admin-inner,
    #app:not(.page) {
        animation: none;
    }

    .mp-fade-enter-active,
    .mp-swap-enter-active,
    .mp-swap-leave-active {
        transition: none;
    }
}

.page-hdr {
    margin-bottom: 18px;
}

.page-hdr h1 {
    font-size: 20px;
    margin: 10px 0 0;
    letter-spacing: .04em;
}

/* 上の戻るリンク。矢印は飾りなので疑似要素の Font Awesome（angle-left）で出す */
.page-back {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-size: 13px;
    color: var(--ink-sub);
    text-decoration: none;
}

.page-back::before {
    content: "\f104";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* 地図へ: 文字なしのアイコンだけ（<i> と aria-label）。指で押しやすいよう押せる範囲を広げ、左端をそろえる */
.page-back--icon {
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: -8px 0 -6px -12px;
    font-size: 20px;
}

.page-back--icon::before {
    content: none;
}

.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.tab {
    flex: 1;
    padding: 10px 4px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink-sub);
    cursor: pointer;
}

.tab.on {
    color: var(--ink);
    font-weight: 700;
    border-bottom-color: var(--accent);
}

.field {
    display: block;
    margin-bottom: 16px;
}

.field .label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.field .req,
.field .opt {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    vertical-align: 2px;
}

.field .req {
    background: #fdeee6;
    color: var(--accent-dark);
}

.field .opt {
    background: #eef0f2;
    color: var(--ink-sub);
}

.field input,
.field select {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;   /* 白い札（クリーム色の地）の上でも入力欄の範囲が分かるよう白（2026-10-21 ユーザー指示。テキストエリアも同じ） */
    color: var(--ink);
    font-size: 16px; /* iOS で拡大されないよう 16px 以上にする */
    font-family: inherit;
}

.field input:focus,
.field select:focus {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
}

/* 入力欄ではなく文字で見せる値（パスワード再設定のメールアドレスなど） */
.field .static-value {
    margin: 0;
    padding: 4px 0;
    font-size: 16px;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.field .hint {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: var(--ink-sub);
}

.field .err,
.check .err {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #c0392b;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.6;
}

.check input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.alert {
    margin: 0 0 16px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
}

.alert.ok {
    background: #eaf4ee;
    color: #24613c;
}

.alert.err {
    background: #fdecea;
    color: #a5281b;
}

.alert.warn {
    background: #fdf5e6;
    color: #8a6316;
}

.btn.wide {
    width: 100%;
    flex: none;
}

.btn.as-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.link {
    display: inline-block;
    margin-top: 14px;
    padding: 4px 2px;
    border: none;
    background: none;
    color: var(--ink-sub);
    font-family: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.link.center {
    display: block;
    margin: 14px auto 0;
    text-align: center;
}

.note {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-sub);
}

.me {
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
}

.me-name {
    font-size: 17px;
    font-weight: 700;
}

/* アイコンと名前を横に並べる */
.me-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.me-profile-text {
    flex: 1 1 auto;
    min-width: 0;
}

/* ユーザー情報の編集フォームの「やめる」「保存」 */
.me-name-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 8px;
}

.me-name-actions .btn {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 18px;
    font-size: 14px;
}

/* アイコン。タッチすると画像を選べる（中のファイル選択は隠す）。右下のカメラの印で、押せることを示す */
.me-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    cursor: pointer;
}

.me-avatar input {
    display: none;
}

.me-avatar.is-busy {
    opacity: .6;
    pointer-events: none;
}

.me-avatar-face {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 50%;
    background: var(--face-default);
    color: #fff;
}

.me-avatar:active .me-avatar-face {
    opacity: .75;
}

.me-avatar-face img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.me-avatar-face svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.me-avatar-badge {
    position: absolute;
    right: -3px;
    bottom: -3px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg);
    color: var(--ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.me-avatar-badge svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

/* 自己紹介とリンク（アイコン・ユーザー名・メールアドレスの行のすぐ下） */
.me-intro,
.me-intro-form {
    margin-top: 14px;
}

.me-bio {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.me-links {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    font-size: 14px;
}

.me-links li {
    margin: 4px 0;
}

.me-links a {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: var(--accent-dark);
    overflow-wrap: anywhere;
}

.me-intro-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 16px;   /* 16px 未満だと iPhone が入力のたびに拡大する */
    line-height: 1.6;
    resize: vertical;
}

.me-intro-count {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    text-align: right;
    color: var(--ink-sub);
}

.me-link-row {
    display: grid;
    grid-template-columns: 1fr 1fr 32px;
    gap: 6px;
    margin-bottom: 8px;
}

.me-link-row .err {
    grid-column: 1 / -1;
}

.me-link-row input {
    min-width: 0;
    height: 42px;
    padding: 0 10px;
}

.me-link-del {
    color: var(--ink-sub);
}

/* 投稿にユーザー名とアイコンを表示する（外すと名無しさん） */
/* トグル（.map-switch）。カードの一番下なので、下の余白はカードの padding に任せる（.map-switch の上下 12px より後に効かせるため2クラス） */
.map-switch.me-public {
    margin: 12px 0 0;
}

/* 不具合のお問い合わせ */
.report textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 16px;   /* 16px 未満だと iPhone が入力のたびに拡大する */
    line-height: 1.6;
    resize: vertical;
}

.report-photos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 4px 0 8px;
}

.report-photo {
    position: relative;
    width: 72px;
    height: 72px;
}

.report-photo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

/* 写真を外す（右上の×） */
.report-photo-del {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(43, 58, 74, .9);
    cursor: pointer;
}

.report-photo-del::before,
.report-photo-del::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 2px;
    background: #fff;
}

.report-photo-del::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.report-photo-del::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* トグルの文字の下に添える補足（匿名表示の今の状態・日記の記録件数） */
.map-switch small {
    display: block;
    font-size: 12px;
    color: var(--ink-sub);
}

/* ユーザー情報の枠の下に並べる文字のリンク（ユーザー情報の編集・メールアドレスを変える・パスワードを変える）。
   幅が足りなければ折り返す（.link の上の余白 14px が行間になる） */
.me-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0 18px;
}

/* メールアドレス・パスワードの変更フォームは、ユーザー情報の枠（.me）の中に出す。枠の中なので外枠・余白は付けない */
.me .cred-form {
    margin: 14px 0 0;
    padding: 0;
    border: 0;
}

.me-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--ink-sub);
}

/* 通知（Web Push）の設定欄 */
.notify-title {
    font-size: 14px;
    font-weight: 700;
}

.notify-note {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--ink-sub);
}

.notify .btn-row {
    margin-top: 12px;
}

/* 「通知を止める」が SP 幅で2行に割れないように */
.notify .btn {
    white-space: nowrap;
}

/* ---------- チェックインのボタンと、名前の行の右端のアイコンボタン（リストに保存＝ブックマーク・バス）。2026-10-24 ---------- */
/* チェックイン（名前の行とタブの間。初期の小さい表示でも見える。2026-10-24 ユーザー指示） */
.place-checkin {
    margin: 0 0 8px;
}

.place-checkin .action {
    width: 100%;
    min-height: 40px;
}

.place-checkin-note {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-sub);
}

.action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;   /* 2026-10-21 ユーザー指示「もう少し小さく」で 42px から小さくした */
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.action .action-icon {
    font-size: 13px;
}

.action.on {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

/* 押した状態をひと目で分かるよう色で見分ける（2026-10-21 ユーザー指示）: リストに保存＝黄色 */
.action--want.on {
    background: #f5b301;
    border-color: #f5b301;
    color: #1f2428;
}

.action.checkin {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.action:disabled {
    opacity: .6;
}

.action {
    min-width: 0;
    white-space: nowrap;
}

/* アイコンだけのボタン（リストに保存＝ブックマーク・まぁーるバスで行く）。場所の名前の行（.detail-head）の右端＝詳細・コメントのタブの上に並べる（2026-10-24 ユーザー指示） */
.action--bus,
.action--icon {
    flex: 0 0 44px;
    /* 幅を明示する。flex-basis だけだと Safari は入れ物（.detail-head-actions）の幅をアイコンの中身の幅で決めてしまい、バスが画面の外へはみ出して見切れた */
    width: 44px;
    min-width: 44px;
    padding: 0;
}

.detail-head-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    align-self: center;
}

.detail-head .action--icon {
    min-height: 38px;
}

.action--icon .action-icon {
    font-size: 16px;
}

.action--bus .action-icon {
    font-size: 16px;
}

/* 現地の範囲の外・現在地が分からない（チェックイン）／近くに停留所が無い（バス）ときはグレーアウトして押せない */
.action.checkin:disabled,
.action--bus:disabled {
    background: #e3e6e8;
    border-color: #e3e6e8;
    color: #9aa3ab;
    opacity: 1;
    cursor: not-allowed;
}

/* 範囲内になったら押せる。場所の詳細を開いたとき（ボタンは場所ごとに作り直される）と、現在地が取れて範囲に入ったときに、1回だけ軽く光る */
.action.checkin.is-ready {
    animation: hn-checkin-ready 1.3s ease-out .35s 1;
}

@keyframes hn-checkin-ready {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
    }
    35% {
        transform: scale(1.06);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .action.checkin.is-ready {
        animation: none;
    }
}

.save-mark {
    color: var(--accent-dark);
}

.note.small {
    margin: 0 0 12px;
    font-size: 12px;
}

.note.small a {
    color: var(--accent-dark);
}

/* チェックインの入力 */
.sheet textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    font-family: inherit;
    font-size: 16px; /* iOS で拡大されないよう 16px 以上にする */
    line-height: 1.6;
    resize: vertical;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 14px;
}

/* 文字数は入力欄の右下に重ねる（入力の近くで見えるように） */
.comment-field {
    position: relative;
}

.comment-field textarea {
    display: block;
    padding-bottom: 24px;
}

.comment-field .len {
    position: absolute;
    right: 12px;
    bottom: 8px;
    font-size: 11px;
    color: var(--ink-sub);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

/* 写真を選ぶボタン（マイページの不具合報告） */
.photo-pick {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--bg);
    font-size: 13px;
    cursor: pointer;
}

.photo-pick input {
    display: none;
}

/* ひとことの入力欄＋右にカメラ（投稿・チェックイン） */
.compose {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
}

.compose .comment-field {
    flex: 1;
    min-width: 0;
}

.photo-slot {
    position: relative;
    flex: none;
}

/* カメラのボタン。写真を選んだら、その写真の小さな見本になる */
.photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    color: var(--ink-sub);
    font-size: 20px;
    cursor: pointer;
}

.photo-btn.has {
    border-color: var(--accent);
    color: var(--accent);
}

.photo-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-btn input {
    display: none;
}

/* 写真を外す ×（見本の右上） */
.photo-clear {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--ink);
    cursor: pointer;
}

.photo-clear::before,
.photo-clear::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 2px;
    border-radius: 1px;
    background: #fff;
}

.photo-clear::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.photo-clear::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

body.is-dark .photo-clear {
    border-color: #1f2428;
}

body.is-dark .action,
body.is-dark .photo-pick,
body.is-dark .photo-btn,
body.is-dark .sheet textarea {
    background: #2b3238;
    color: #e8e8e8;
    border-color: #3a4147;
}

body.is-dark .action.checkin:not(:disabled) {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

body.is-dark .action.checkin:disabled,
body.is-dark .action--bus:disabled {
    background: #2b3238;
    border-color: #343b41;
    color: #6f7a82;
}

/* 上の指定（body.is-dark .action）のほうが強く、夜の地図では押した状態が普通のボタンと同じ色になっていた。押した状態を重ねて指定する */
body.is-dark .action.on {
    background: #f2f2f2;
    border-color: #f2f2f2;
    color: #1f2428;
}

body.is-dark .action--want.on {
    background: #f5b301;
    border-color: #f5b301;
    color: #1f2428;
}

/* ---------- 日記の案内（地図の上・下メニューの上） ---------- */
/* 画面の上（ヘッダーのすぐ下）に出す。下はシート・一覧・現在地ボタンなどで埋まっていることが多いため */
.diary-prompt {
    position: absolute;
    left: 12px;
    right: 12px;
    top: max(calc(env(safe-area-inset-top) + 8px), calc(var(--hdr-h, 130px) - 4px));   /* 知らせ（.toast）と同じく、ヘッダーのすぐ下 */
    z-index: 1080;   /* 近くの投稿の一覧（1050）より上・シート（1100）より下 */
    padding: 14px 16px 16px;
    background: var(--bg);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}

.diary-prompt .sheet-close {
    margin: -6px -6px -34px auto;
}

/* 名所の詳細（シート・1100）の中のボタンから出す案内（認証メール）は、シートに隠れないよう手前に出す。知らせ（1200）よりは下 */
.diary-prompt--gate {
    z-index: 1150;
}

/* 夜の地図では、ほかのパネルと同じ暗い色にする（日記のお誘い・認証メールの案内） */
body.is-dark .diary-prompt {
    background: #1f2428;
    color: #e8e8e8;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}

body.is-dark .diary-prompt__text {
    color: #aab2ba;
}

body.is-dark .diary-prompt .sheet-close {
    background: #2b3238;
}

body.is-dark .diary-prompt .sheet-close::before,
body.is-dark .diary-prompt .sheet-close::after {
    background: #e8e8e8;
}

.diary-prompt__title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
}

.diary-prompt__text {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-sub);
}

.diary-prompt .btn {
    width: 100%;
    flex: none;
    height: 38px;
}

/* 日記のお誘い（チェックイン・投稿のあとに出る小さな帯）: 文＋ボタンを1行にし、右上の × の分だけ右を空ける */
.diary-prompt--bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 40px 8px 14px;
}

.diary-prompt--bar .sheet-close {
    position: absolute;
    top: 50%;
    right: 6px;
    margin: 0;
    transform: translateY(-50%);
}

.diary-prompt--bar .diary-prompt__text {
    flex: 1;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.diary-prompt--bar .btn {
    width: auto;
    flex: none;
    height: 34px;
    padding: 0 14px;
    font-size: 12px;
}

@media (min-width: 768px) {
    .diary-prompt {
        left: auto;
        right: 16px;
        width: 420px;
    }
}

/* ===== 利用規約・プライバシーポリシー（legal.blade.php。本文は resources/legal/*.md を変換したもの） ===== */
.legal-body {
    font-size: 14px;
    line-height: 1.85;
    color: var(--ink);
}

.legal-body h1 {
    font-size: 19px;
    line-height: 1.5;
    margin: 4px 0 18px;
    letter-spacing: .03em;
}

.legal-body h3 {
    font-size: 15px;
    margin: 26px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line);
}

.legal-body ol,
.legal-body ul {
    padding-left: 1.4em;
    margin: 6px 0;
}

.legal-body li + li {
    margin-top: 4px;
}

.legal-body a {
    color: var(--accent-dark);
}

/* 表は画面からはみ出す分だけ横に動かせる（ページ全体は横に動かさない） */
.legal-body table {
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 12.5px;
    line-height: 1.6;
    margin: 8px 0;
}

.legal-body th,
.legal-body td {
    border: 1px solid var(--line);
    padding: 6px 8px;
    vertical-align: top;
    min-width: 7em;
}

.legal-body th {
    background: #efebe2;
    text-align: left;
}

/* ログアウト（マイページの一番下・規約リンクの行の上）。左右中央。「ログアウト」の文字が折れないよう幅は文字に合わせる */
.logout-row {
    display: flex;
    justify-content: center;
    margin: 28px 0 0;
}

.logout-row .btn {
    flex: 0 0 auto;
    padding: 0 24px;
    white-space: nowrap;
}

/* 規約リンクの行（退会する・利用規約・プライバシーポリシー）。各リンクの途中では折り返さない（足りなければ行ごと下へ） */
.legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 18px;
    margin: 28px 0 0;
    font-size: 12px;
}

.logout-row + .legal-links {
    margin-top: 18px;
}

.legal-links a {
    color: var(--ink-sub);
    text-decoration: none;
    white-space: nowrap;
}

/* 地図のデータの出典（マイページの一番下） */
.legal-credit {
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.6;
    color: var(--ink-sub);
    text-align: left;
}

.legal-credit a {
    color: var(--ink-sub);
    text-decoration: none;
}

/* ===== 規約の改定後の同意のお願い（auth.js の ensureConsent。どの画面にも出る） ===== */
.consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 28, 36, .55);
}

.consent-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg-sub);
    color: var(--ink);
    border-radius: 16px;
    padding: 20px 18px 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}

.consent-box h2 {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 10px;
}

.consent-box p {
    font-size: 13px;
    line-height: 1.7;
    margin: 0 0 10px;
}

.consent-links {
    display: flex;
    gap: 16px;
}

.consent-links a {
    color: var(--accent-dark);
}

.consent-err {
    color: #b3412f;
}

.consent-actions {
    display: flex;
    flex-direction: column-reverse;   /* 「同意する」を上に。狭い画面でも文字が折れないよう1列に並べる */
    gap: 8px;
    margin-top: 6px;
}

.consent-actions .btn {
    flex: none;   /* .btn の伸び縮み（横並び用）を縦並びでは効かせない */
    width: 100%;
}

/* ===== メールアドレス・パスワードの変更（account.blade.php・No.43） ===== */
.cred-form {
    margin: 18px 0 4px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.cred-form h2 {
    font-size: 15px;
    margin: 0 0 8px;
}

.cred-form .small {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--ink-sub);
}

/* ===== 退会（account.blade.php） ===== */
/* 規約リンクの行（.legal-links）の左に置く「退会する」。ほかのリンクと同じ見た目（下線なし） */
.withdraw-open {
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: var(--ink-sub);
    text-decoration: none;
    white-space: nowrap;
}

.withdraw {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid #e3c4bb;
    border-radius: 12px;
    background: #fbf3f0;
}

.withdraw h2 {
    font-size: 15px;
    margin: 0 0 8px;
}

.withdraw p,
.withdraw li {
    font-size: 13px;
    line-height: 1.7;
}

.withdraw p {
    margin: 0 0 8px;
}

.withdraw ul {
    margin: 0 0 10px;
    padding-left: 1.3em;
}

.withdraw .small {
    font-size: 12px;
    color: var(--ink-sub);
}

.withdraw a {
    color: var(--accent-dark);
}

.btn.danger {
    background: #b3412f;
    color: #fff;
}

.btn.danger:disabled {
    opacity: .5;
}

/* 日記（/diary・2026-10-04） */
.diary-open {
    margin-top: 10px;
}

/* 日記の主なボタンの下に並べる文字のリンク（記録を止める・記録を消す など） */
.diary-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
}

.diary-links .link {
    margin-top: 8px;
}

/* 「記録を消す」は右端に寄せ、下線は付けない */
.diary-links .diary-clear {
    margin-left: auto;
    text-decoration: none;
}

/* 通知が止められているときの、端末ごとの設定の場所 */
.notify-note p {
    margin: 0;
}

.notify-note .notify-steps {
    margin-top: 4px;
    color: var(--ink);
    font-weight: 700;
}

/* 日記の一覧の上のボタン2つ: 横並び。アイコンは飾りなので疑似要素の Font Awesome（eye＝見る・pen-to-square＝ノートに鉛筆） */
.diary-actions {
    display: flex;
    gap: 9px;
    margin: 0 0 14px;
}

.diary-actions .diary-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
}

.diary-action::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.diary-action--posts::before {
    content: "\f06e";
}

.diary-action--write::before {
    content: "\f044";
}

/* 日記の投稿のいいね。数を押すと、いいねした人が出る */
/* いいね数: 「投稿」ラベル（.diary-flow-kind）の右隣。ハートと数だけの小さなボタン（押すと、いいねした人が出る） */
.diary-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 8px;
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
    color: inherit;
    cursor: pointer;
}

.diary-like-btn svg {
    flex: none;
    width: 12px;
    height: 12px;
    fill: #e0245e;
}

.diary-likers {
    margin: 8px 0 0;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
}

.diary-likers ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.diary-likers li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
}

.diary-liker-face {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--face-default);
    object-fit: cover;
}

.diary-liker-face svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
}

.diary-liker-name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.diary .note.small {
    margin-top: 16px;
    font-size: 12px;
}

.diary-days {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    overflow: hidden;
}

.diary-days li + li {
    border-top: 1px solid var(--line);
}

.diary-days a {
    display: block;
    padding: 13px 16px;
    color: var(--ink);
    text-decoration: none;
}

.diary-days-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
}

.diary-days-date b {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
}

.diary-days-sub {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--ink-sub);
}

/* 1日分の流れ（左に時刻、線でつなぐ） */
.diary-flow {
    list-style: none;
    margin: 0;
    padding: 0 0 18px;
    display: grid;
    /* 時刻の列は、いちばん長い時刻（15:00・翌0:30 など）に合わせる。li は display: contents にして全行で列をそろえる */
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 11px;   /* 時刻の右端から丸印の左端まで 8px（丸は body の左へ 3px はみ出す） */
    --flow-gap: 18px;   /* 行の間 */
    row-gap: var(--flow-gap);
}

.diary-flow > li {
    display: contents;
}

/* タイムラインの線。行ごとに「その行の上端から、次の行の上端まで」引いてつなぐ（丸の高さが行ごとに違っても途切れないように）。
   最初の行は丸の中心から、最後の行は丸の中心まで。丸の中心は、ふつうの行は上から 9px、時間範囲のある「いた」は上下中央 */
.diary-flow-body::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: calc(var(--flow-gap) * -1);
    left: 1px;      /* 丸の中心 − 線の半分 */
    width: 2px;
    background: var(--line);
}

.diary-flow > li:first-child .diary-flow-body::after {
    top: 9px;
}

.diary-flow > li:last-child .diary-flow-body::after {
    bottom: calc(100% - 9px);
}

.diary-flow > li:only-child .diary-flow-body::after {
    display: none;
}

/* 時間範囲のある「いた」: 時刻（開始 / 縦線 / 終了）の上下中央に、丸と文字をそろえる（2026-10-24 ユーザー指示） */
.diary-flow .is-stay .diary-flow-time {
    align-self: center;
}

.diary-flow .is-stay .diary-flow-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.diary-flow .is-stay .diary-flow-body::before {
    top: 50%;
    margin-top: -5px;
}

.diary-flow > li.is-stay:first-child .diary-flow-body::after {
    top: 50%;
}

.diary-flow > li.is-stay:last-child .diary-flow-body::after {
    bottom: 50%;
}

/* 開いたとき、上の行から順に「時刻 → 場所（丸と文字）」と出て、タイムラインの線が丸から次の丸へ徐々につながる（2026-10-24 ユーザー指示）。
 * 各行の開始は li の --t（diary-page.js の flowDelay）。動きは mp-page-in と同じく透明から少し下からふわっと */
@keyframes diary-flow-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@keyframes diary-flow-line {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.diary-flow-time {
    animation: diary-flow-in .3s ease-out backwards;
    animation-delay: var(--t, 0ms);
}

.diary-flow-body {
    animation: diary-flow-in .3s ease-out backwards;
    animation-delay: calc(var(--t, 0ms) + 80ms);
}

.diary-flow-body::after {
    transform-origin: top;
    animation: diary-flow-line .28s ease-out backwards;
    animation-delay: calc(var(--t, 0ms) + 200ms);
}

@media (prefers-reduced-motion: reduce) {
    .diary-flow-time,
    .diary-flow-body,
    .diary-flow-body::after,
    .diary-memo-panel {
        animation: none;
    }

    .diary-memo-toggle::after {
        transition: none;
    }
}

.diary-flow-time {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: var(--ink-sub);
    text-align: left;
    padding-top: 1px;
}

/* 滞在の時間帯は縦に並べる（開始 / 縦線 / 終了） */
.diary-flow-range {
    display: inline-grid;
    justify-items: start;   /* 時刻は左揃え（9:05 と 15:00 でずれて見えないように） */
}

.diary-flow-range-bar {
    justify-self: center;   /* 縦線だけ時刻のかたまりの真ん中 */
    width: 1px;
    height: 7px;
    margin: 2px 0;
    background: var(--ink-sub);
}

.diary-flow-body {
    position: relative;
    isolation: isolate;
    min-width: 0;
    padding-left: 14px;
}

.diary-flow-body::before {
    content: "";
    position: absolute;
    top: 4px;
    left: -3px;
    z-index: 1;     /* 線より手前 */
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ink-sub);
}

.diary-flow .is-checkin .diary-flow-body::before,
.diary-flow .is-post .diary-flow-body::before {
    background: var(--accent);
}

.diary-flow .is-pass .diary-flow-body::before {
    /* 枠線の分だけ丸が 14px になるので、他の丸（10px）と中心が合うよう左上へ 2px ずらす */
    top: 2px;
    left: -5px;
    background: var(--bg);
    border: 2px solid var(--ink-sub);
}

.diary-flow-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.diary-flow-kind {
    display: flex;
    align-items: center;    /* 「いた」の滞在時間・「投稿」のいいね数も、ラベルと上下中央にそろえる */
    font-size: 11px;
    font-weight: 400;
    color: var(--ink-sub);
}

/* 場所の右隣に出す滞在時間（「いた」） */
.diary-flow-kind-sub {
    flex: none;
    margin-left: 8px;
    white-space: nowrap;
}

/* 場所: ラベル（いた・投稿など）と、滞在時間・いいねの間。どの項目も同じ並び。
   文字の大きさ・太さはラベル（.diary-flow-kind）と同じ（2026-10-24 ユーザー指示）。色だけ濃くして、ラベルと見分ける。長いときは折り返す */
.diary-flow-kind-place {
    min-width: 0;
    margin-left: 8px;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.diary-flow-kind-place + .diary-like-btn {
    flex: none;
}

.diary-flow-sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--ink-sub);
}

.diary-flow-comment {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.diary-flow-photo {
    display: block;
    max-width: 100%;
    max-height: 240px;
    margin-top: 8px;
    border-radius: 8px;
}

/* その日の天気（日付の横にアイコンだけ・2026-10-24）。アイコンは <i>（読み上げ用の aria-label と title が要るため）。色は JS（diary-page.js の weatherIcon）で付ける */
.diary-weather-icon {
    margin-left: 10px;
    font-size: 0.8em;
    vertical-align: 1px;
}

/* 自分だけの日記（文章と写真・2026-10-24）。本人だけが見られる。日付の下・1日の流れの前に置く */
.diary-memo {
    margin: 4px 0 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
}

.diary-memo-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

/* 欄全体の折りたたみの見出し。右に開閉の矢印（開くと上向き。飾りなので疑似要素の Font Awesome） */
.diary-memo-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.diary-memo-toggle::after {
    content: "\f107";
    flex: none;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--ink-sub);
    transition: transform .2s;
}

.diary-memo-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* 「自分だけが見られます」は、見出し「日記」の下の行 */
.diary-memo-toggle small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 400;
    color: var(--ink-sub);
}

/* 開いたときの中身（書いた日記と入力欄） */
.diary-memo-panel {
    margin-top: 12px;
    animation: mp-fade-in .2s ease-out backwards;
}

.diary-memo-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.diary-memo-list > li {
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.diary-memo-list > li:first-child {
    border-top: none;
    padding-top: 0;
}

.diary-memo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--ink-sub);
}

.diary-memo-del {
    padding: 2px 0 2px 12px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 12px;
    color: var(--ink-sub);
    text-decoration: underline;
    cursor: pointer;
}

.diary-memo-body {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.diary-memo-photo {
    display: block;
    max-width: 100%;
    max-height: 320px;
    margin-top: 8px;
    border-radius: 10px;
}

.diary-memo-form textarea {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 16px;   /* 16px 未満だと iPhone が入力のたびに拡大する */
    line-height: 1.6;
    resize: vertical;
}

/* カメラ（写真を選ぶ）と選んだ写真は右揃え */
.diary-memo-form .report-photos {
    justify-content: flex-end;
    margin: 0 0 12px;
}

/* 写真を添える: カメラのアイコンだけ（<i> と aria-label） */
.photo-pick--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 18px;
    color: var(--ink-sub);
}

.diary-nav {
    display: flex;
    justify-content: center;    /* 前の日／次の日を左右に引き離さず、真ん中に寄せる */
    gap: 28px;
    margin-top: 12px;
}

/* 前の日／次の日: 枠・padding なしの文字だけ。文字は日記の場所名（.diary-flow-title）に合わせる */
.diary-nav-link {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--ink);
    cursor: pointer;
}

/* 矢印は飾りなので疑似要素の Font Awesome（angle-left / angle-right）で出す */
.diary-nav-link--prev::before,
.diary-nav-link--next::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.diary-nav-link--prev::before {
    content: "\f104";
}

.diary-nav-link--next::after {
    content: "\f105";
}

/* 前後の記録が無い側は、場所だけ残して見えなくする（反対側のボタンの位置が動かないように） */
.diary-nav-link:disabled {
    visibility: hidden;
}

/* 飲食店の営業時間（曜日ごとに改行・2026-10-06） */
.shop-hours .detail-body {
    white-space: pre-line;
}

/* 現在地からの目安（直線距離から・2026-10-07）。2026-10-24 ユーザー指示で、店舗名（種類）の下へ移し、文字を本文と同じ色（ダークでは白）にして見やすくした */
.travel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
    min-height: 28px;   /* 目安の文字と「目安を見る」ボタンで高さが変わらないように */
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: inherit;   /* パネルの文字色を引き継ぐ（ダークでは白）。var(--ink) だとダークでは紺色のままで暗い背景に溶けて見えなかった */
}

.travel-time {
    color: inherit;
    font-weight: 700;
}

.travel-time small {
    margin-left: 2px;
    font-weight: 400;
    color: inherit;
}

.travel-locate {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--bg);
    font: inherit;
    font-size: 12px;
    color: var(--ink);
    cursor: pointer;
}

/* 目的地が場所のときは、ルートの保存を出さない（保存は停留所の組み合わせだけ） */
.sheet--bus.is-place-dest .bus-route-save-btn {
    display: none;
}

.nearby-time {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: var(--ink-sub);
}

/* 橙色の距離の意味（この距離ならチェックインできる） */
.nearby-near {
    display: block;
    margin-top: 1px;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-dark);
}

/* ---------- ホーム画面アプリの入れ直しのお知らせ（js/install-notice.js） ---------- */
.install-notice {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 8px);
    left: 12px;
    right: 12px;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(43, 58, 74, .96);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}

.install-notice p {
    flex: 1;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.install-notice button {
    flex: none;
    padding: 8px 12px;
    border: none;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* 新しい版のお知らせ（js/update-notice.js・No.170）。見た目は上と同じで、「あとで」だけ控えめにする */
.update-notice .update-notice-later {
    padding-left: 4px;
    padding-right: 4px;
    background: none;
    color: rgba(255, 255, 255, .75);
    font-weight: 400;
}

/* ---------- アプリの中のブラウザの案内（js/inapp-browser.js・No.224） ---------- */
.inapp-notice {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 8px);
    left: 12px;
    right: 12px;
    z-index: 1350;   /* 下のメニュー（1300）より上・初めての案内（1400）より下（初めての案内を閉じてから読んでもらう） */
    display: flex;
    align-items: flex-start;
    gap: 6px;
    max-width: 520px;
    margin: 0 auto;
    padding: 10px 6px 10px 14px;
    background: rgba(43, 58, 74, .97);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
    font-size: 12px;
    line-height: 1.55;
}

.inapp-notice-body {
    flex: 1;
    min-width: 0;
}

.inapp-notice p {
    margin: 0;
}

.inapp-notice .inapp-notice-how {
    margin-top: 6px;
    color: rgba(255, 255, 255, .9);
}

/* メニューのボタンの絵（⋯ や Safari のマーク）。アプリの画面のボタンに見えるよう、枠で囲む */
.inapp-notice-how i {
    margin: 0 2px;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 6px;
    font-size: 11px;
}

.inapp-notice-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 8px;
}

.inapp-notice-btn {
    flex: none;
    padding: 7px 14px;
    border: none;
    border-radius: 99px;
    background: #fff;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}

.inapp-notice-btn--sub {
    padding-left: 4px;
    padding-right: 4px;
    background: none;
    color: rgba(255, 255, 255, .85);
    font-weight: 400;
    text-decoration: underline;
}

.inapp-notice-done {
    flex: 1 1 100%;
    font-size: 11px;
    color: rgba(255, 255, 255, .9);
    overflow-wrap: anywhere;
}

.inapp-notice-done:empty {
    display: none;
}

.inapp-notice-close {
    flex: none;
    width: 34px;
    height: 34px;
    margin-top: -4px;
    border: none;
    border-radius: 50%;
    background: none;
    color: rgba(255, 255, 255, .85);
    font-size: 16px;
    cursor: pointer;
}

/* ---------- 熱の見方（凡例。ヘッダーの ？ で開く） ---------- */
.chip.chip-icon {
    padding-left: 10px;
    padding-right: 10px;
}

.heat-legend {
    position: absolute;
    left: 12px;
    right: 12px;
    top: max(calc(env(safe-area-inset-top) + 8px), calc(var(--hdr-h, 130px) - 4px));
    z-index: 1090;   /* 日記の案内（1080）より上・シート（1100）より下 */
    padding: 14px 16px;
    background: var(--bg);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}

.heat-legend .sheet-close {
    margin: -6px -6px -34px auto;
}

.heat-legend__title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
}

.heat-legend__bar {
    height: 8px;
    margin-right: 36px;   /* 右上の × にかからないように */
    border-radius: 4px;
}

.heat-legend__scale {
    display: flex;
    margin-right: 36px;
    justify-content: space-between;
    margin-top: 2px;
    font-size: 11px;
    color: var(--ink-sub);
}

.heat-legend__list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 10px;
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.6;
}

.heat-legend__list dt {
    font-weight: 700;
    white-space: nowrap;
}

.heat-legend__list dd {
    margin: 0;
    color: var(--ink-sub);
}

body.is-dark .heat-legend {
    background: #1f2428;
    color: #e8e8e8;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}

body.is-dark .heat-legend__list dd,
body.is-dark .heat-legend__scale {
    color: #aab2ba;
}

body.is-dark .heat-legend .sheet-close {
    background: #2b3238;
}

body.is-dark .heat-legend .sheet-close::before,
body.is-dark .heat-legend .sheet-close::after {
    background: #e8e8e8;
}

@media (min-width: 768px) {
    .heat-legend {
        left: auto;
        right: 16px;
        width: 420px;
    }
}

/* 施設の説明（宿の評価・アクセス・駐車場など）は行ごとに改行して出す */
.detail-body.is-lines {
    white-space: pre-line;
}

/* ---------- お知らせ（/notices）・地図の上のベルに重ねる数 ---------- */
/* 新しいお知らせの数（9 を超えたら 9+）。お知らせ画面のタブ（.tab-count）と、地図の上のベル（.hdr-bell-count。auth.js が出す） */
.hdr-bell-count,
.tab-count {
    min-width: 16px;
    padding: 0 4px;
    border-radius: 99px;
    background: #d9433a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

/* 数字の上下の位置は、フォントの行の高さの真ん中ではなく、数字そのものの上端・下端で丸の真ん中にそろえる
   （行の高さ基準だと、端末のフォントによって数字が上か下へ寄る。text-box-trim が使えるブラウザのみ） */
@supports (text-box: trim-both cap alphabetic) {
    .hdr-bell-count,
    .tab-count {
        box-sizing: border-box;
        padding: 4.5px 4px;
        line-height: 1;
        text-box: trim-both cap alphabetic;
    }
}

/* 地図の上の段（場所の絞り込みの上）の右端のベル。丸い札で、数は右上に重ねる（ふちは札の背景色） */
.hdr-bell {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
}

.hdr-bell-count {
    position: absolute;
    top: -6px;
    right: -6px;
    box-shadow: 0 0 0 2px var(--bg);
}

.hdr-bell-count[hidden] {
    display: none;
}

.tab-count {
    display: inline-block;
    margin-left: 6px;
    vertical-align: 1px;
}

.notice-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    overflow: hidden;
}

.notice-list > li + li {
    border-top: 1px solid var(--line);
}

/* 前に開いたときより後のもの */
.notice-list > li.is-new {
    background: #fdf5ef;
}

.notice-like {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    color: var(--ink);
    text-decoration: none;
}

.notice-face {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--face-default);
    object-fit: cover;
}

.notice-face svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
}

.notice-like-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.notice-like-head {
    display: block;
}

/* いいねされた投稿のひとこと（2行まで） */
.notice-like-post {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
    font-size: 12px;
    color: var(--ink-sub);
}

.notice-time {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--ink-sub);
}

.notice-like-photo {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.notice-release {
    padding: 14px 16px;
}

.notice-release-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-sub);
}

.notice-release-meta b {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
}

.notice-release h2 {
    margin: 4px 0 0;
    font-size: 15px;
    line-height: 1.5;
}

.notice-release p {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-line;
}

/* 本人あてのお知らせ（写真の承認・2026-10-22）: 先頭に日時（左揃え）、その下に左の写真・右の文 */
.notice-release--photo {
    display: block;
    color: var(--ink);
    text-decoration: none;
}

.notice-release-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 6px;
}

.notice-release-photo {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
}

.notice-release-text {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.notice-release-title {
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.5;
}

.notice-release-body {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* ---------- 初めて開いた人への案内（No.34・試作。/?intro=1） ---------- */
.intro-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;   /* シート（1100）と下のメニュー（1300）より上。1200 だと、スマホを横にしたとき「閉じる」「次へ」が下のメニューの裏に隠れた（No.208） */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(0, 0, 0, .45);
}

.intro {
    width: 100%;
    max-width: 380px;
    /* 横向きのスマホ（高さ 390px ほど）でも画面の上下にはみ出さないよう、はみ出す分は箱の中でスクロールする（No.208） */
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px 20px 16px;
    background: var(--bg);
    border-radius: 16px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .25);
}

.intro-icon {
    margin: 0 0 6px;
    text-align: center;
    font-size: 30px;
    color: var(--accent);
}

.intro h2 {
    margin: 0 0 12px;
    font-size: 17px;
    text-align: center;
}

.intro ul {
    margin: 0;
    padding-left: 1.2em;
    font-size: 14px;
    line-height: 1.75;
}

.intro li + li {
    margin-top: 4px;
}

/* 初回の案内の最後「地図に何を表示しますか？」: カテゴリをタイルで選ぶ（複数選べる） */
.intro-lead {
    margin: -4px 0 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted, #6b7580);
    text-align: center;
}

.intro-picks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.intro-pick {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.intro-pick i {
    font-size: 16px;
    opacity: .75;
}

.intro-pick-name {
    font-size: 14px;
    font-weight: 700;
}

.intro-pick-items {
    font-size: 11px;
    line-height: 1.4;
    opacity: .65;
}

.intro-pick.on {
    border-color: var(--accent);
    background: rgba(31, 58, 95, .12);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.intro-pick.on i {
    color: var(--accent);
    opacity: 1;
}

.intro-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 16px 0 12px;
}

.intro-dots span {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: var(--line);
    transition: width .35s cubic-bezier(.16, .9, .3, 1), background-color .25s ease;
}

/* 今のページの点は細長くなる */
.intro-dots span.on {
    width: 20px;
    background: var(--accent);
}

body.is-dark .intro {
    background: #1f2428;
    color: #e8e8e8;
}

/* ---------- 地図の見た目のメニュー（No.33。ヘッダー右上のボタンから開く） ---------- */
.style-menu {
    position: relative;
    margin-left: auto;
    pointer-events: auto;
}

.style-menu__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 1010;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--bg);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    white-space: nowrap;
}

.style-menu__title {
    margin: 0;
    font-size: 12px;
    color: var(--ink-sub);
}

.style-menu__row {
    display: flex;
    gap: 6px;
}

.style-menu__light {
    justify-content: center;
}

body.is-dark .style-menu__panel {
    background: #1f2428;
    color: #e8e8e8;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}

/* サービス名と、その下の天気・日の出・日の入り */
.hdr-title {
    min-width: 0;
    pointer-events: auto;
}

.hdr-weather {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    margin: 2px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.hdr-weather__now {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 700;
}

.hdr-weather__pop {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    font-weight: 400;
    color: var(--ink-sub);
}

.hdr-weather__sun {
    flex-basis: 100%;   /* 天気の下の行に出す */
    color: var(--ink-sub);
}

body.is-dark .hdr-weather {
    color: #f2f2f2;
}

body.is-dark .hdr-weather__pop,
body.is-dark .hdr-weather__sun {
    color: #c9ced3;
}

/* 読み上げ用の文字（画面には出さない） */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- 上から出すシート（SP の「名前で探す」。iPhone でキーボードに検索欄が隠れないように） ---------- */
@media (max-width: 767px) {
    .sheet.sheet--top {
        top: 0;
        bottom: auto;
        border-radius: 0 0 var(--sheet-radius) var(--sheet-radius);
        padding-top: calc(env(safe-area-inset-top) + 12px);
        box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
        transform: translateY(calc(-100% - 30px));
        max-height: 70%;
    }

    .sheet.sheet--top.open {
        transform: translateY(0);
    }

    .sheet.sheet--top .grip {
        display: none;
    }

    /* 下へ引いて閉じられないので、SP でも右上の × を出す */
    .sheet.sheet--top .sheet-close {
        display: block;
    }

    /* 右上の × に検索欄が重ならないように */
    .sheet.sheet--top .place-search {
        margin-right: 44px;
    }
}

/* ヘッダーの右側（マイページのアイコン）は、サービス名の上端にそろえる */
.hdr-row--top {
    align-items: flex-start;
}

/*
 * SP: サービス名と天気（左）は左上に重ねて置き、右側（マイページ → 場所タブ → 熱の面）を左の高さに関係なく詰めて並べる（2026-10-13）。
 * 場所タブのボタンは、名前が長くても左の天気に届かないよう幅に上限（あふれた分は …）
 */
@media (max-width: 767px) {
    /* 押す物ではないので、重なった右側のボタンの邪魔をしないよう触れても素通りにする */
    .hdr-title {
        position: absolute;
        top: calc(env(safe-area-inset-top) + 10px);
        left: 12px;
        pointer-events: none;
    }

    .place-tabs-toggle {
        max-width: calc(100vw - 194px);
    }

    .place-tabs-toggle-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ---------- マイページ: 地図の見た目（デフォルト・標準）と、トグル（.map-switch。ほかの設定でも使う） ---------- */
.map-prefs {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

/* 自分の情報の枠（.me）の下に置くとき。上は .me の下余白、下は次の枠との間 */
.map-prefs.map-prefs--card {
    margin: 16px 0;
}

.map-prefs h2 {
    font-size: 15px;
    margin: 0 0 10px;
}

.map-prefs__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.map-prefs__label {
    font-size: 12px;
    color: var(--ink-sub);
    margin-right: 4px;
}

.map-switch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    font-size: 14px;
}

.map-switch__input {
    position: absolute;
    right: 0;
    width: 46px;
    height: 28px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.map-switch__track {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 28px;
    border-radius: 14px;
    background: #c9ced3;
    transition: background .2s;
    pointer-events: none;
}

.map-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .2s;
}

.map-switch__input:checked + .map-switch__track {
    background: var(--accent);
}

.map-switch__input:checked + .map-switch__track::after {
    transform: translateX(18px);
}

.map-switch__input:focus-visible + .map-switch__track {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.map-prefs .small {
    margin: 0;
    font-size: 12px;
    color: var(--ink-sub);
}

/* ============================================================
   パネルの出入り（2026-10-21 ユーザー指示「パネル系が表示されるときは同じアニメーション」「全てに」）
   出る: 少し小さい・ぼかした状態から、ふわっと広がりながら現れる（ゆっくり）／消える: すっと速く消える。
   パネルの位置を動かす transform とぶつからないよう、広がりは個別の scale プロパティで行う。
   開いている間は scale: none・filter: none に戻す（残すと重ね合わせの基準になって位置指定がずれるため）
   ============================================================ */
:root {
    --pop-in: opacity .32s ease-out, scale .42s cubic-bezier(.16, .9, .3, 1), filter .32s ease-out;
    --pop-out: opacity .18s ease, scale .18s ease, filter .18s ease;
}

@keyframes pop-in {
    from {
        opacity: 0;
        scale: .92;
        filter: blur(4px);
    }

    to {
        opacity: 1;
        scale: none;
        filter: none;
    }
}

/* Vue の transition name="pop": 熱の見方・日記の案内・メール認証の案内・知らせ（toast） */
.heat-legend,
.diary-prompt,
.toast {
    transform-origin: top center;
}

.pop-enter-active {
    transition: var(--pop-in);
}

.pop-leave-active {
    transition: var(--pop-out);
}

.pop-enter-from,
.pop-leave-to {
    opacity: 0;
    scale: .92;
    filter: blur(4px);
}

/* 初回の案内: 背景はふわっと暗くなり、中の箱が広がる */
.pop-backdrop-enter-active {
    transition: opacity .32s ease-out;
}

.pop-backdrop-leave-active {
    transition: opacity .18s ease;
}

.pop-backdrop-enter-from,
.pop-backdrop-leave-to {
    opacity: 0;
}

.pop-backdrop-enter-active .intro {
    transition: var(--pop-in);
}

.pop-backdrop-leave-active .intro {
    transition: var(--pop-out);
}

.pop-backdrop-enter-from .intro,
.pop-backdrop-leave-to .intro {
    opacity: 0;
    scale: .92;
    filter: blur(4px);
}

/* シート（名所の詳細・一覧・チェックイン・投稿・バスなど）: 今までの下（PC は左）からのスライドに、同じふわっとを重ねる */
.sheet {
    opacity: 0;
    scale: .94;
    filter: blur(4px);
    transform-origin: bottom center;
    transition: transform .26s cubic-bezier(.32, .72, 0, 1), opacity .18s ease, scale .18s ease, filter .18s ease;
}

.sheet.open {
    opacity: 1;
    scale: none;
    filter: none;
    transition: transform .42s cubic-bezier(.16, .9, .3, 1), opacity .32s ease-out, scale .42s cubic-bezier(.16, .9, .3, 1), filter .32s ease-out;
}

/* 場所のパネル（SP）の開閉・段階の動き（2026-10-24 ユーザー指示「パネルの開閉に滑らかなアニメーション」）。
   上の .sheet / .sheet.open と同じ詳しさなので、後ろに書いたこちらが効く（高さ・上の余白・角丸のアニメーションは、前に書いても上書きされて効かなかった）。
   ふわっと（縮小・ぼかし）は背の高いパネルだと重くてカクつくので、場所のパネルはスライド＋フェードだけにする。
   開く＝ゆっくり減速して止まる／閉じる＝すっと下がる。小さい↔全画面は高さ・上の余白・角丸を同じ曲線で動かす（指を離した位置から続けて動く） */
@media (max-width: 767px) and (min-height: 561px) {
    .sheet--place,
    .sheet--place.open {
        scale: none;
        filter: none;
    }

    .sheet--place {
        transition: transform .34s cubic-bezier(.4, 0, .2, 1), opacity .24s ease;
    }

    .sheet--place.open {
        transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .3s ease-out;
    }

    /* 小さい↔全画面を切り替えている間（.is-stage。app.js の setPlaceExpanded）だけ、高さ・上の余白・角丸も動かす。
       常に動かすと、パネルを開くときに高さが縮む・伸びるのが見えてしまう */
    .sheet--place.open.is-stage {
        transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .3s ease-out,
            height .42s cubic-bezier(.22, 1, .36, 1), max-height .42s cubic-bezier(.22, 1, .36, 1),
            padding-top .42s cubic-bezier(.22, 1, .36, 1), border-radius .42s cubic-bezier(.22, 1, .36, 1);
    }
}

@media (max-width: 767px) {
    .sheet.sheet--top {
        transform-origin: top center;
    }
}

@media (min-width: 768px) {
    .sheet {
        transform-origin: left bottom;
    }
}

/* 近くの投稿の一覧 */
.feed {
    opacity: 0;
    scale: .96;
    filter: blur(4px);
    transform-origin: bottom center;
    transition: transform .26s cubic-bezier(.32, .72, 0, 1), opacity .18s ease, scale .18s ease, filter .18s ease, visibility 0s .26s;
}

.feed.open {
    opacity: 1;
    scale: none;
    filter: none;
    transition: transform .42s cubic-bezier(.16, .9, .3, 1), opacity .32s ease-out, scale .42s cubic-bezier(.16, .9, .3, 1), filter .32s ease-out, visibility 0s;
}

/* バスの検索結果の案内（下から出る帯） */
.page--bus-route .bus-route-notice {
    scale: .92;
    filter: blur(4px);
    transition: opacity .18s ease, transform .18s ease, scale .18s ease, filter .18s ease;
}

.page--bus-route .bus-route-notice.is-visible {
    scale: none;
    filter: none;
    transition: opacity .32s ease-out, transform .42s cubic-bezier(.16, .9, .3, 1), scale .42s cubic-bezier(.16, .9, .3, 1), filter .32s ease-out;
}

/* JS が作って出すもの（消えるときはそのまま消える）: ホーム画面アプリの案内・規約改定の同意のお願い */
.install-notice {
    transform-origin: top center;
    animation: pop-in .42s cubic-bezier(.16, .9, .3, 1) both;
}

.consent-overlay {
    animation: consent-fade .32s ease-out both;
}

.consent-box {
    animation: pop-in .42s cubic-bezier(.16, .9, .3, 1) both;
}

@keyframes consent-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pop-enter-active,
    .pop-leave-active,
    .pop-backdrop-enter-active,
    .pop-backdrop-leave-active,
    .pop-backdrop-enter-active .intro,
    .pop-backdrop-leave-active .intro,
    .sheet,
    .sheet.open,
    .feed,
    .feed.open,
    .page--bus-route .bus-route-notice,
    .page--bus-route .bus-route-notice.is-visible {
        transition: none !important;
    }

    .install-notice,
    .consent-overlay,
    .consent-box {
        animation: none;
    }
}

/* 初回の案内: ページの切り替え（Vue の transition name="intro-next" / "intro-back"。進む＝右から入って左へ出る・戻る＝その逆）。
   箱の高さの変化は app.js の introPageHooks が height を動かし、ここの transition でなめらかにする */
.intro {
    transition: height .38s cubic-bezier(.22, .8, .3, 1);
}

.intro-next-enter-active,
.intro-back-enter-active {
    transition: opacity .32s ease-out, translate .42s cubic-bezier(.16, .9, .3, 1), filter .32s ease-out;
}

.intro-next-leave-active,
.intro-back-leave-active {
    transition: opacity .14s ease, translate .14s ease;
}

.intro-next-enter-from {
    opacity: 0;
    translate: 18px 0;
    filter: blur(3px);
}

.intro-back-enter-from {
    opacity: 0;
    translate: -18px 0;
    filter: blur(3px);
}

.intro-next-leave-to {
    opacity: 0;
    translate: -12px 0;
}

.intro-back-leave-to {
    opacity: 0;
    translate: 12px 0;
}

/* 最後のページ「地図に何を表示しますか？」: タイルが順にふわっと現れ、押すとほんの少し沈んで色が移る */
.intro-pick {
    animation: pop-in .42s cubic-bezier(.16, .9, .3, 1) backwards;   /* 終わったら普通の指定に戻す（押したときの scale を効かせるため） */
    animation-delay: calc(var(--i, 0) * 50ms + 120ms);
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, scale .15s ease;
}

.intro-pick:active {
    scale: .97;
}

.intro-pick i {
    transition: color .2s ease, opacity .2s ease, transform .3s cubic-bezier(.16, .9, .3, 1);
}

.intro-pick.on i {
    transform: scale(1.12);
}

@media (prefers-reduced-motion: reduce) {
    .intro,
    .intro-next-enter-active,
    .intro-back-enter-active,
    .intro-next-leave-active,
    .intro-back-leave-active,
    .intro-dots span,
    .intro-pick,
    .intro-pick i {
        transition: none !important;
    }

    .intro-pick {
        animation: none;
    }
}

/* 初回の案内が出ている間は、案内だけ操作できる（地図・ヘッダー・ボタン・下のメニュー・ほかの案内は触れない）。
   横スワイプで次へ・戻るに使えるよう、案内の中は縦のスクロールだけをブラウザに任せる */
body.is-intro-open #app > :not(.intro-backdrop),
body.is-intro-open .tabbar,
body.is-intro-open .install-notice {
    pointer-events: none;
}

.intro {
    touch-action: pan-y;
}

/* 初回の案内: 1〜3枚目は同じ高さ（見えない控え .intro-sizer の3枚を重ね、一番高いページに箱がそろう）。画面の上下中央は .intro-backdrop の flex。
   背の低い画面でも箱が画面からはみ出さないよう、はみ出す分は箱の中でスクロールする */
.intro-stage {
    display: grid;
}

.intro-stage > * {
    grid-area: 1 / 1;
    min-width: 0;
}

.intro-sizer {
    display: grid;
    visibility: hidden;
    pointer-events: none;
}

.intro-sizer > * {
    grid-area: 1 / 1;
}

.intro {
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}

/*
 * イベント（管理画面「イベント」で登録した、地図に出す期間の中のもの。2026-10-24）。オレンジの丸に拡声器の絵と、下に題名。
 * MapKit 版・MapLibre 版で同じ見た目。丸の外へ広がる輪で目を引く（動きを減らす設定では止める）
 */
.hn-mk-event {
    position: relative;
    width: 34px;
    height: 34px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.hn-mk-event-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 50%;
    background: #e8590c;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    color: #fff;
    font-size: 14px;
}

.hn-mk-event-badge::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid #e8590c;
    opacity: 0;
    pointer-events: none;
    animation: hn-event-pulse 2.4s ease-out infinite;
}

@keyframes hn-event-pulse {
    0% { transform: scale(1); opacity: .7; }
    100% { transform: scale(1.9); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hn-mk-event-badge::after {
        animation: none;
    }
}

.hn-mk-event-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
    max-width: 11em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #b13a0b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    pointer-events: none;
    text-shadow: 0 0 1.2px #fff, 0 0 1.2px #fff, 1px 0 1px #fff, -1px 0 1px #fff, 0 1px 1px #fff, 0 -1px 1px #fff;
}

/*
 * アクセスモードの萩の外の駅・空港（2026-11-05）。灰青の丸に絵と、下に名前・短い札。MapKit 版・MapLibre 版で同じ見た目（sns-map.js の createAccessGateNode）。
 * 押しても何もしない（指の操作は下の地図へ通す）。外側（.hn-mk-gate）の position は地図が使う（MapLibre の .maplibregl-marker は absolute。
 * sns.css のほうが後に読まれるので、ここで position を書くと上書きして印がずれる）ため、札の位置の基準は中の .hn-mk-gate-box にする
 */
.hn-mk-gate {
    width: 28px;
    height: 28px;
    pointer-events: none;
}

.hn-mk-gate-box {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.hn-mk-gate-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 50%;
    background: #37474f;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    color: #fff;
    font-size: 13px;
}

.hn-mk-gate-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    white-space: nowrap;
    line-height: 1.3;
    color: #263238;
    text-shadow: 0 0 1.2px #fff, 0 0 1.2px #fff, 1px 0 1px #fff, -1px 0 1px #fff, 0 1px 1px #fff, 0 -1px 1px #fff;
}

.hn-mk-gate-label b {
    font-size: 12px;
}

.hn-mk-gate-label small {
    font-size: 10px;
    font-weight: 700;
    color: #455a64;
}

/* 札を印の左に出すもの（萩・石見空港。引いた地図ですぐ東の益田駅の札と重ならないように） */
.hn-mk-gate--left .hn-mk-gate-label {
    top: 50%;
    left: auto;
    right: 100%;
    transform: translateY(-50%);
    margin: 0 4px 0 0;
    align-items: flex-end;
}

/*
 * 相互フォローの人（2026-11-04・段階2）。緑の縁のアイコンと、下に「名前・5分前」。MapKit 版・MapLibre 版で同じ見た目
 */
.hn-mk-friend {
    position: relative;
    width: 36px;
    height: 36px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.hn-mk-friend-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 50%;
    background: #d3dbd5;
    border: 3px solid #2b8a3e;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    color: #fff;
    font-size: 15px;
}

.hn-mk-friend-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 一覧で選んだ人（setActiveFriend）。アイコンを大きくし、名前もその下へずらして少し大きく */
.hn-mk-friend-face,
.hn-mk-friend-label {
    transition: transform .2s ease, margin-top .2s ease, font-size .2s ease;
}

.hn-mk-friend.is-active .hn-mk-friend-face {
    transform: scale(1.5);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .45);
}

.hn-mk-friend.is-active .hn-mk-friend-label {
    margin-top: 12px;
    font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
    .hn-mk-friend-face,
    .hn-mk-friend-label {
        transition: none;
    }
}

.hn-mk-friend-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
    max-width: 12em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1f6b30;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    pointer-events: none;
    text-shadow: 0 0 1.2px #fff, 0 0 1.2px #fff, 1px 0 1px #fff, -1px 0 1px #fff, 0 1px 1px #fff, 0 -1px 1px #fff;
}

/* イベントの詳細（下のシート） */
.event-badge-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 4px;
    padding: 1px 10px;
    border-radius: 999px;
    background: #fdece1;
    color: #b13a0b;
    font-size: 12px;
    font-weight: 700;
}

.sheet--event h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

/* 地図の上の段の右端（2026-10-24）: ヒートマップのボタン・熱の見方の？・お知らせのベルを横に並べる */
.hdr-top-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px auto;
}

.hdr-heat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 右上のハンバーガー（2026-11-04）: ベルの右。ボタンはベルと同じ丸い札、押すと下に右寄せで一覧を出す */
.hdr-menu {
    position: relative;
    flex: 0 0 auto;
}

.hdr-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
}

.hdr-menu-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 10;
    min-width: 160px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}

.hdr-menu-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
}

.hdr-menu-list a:active {
    background: var(--line);
}

.hdr-menu-list i {
    width: 16px;
    text-align: center;
}

/* メニューの「設定」の飛び先（マイページの地図の見た目）。ホーム画面アプリで上端がステータスバーに隠れないよう、少し下で止める */
#settings {
    scroll-margin-top: calc(env(safe-area-inset-top) + 12px);
}


/* ===== ユーザーカード（2026-11-04・フォロー。user-card.js が作って出す） ===== */

/* 名前を押せるようにしたボタン（コメント・投稿・お知らせ・マイページの一覧）。見た目は元の文字のまま */
.user-link {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.user-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

img.user-link,
span.user-link {
    cursor: pointer;
}

.ucard-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 28, 36, .55);
    animation: consent-fade .32s ease-out both;
}

.ucard {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    background: var(--bg);
    color: var(--ink);
    border-radius: 16px;
    padding: 20px 18px 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    animation: pop-in .42s cubic-bezier(.16, .9, .3, 1) both;
}

.ucard-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-sub);
    cursor: pointer;
}

.ucard-close::before {
    content: "\f00d";
    font: var(--fa-font-solid);
    font-size: 16px;
}

.ucard-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 28px;
    margin-bottom: 12px;
}

.ucard-avatar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--face-default);
    color: #fff;
    font-size: 24px;
}

.ucard-head-text {
    min-width: 0;
}

.ucard-name {
    margin: 0 0 4px;
    font-size: 17px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.ucard-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 0;
    font-size: 12px;
    color: var(--ink-sub);
}

.ucard-badge {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--bg-sub);
    color: var(--ink);
    font-weight: 700;
}

.ucard-bio {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ucard-links {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    font-size: 13px;
}

.ucard-links li + li {
    margin-top: 4px;
}

.ucard-links a {
    color: var(--accent-dark);
    overflow-wrap: anywhere;
}

.ucard-links i {
    margin-right: 6px;
    font-size: 11px;
}

.ucard-note {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--ink-sub);
}

.ucard-err {
    margin: 0 0 10px;
    font-size: 13px;
    color: #b3412f;
}

/* 相互フォローの人の最近の居場所（2026-11-04・段階2） */
.ucard-where {
    margin: 4px 0 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line, rgba(0, 0, 0, .08));
}

.ucard-where__title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
}

.ucard-where__list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}

.ucard-where__row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    width: 100%;
    padding: 6px 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 13px;
    text-align: left;
}

button.ucard-where__row {
    cursor: pointer;
}

button.ucard-where__row .ucard-where__text {
    color: var(--accent-dark);
}

.ucard-where__row i {
    flex: 0 0 14px;
    font-size: 12px;
    text-align: center;
    color: var(--ink-sub);
}

.ucard-where__text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ucard-where__at {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--ink-sub);
}

.ucard-where__mine {
    margin: 0;
    font-size: 12px;
    color: var(--ink-sub);
}

.ucard-where__mine a {
    color: var(--accent-dark);
}

.ucard-actions {
    display: flex;
}

.ucard-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}

.btn.ghost.ucard-btn {
    flex: 1;
}

/* フォロー中・相互フォロー（押すとやめる）は白地に紺の枠 */
.ucard-follow.is-on,
.follow-btn.is-on {
    background: transparent;
    border: 1.5px solid var(--navy);
    color: var(--navy);
}

/* お知らせ・マイページの一覧の小さいフォローのボタン */
.follow-btn {
    flex: 0 0 auto;
    min-width: 96px;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.follow-btn:disabled {
    opacity: .6;
}

/* お知らせの「フォロー」タブの1行: 左に人（押すとユーザーカード）・右にフォローバックのボタン */
.notice-follow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}

.notice-follow-who {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--ink);
}

/* マイページの「フォロー」欄（相互・フォロー中・フォロワーの一覧） */
.follow-box h2 {
    margin: 0 0 8px;
    font-size: 15px;
}

/* 下メニューの「フォロワー」の一覧（2026-11-04）。行は投稿の一覧（.feed-item）と同じ見た目で、シートの端まで線を引く */
.sheet--friends .friend-item {
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
}

.sheet--friends .friend-item:first-of-type {
    border-top: 1px solid var(--line);
}

.friend-none {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--ink-sub);
}

/* 相互フォローの人に見せるもの（2026-11-04・段階2）。一覧の下に区切って置く */
.follow-share {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line, rgba(0, 0, 0, .08));
}

.follow-share__title {
    margin: 0 0 6px;
    font-size: 14px;
}

.follow-tabs {
    margin-bottom: 10px;
}

.follow-tabs .tab {
    font-size: 13px;
    white-space: nowrap;
}

.follow-count {
    margin-left: 4px;
    font-weight: 700;
}

.follow-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.follow-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.follow-list li + li {
    border-top: 1px solid var(--line);
}

.follow-who {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.follow-name {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}
