* { box-sizing: border-box; }
/* 画面幅に合わせた自動拡縮：基準375px=1（JSがhtmlに実値を設定。未設定時は1） */
:root { --ui-scale: 1; --nav-h: max(56px, calc(64px * var(--ui-scale))); --cream: #FBF6EF; --coral: #C0674F; --ink: #3B322C; --accent: #E9B949; }
body { margin: 0; font-family: "Zen Maru Gothic", -apple-system, "Hiragino Sans", sans-serif; font-weight: 500; background: radial-gradient(260px 220px at 85% 6%, #F6D3C2 0, rgba(246,211,194,0) 70%), radial-gradient(240px 220px at 5% 38%, #F7E5B4 0, rgba(247,229,180,0) 70%), radial-gradient(260px 240px at 95% 75%, #F6D3C2 0, rgba(246,211,194,0) 70%), var(--cream); background-attachment: fixed; color: var(--ink); font-size: 17px; line-height: 1.5; }
.hidden { display: none !important; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; border: none; border-radius: 8px; padding: 8px 14px; background: var(--coral); color: #fff; font-size: 14px; min-height: 48px; line-height: 1.5; }
button:disabled { opacity: .5; cursor: default; }
input, select { font-size: 16px; line-height: 1.5; }
.hint { font-size: 12px; color: #8A7D72; }

/* 細いヘッダ（48px）＋メニュー。テーマA：半透明クリームのすりガラス。サービス名は出さない（dec-20261110-037） */
.topbar { min-height: max(58px, calc(50px * var(--ui-scale))); background: rgba(251, 246, 239, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .7); color: var(--ink); padding: env(safe-area-inset-top) 8px 0 14px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { display: none; margin: 0; font-size: 17px; }
.topbtns { display: flex; gap: 8px; }
/* アイコンだけのボタン（案Dの形）：テーマAは半透明の白ぼかしの丸にコーラルのSVGアイコン */
.iconbtn { width: max(48px, calc(48px * var(--ui-scale))); height: max(48px, calc(48px * var(--ui-scale))); min-height: 48px; padding: 0; background: rgba(255, 255, 255, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .9); color: var(--coral); box-shadow: 0 2px 10px rgba(192, 103, 79, .15); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.iconbtn svg { width: 26px; height: 26px; }
.ibtn { width: max(48px, calc(48px * var(--ui-scale))); height: max(48px, calc(48px * var(--ui-scale))); min-height: 48px; padding: 0; border-radius: 50%; background: var(--coral); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ibtn svg { width: 24px; height: 24px; }
.panel { position: fixed; top: calc(58px * var(--ui-scale) + env(safe-area-inset-top) + 8px); right: 8px; left: 8px; z-index: 30; background: #fff; border-radius: 20px; box-shadow: 0 4px 18px rgba(59, 50, 44, .22); padding: 12px; }
/* ☰メニューは詳細シート（z40）の上にも出せるようにする */
#menu-panel { z-index: 45; }
/* 探すの2択：台座なし。ヘッダ（広告）の下〜下部タブの上のど真ん中に、案内文とボタンだけを置く。
   パネル自体は透明な全面の器（pointer-events:none）で、中身（.spwrap）だけがタップを受ける。
   far-box（ゴール検索）だけは読めるよう今の白い箱のまま出す */
#search-panel { top: calc(58px * var(--ui-scale) + env(safe-area-inset-top)); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); left: 0; right: 0; width: auto; background: transparent; border-radius: 0; box-shadow: none; padding: 0 12px; display: flex; flex-direction: column; align-items: center; overflow-y: auto; pointer-events: none; }
#search-panel .spwrap { margin: auto 0; width: min(360px, 100%); pointer-events: auto; }
#geo-guide { text-align: center; font-size: 17px; line-height: 1.5; margin-bottom: 16px; }
#search-panel .geotabs { background: transparent; padding: 0; flex-wrap: wrap; }
#search-panel .geotabs .kindtab { flex: 1 1 136px; }
#search-panel #far-box { background: #fff; border-radius: 12px; box-shadow: 0 4px 18px #0004; padding: 12px; margin-top: 12px; }
#geo-msg { text-align: center; }
@media (min-width: 700px) { .panel { left: auto; width: 360px; } }
.menuuser { font-size: 13px; color: #6E6259; padding: 4px 2px 10px; }
.menubtn { width: 100%; margin-top: 8px; }
.kindtabs, .typetabs { display: flex; gap: 8px; margin-bottom: 10px; }
.kindtab { background: #fff; border: 1px solid var(--coral); color: var(--coral); border-radius: 20px; padding: 8px 20px; font-size: 15px; min-height: 48px; }
.kindtab.active { background: var(--coral); color: #fff; }
.areasearch { display: flex; gap: 8px; }
.areasearch input { flex: 1; padding: 10px; border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; min-height: 48px; min-width: 0; background: rgba(255, 255, 255, .65); }
/* 2〜3択の切り替えスイッチ（案D）：テーマAは半透明の白ぼかしの溝の中に白い選択ピル */
.geotabs, .typetabs { gap: 8px; background: rgba(255, 255, 255, .42); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .9); border-radius: 999px; padding: 4px; }
.geotabs .kindtab, .typetabs .kindtab { flex: 1; font-size: 14px; letter-spacing: -.5px; padding: 10px 8px; background: transparent; border: 3px solid transparent; color: #8A7D72; border-radius: 999px; min-height: max(48px, calc(48px * var(--ui-scale))); }
.geotabs .kindtab.active, .typetabs .kindtab.active { background: rgba(255, 255, 255, .85); border-color: transparent; color: var(--coral); font-weight: 700; box-shadow: 0 2px 8px rgba(192, 103, 79, .16); }
/* 案D：まだ何も選んでいない切り替えスイッチは、各区画を白地＋コーラル太字＋コーラル1px枠のピルに
   見せる（選択中の3px枠と形をそろえる）。1つ選ぶと他の区画はくすんだ色の文字に戻る */
.geotabs:not(:has(.kindtab.active)) .kindtab,
.typetabs:not(:has(.kindtab.active)) .kindtab { background: rgba(255, 255, 255, .8); border-color: rgba(192, 103, 79, .45); border-width: 1px; color: var(--coral); font-weight: 700; }
/* 単独ボタン（案D）：左に丸い色アイコン＋太字の文字。テーマAは半透明の白ぼかし */
.kindtab.rbtn, .rbtn { display: inline-flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .95); box-shadow: 0 4px 14px rgba(192, 103, 79, .14); border-radius: 999px; padding: 4px 16px 4px 4px; color: var(--ink); font-weight: 700; min-height: max(48px, calc(56px * var(--ui-scale))); text-align: left; }
.kindtab.rbtn .ric, .rbtn .ric, .latersug .ric { width: max(40px, calc(48px * var(--ui-scale))); height: max(40px, calc(48px * var(--ui-scale))); flex: none; border-radius: 50%; background: var(--coral); color: #fff; display: flex; align-items: center; justify-content: center; }
.kindtab.rbtn .ric svg, .rbtn .ric svg, .latersug .ric svg { width: 26px; height: 26px; }
.kindtab.rbtn:disabled, .rbtn:disabled { color: #999; opacity: 1; }
.kindtab.rbtn:disabled .ric, .rbtn:disabled .ric { background: #bbb; }
/* いいね済み：丸はピンク・ハートは塗りつぶし・文字は「いいね済み」。押せないのではなく
   済みであることが分かるよう、disabled の灰色は当てない */
.rbtn.liked:disabled { color: var(--ink); }
.rbtn.liked .ric, .rbtn.liked:disabled .ric { background: #E8608A; }
.rbtn.liked .ric svg { fill: currentColor; }
/* 文字が長くて横に収まらない所は、アイコンを上・文字を下の縦積みにする */
.rbtn.rcol { flex-direction: column; justify-content: center; gap: 6px; padding: 8px; text-align: center; }
/* 旅程の候補タブ：文言が長いので等分せず文の長さの丸ピルを折り返して並べる */
#itin-cands .kindtab { flex: none; }
.geocredit { padding: 8px 0 0; text-align: left; font-size: 12px; color: #8A7D72; }
.latersug button b { display: block; font-size: 15px; }
.latersug .lc span { display: block; font-size: 12px; color: #8A7D72; }
.swdist { font-size: 13px; margin-top: 2px; text-shadow: 0 1px 3px #000; }
#place-picked { margin-top: 8px; background: rgba(192, 103, 79, .08); border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; padding: 10px; font-size: 17px; }
#place-picked .placeaddr { display: block; font-size: 12px; color: #6E6259; margin-top: 2px; }
#btn-place-change { margin-top: 8px; background: rgba(255, 255, 255, .65); color: var(--coral); border: 1px solid rgba(192, 103, 79, .45); }
#btn-place-go { width: 100%; margin-top: 8px; }
/* 検索に出ない場所の3手段（写真の場所／いまいる場所／地図で指す） */
#place-fallback { margin-top: 8px; }
.placealt { display: flex; gap: 8px; }
.placealt .kindtab { flex: 1; min-width: 0; padding: 10px 8px; font-size: 14px; letter-spacing: -.5px; }
#place-map { height: 220px; border-radius: 8px; overflow: hidden; background: #e8eef2; margin-top: 10px; position: relative; z-index: 0; isolation: isolate; }
#pa-map-ok { width: 100%; margin-top: 8px; }
#place-minimap { height: 140px; border-radius: 8px; overflow: hidden; background: #e8eef2; margin-top: 8px; position: relative; z-index: 0; isolation: isolate; }

/* 下部ナビ（案B）：画面の下端にぴったり付いた緑の帯（左右下の隙間ゼロ・角丸は上だけ）。
   下のホームバー分は帯の内側の余白で吸収する。選択中は白い丸をそのタブの列の中央に置き、
   丸ごとそのボタンの押せる範囲の内側に収める */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 8px; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 0 2px env(safe-area-inset-bottom); background: var(--cream); border-radius: calc(24px * var(--ui-scale)) calc(24px * var(--ui-scale)) 0 0; box-shadow: 0 -2px 12px rgba(59, 50, 44, .18); }
.bnav { flex: 1; min-width: 0; border-radius: calc(28px * var(--ui-scale)); background: transparent; color: var(--ink); font-size: 14px; font-weight: 700; padding: 4px 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; white-space: nowrap; }
/* タブ名はボタンの匿名テキストとして流し込む（5分割の狭い区画でも従来どおりの見え方） */
.bnav .bnlbl { display: contents; }
.bnav .bnic { flex: none; width: calc(24px * var(--ui-scale)); height: calc(24px * var(--ui-scale)); display: flex; align-items: center; justify-content: center; }
.bnav .bnic svg { width: calc(24px * var(--ui-scale)); height: calc(24px * var(--ui-scale)); }
.bnav .bnlbl { font-size: 14px; line-height: 1.5; }
.bnav.active .bnic { width: max(48px, calc(52px * var(--ui-scale))); height: max(48px, calc(52px * var(--ui-scale))); border-radius: 50%; background: #fff; border: 4px solid var(--coral); color: var(--coral); }
.bnav.active .bnic svg { width: calc(28px * var(--ui-scale)); height: calc(28px * var(--ui-scale)); }
/* 中央の「探す」は承認画像どおり常に丸：他の画面ではコーラル塗り、探す画面では白地＋コーラル縁（active） */
#nav-swipe .bnic { width: max(48px, calc(52px * var(--ui-scale))); height: max(48px, calc(52px * var(--ui-scale))); border-radius: 50%; background: var(--coral); color: #fff; display: flex; align-items: center; justify-content: center; }
#nav-swipe .bnic svg { width: calc(28px * var(--ui-scale)); height: calc(28px * var(--ui-scale)); }
#nav-swipe.active .bnic { background: #fff; border: 4px solid var(--coral); color: var(--coral); }
#nav-swipe .bnlbl { display: none; }
/* 選択中は文字を出さず高さ0に畳む（丸が列の中央に来るように。透明だが描画上は残し、
   件数バッジのラベル判定のためにDOM上は残す） */
.bnav.active { gap: 0; font-size: 0; }
.bnav.active .bnlbl { display: contents; color: transparent; font-size: 0; line-height: 0; }
/* お気に入り・旅程の件数バッジ（各タブのアイコン右上に重ねる） */
#fav-badge, #itin-badge { position: absolute; top: 4px; right: calc(50% - 26px * var(--ui-scale)); min-width: max(22px, calc(22px * var(--ui-scale))); height: max(22px, calc(22px * var(--ui-scale))); padding: 0 5px; border-radius: calc(11px * var(--ui-scale)); background: #ff4d6d; color: #fff; font-size: 14px; line-height: max(21px, calc(22px * var(--ui-scale))); font-weight: 700; pointer-events: none; }
#fav-badge.bump { animation: favbump .2s; }
@keyframes favbump { 50% { transform: scale(1.45); } }
/* 探す画面・お気に入りのカード全画面表示（一気見）の間は、ヘッダは写真の上の透明な重ね。
   タイトルは出さず、左にアドジェネ 320x50 を置く（画像を画面の最上端から見せる） */
html.clearhead .topbar { position: fixed; left: 0; right: 0; top: 0; height: calc(58px * var(--ui-scale) + env(safe-area-inset-top)); min-height: 0; background: transparent; border-bottom: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: env(safe-area-inset-top) 4px 0; justify-content: flex-start; }
html.clearhead .iconbtn { background: rgba(255, 255, 255, .26); border: 1px solid rgba(255, 255, 255, .45); color: #fff; box-shadow: none; }
html.clearhead .topbtns { position: absolute; top: env(safe-area-inset-top); right: 4px; }
/* 広告は全画面ともヘッダ1行目（左寄せで実寸320x50）。画面が狭く☰（右端）と
   重なる時だけ枠を狭める（広告の下に別の段は作らない。approved find_A/fav_C/itin_v5） */
#ad-slot { width: min(320px, calc(100vw - max(48px, calc(48px * var(--ui-scale))) - 20px)); height: 50px; flex: none; overflow: hidden; }
#ad-slot iframe { display: block; width: 100%; height: 50px; border: 0; }
/* 不透明ヘッダでも広告の左端は画面から8px（topbarの左padding14px−margin6px）。
   右の☰（パディング8px込み）とは常に8px以上空けるよう、透明ヘッダより枠を細める */
html:not(.clearhead) #ad-slot { margin-left: -6px; width: min(320px, calc(100vw - max(48px, calc(48px * var(--ui-scale))) - 32px)); }
/* 一覧の途中に挟む同じ320x50広告枠。読み込みは画面に近づいてから（JSの遅延読み込み） */
.adrow { width: 320px; max-width: 100%; height: 50px; margin: 10px auto; overflow: hidden; }
.adrow iframe { display: block; width: 100%; height: 50px; border: 0; }
.wgrid > .adrow { grid-column: 1 / -1; justify-self: center; }
/* 写真の上端に敷く薄い黒のグラデーション（広告・☰の視認用。写真全体には掛けない） */
html.clearhead .stage::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(58px * var(--ui-scale) + env(safe-area-inset-top)); background: linear-gradient(rgba(0, 0, 0, .35), transparent); z-index: 15; pointer-events: none; }
/* 透明ヘッダ分だけ全画面画面内のボタン・案内を下げる（☰・広告と重ねない） */
html.clearhead #binge-close, html.clearhead #binge-mute, html.clearhead #binge-pos { top: calc(58px * var(--ui-scale) + env(safe-area-inset-top) + 8px); }
html.clearhead #binge-itin { top: calc(58px * var(--ui-scale) + env(safe-area-inset-top) + 16px + max(48px, 48px * var(--ui-scale))); }
html.clearhead #btn-mute, html.clearhead .tapnote, html.clearhead #lap-badge { top: calc(58px * var(--ui-scale) + env(safe-area-inset-top) + 8px); }
html.clearhead #wide-note { top: calc(58px * var(--ui-scale) + env(safe-area-inset-top)); }
html.clearhead #pass-toast { top: calc(66px * var(--ui-scale) + env(safe-area-inset-top) + 8px); }
/* 画面全体で使う短い通知 */
#toast { position: fixed; top: calc(58px * var(--ui-scale) + env(safe-area-inset-top) + 12px); left: 50%; transform: translateX(-50%); z-index: 60; background: #000a; color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 20px; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }

/* 旅程 */
#itin-map { height: 260px; border-radius: 20px; overflow: hidden; background: #e8eef2; margin-bottom: 4px; border: 1px solid rgba(255, 255, 255, .95); box-shadow: 0 6px 18px rgba(192, 103, 79, .12); position: relative; z-index: 0; isolation: isolate; }
.itinempty { padding: 24px 12px; font-size: 14px; color: #8A7D72; text-align: center; }
.mpin span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--coral); color: #fff; font-size: 14px; font-weight: 700; border: 2px solid #fff; box-shadow: 0 1px 4px #0007; }
.mpin-org span { background: #ff4d6d; }
#itin-cands { flex-wrap: wrap; margin-top: 8px; }
.itinorig { margin-top: 4px; }
#it-orig-label { margin-top: 8px; background: rgba(192, 103, 79, .08); border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; padding: 10px; font-size: 14px; }
#it-depart-row { display: block; margin-top: 12px; font-size: 14px; color: #6E6259; }
#it-depart { padding: 10px; border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; background-color: rgba(255, 255, 255, .65); margin-left: 8px; min-height: 48px; font-size: 16px; }
.ttstop { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .95); box-shadow: 0 4px 14px rgba(192, 103, 79, .10); border-radius: 16px; padding: 8px 10px; margin-top: 10px; flex-wrap: wrap; }
.tttime { font-size: 17px; font-weight: 700; min-width: 46px; }
.ttname { flex: 1 1 140px; font-size: 17px; }
.ttstay { flex-basis: 100%; margin-left: 56px; }
.ttthumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--coral); flex-shrink: 0; }
.ttstay { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #6E6259; }
.ttstay select { min-height: 48px; padding: 6px; border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; background-color: rgba(255, 255, 255, .65); }
.ttleg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0 8px; padding: 8px 10px; border-left: 2px solid rgba(192, 103, 79, .5); background: rgba(255, 255, 255, .25); border-radius: 0 12px 12px 0; font-size: 14px; }
.ttlegicon { background: rgba(192, 103, 79, .14); color: var(--coral); border-radius: 6px; padding: 2px 8px; font-size: 13px; }
.ttgmap { min-height: 48px; font-size: 14px; }
.ttend { background: rgba(255, 255, 255, .3); }
.itinbtn { width: 100%; margin-top: 8px; }
/* 「旅程から外す」（入れ済み）：白地＋コーラルの枠と文字（approved fav_C） */
.itinbtn.on, #btn-itin-d.on, #binge-itin.on { background: #fff; border: 1px solid var(--coral); color: var(--coral); }
#binge-itin { position: absolute; top: 66px; right: 10px; z-index: 10; min-height: 48px; font-size: 14px; }
#itin-place-modal { z-index: 55; }
#itin-place-modal .areasearch { margin-top: 10px; }
#itp-cancel { width: 100%; margin-top: 10px; }
#geo-consent { z-index: 60; max-height: calc(100vh - 64px); overflow-y: auto; }
#geo-title { font-size: 17px; font-weight: 700; line-height: 1.5; margin-bottom: 8px; }
#geo-body p { font-size: 17px; line-height: 1.5; margin: 0 0 8px; text-wrap: balance; }
.geo-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
#video-modal { z-index: 60; max-height: calc(100vh - 64px); overflow-y: auto; }
#vm-title { font-size: 17px; font-weight: 700; line-height: 1.5; margin-bottom: 8px; }
#vm-body p { font-size: 17px; line-height: 1.5; margin: 0 0 8px; text-wrap: balance; }
#vm-body p.vmdetail { font-size: 12px; line-height: 1.5; color: #8A7D72; margin: 4px 0 0; word-break: break-all; text-wrap: wrap; }
/* 書き出し用の見えない動画要素。iOSは画面外の無音動画の再生を止めることがあるので、画面内に1pxで置く */
.renderoff { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: .01; pointer-events: none; }

main { margin: 0; }
.pad { max-width: 640px; margin: 0 auto; padding: 14px 14px calc(var(--nav-h) + env(safe-area-inset-bottom) + 32px * var(--ui-scale)); }

/* スワイプ：写真・動画はヘッダ以外の全高（JSが実測で高さを当てる） */
.stage { position: relative; height: calc(100vh - 58px); height: calc(100dvh - 58px); touch-action: none; background: #000; overflow: hidden; }
/* 探す画面の間はページ自体を固定し、縦スクロール・バウンドを起こさない */
html.swipelock { overscroll-behavior: none; }
html.swipelock body { position: fixed; inset: 0; width: 100%; overflow: hidden; overscroll-behavior: none; }
#swipe-deck, #binge-deck { position: absolute; inset: 0; }
.swipecard { position: absolute; inset: 0; background: #000; overflow: hidden; user-select: none; }
.swipecard.hidden { display: none; }
.swload { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; font-size: 20px; font-weight: 700; padding: 20px; text-shadow: 0 1px 3px #000; pointer-events: none; }
#btn-mute { position: absolute; top: 10px; right: 10px; z-index: 10; width: max(48px, calc(48px * var(--ui-scale))); height: max(48px, calc(48px * var(--ui-scale))); min-height: 48px; padding: 0; background: rgba(255, 255, 255, .28); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .5); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
#btn-mute svg, #binge-mute svg, #binge-close svg { width: 24px; height: 24px; }
#lap-badge, .swipemsg { z-index: 10; }
.swmedia { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 写真アルバムの切替＝見本B「光のリングが広がる」：次の写真が円形clip-pathで
   中心付近から広がり、白く光る輪が縁を追い、細い輪がもう1本、中心に柔らかい光。
   アニメーション本体は app.js の rAF（約1.3秒）が動かす */
.swfx.ringfx { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.swfx.ringfx .bnew { position: absolute; inset: 0; clip-path: circle(0px at 50% 50%); -webkit-clip-path: circle(0px at 50% 50%); }
.swfx.ringfx .bring, .swfx.ringfx .bring2 { position: absolute; left: 0; top: 0; border-radius: 50%; opacity: 0; pointer-events: none; will-change: transform, width, height; }
.swfx.ringfx .bring { border: 2px solid rgba(255, 255, 255, .96); box-shadow: 0 0 14px 4px rgba(255, 255, 255, .75), 0 0 44px 14px rgba(255, 246, 232, .35), inset 0 0 22px 6px rgba(255, 255, 255, .55); }
.swfx.ringfx .bring2 { border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 0 10px 2px rgba(255, 255, 255, .4); }
.swfx.ringfx .bcore { position: absolute; left: 0; top: 0; width: 200px; height: 200px; margin: -100px 0 0 -100px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 255, 255, .35) 35%, rgba(255, 255, 255, 0) 70%); opacity: 0; pointer-events: none; }
.swtext { background: linear-gradient(160deg, var(--coral), #7E4534); color: #fff; padding: 24px 12px; display: flex; flex-direction: column; justify-content: center; }
.swtext h3 { font-size: 22px; margin: 0 0 12px; }
.swtext .route { font-size: 12px; opacity: .9; }
.swtext .meta { font-size: 13px; margin-top: 10px; opacity: .8; }
.tapnote { position: absolute; top: 10px; right: 10px; background: #0009; color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 10px; pointer-events: none; }
/* 文字情報帯は写真切替の演出層（.swfx z-index:4）より常に手前。
   .swplace に pointer-events:auto を当てるのは、演出中も elementFromPoint が
   文字を返すようにするため（.authorlink と同じパターン。pointerdown は
   stageへバブルするのでスワイプ・タップの動作は変わらない） */
.swinfo { position: absolute; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 5; padding: calc(14px * var(--ui-scale)); background: linear-gradient(transparent, #000c); color: #fff; pointer-events: none; }
.swplace { font-size: 20px; font-weight: 700; text-shadow: 0 1px 3px #000; pointer-events: auto; }
.swsub { font-size: 12px; opacity: .9; margin-top: 4px; }
.swsub .authorlink { pointer-events: auto; background: none; border: none; color: #fff; text-decoration: underline; padding: 14px 4px; min-height: 48px; min-width: 48px; font-size: 12px; }
/* デッキで下に重なっているカードは、表示中カードに隠れている間は
   メディアだけを見せ、タップ要素（情報帯）は出さない */
.swipecard:not(.ontop) .swinfo { display: none; }
/* 探すカード右端の👍/📝（詳細を開かず押せる）。下部タブの上に縦に並べる */
.swactions { position: absolute; right: 8px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); z-index: 10; display: flex; flex-direction: column; gap: 12px; }
/* 探すカード右端のいいね・お気に入り：56pxの丸＋文字は丸の下の外（approved find_A） */
.swact { width: 86px; min-width: 48px; min-height: 48px; padding: 0; border-radius: 0; background: none; border: none; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; line-height: 1.5; }
.swact .swicon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .18); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); border: 1px solid rgba(255, 255, 255, .5); line-height: 1; }
.swact .swicon svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55)); }
.swact .swcnt { font-size: 12px; line-height: 1.5; text-shadow: 0 1px 3px #000; }
.swact.on .swicon { transform: scale(1.15); }
.swact-like.on .swicon svg { fill: currentColor; }
.swact.on .swcnt { color: #d8ffe8; font-weight: 700; }
.swipecard:not(.ontop) .swactions { display: none; }
/* 検索・メニュー・各種パネルを出している間はその下の右端アイコンを隠す（重なり防止） */
html.panelopen .swactions { display: none; }
/* 右端アイコンと下部の文字情報が重ならないよう、右側に余白を取る */
.swipecard.hasact .swinfo { padding-right: calc(96px * var(--ui-scale)); }
/* 一気見では文字ブロックの下端を下部タブの上端にぴったり付ける（隙間0） */
#binge-stage .swinfo { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.swtags { font-size: 13px; margin-top: 6px; line-height: 1.5; }
#lap-badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: #0009; color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 10px; pointer-events: none; }
.swipemsg { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; text-align: center; background: var(--cream); padding: 20px; font-size: 15px; line-height: 1.7; }

/* スワイプ中の文字スタンプ（移動量に応じてJSがopacityを上げる） */
.stamp { position: absolute; top: 16%; z-index: 5; padding: 6px 14px; border: 3px solid; border-radius: 10px; font-size: 26px; font-weight: 800; opacity: 0; pointer-events: none; white-space: nowrap; }
#stamp-yes { right: 16px; color: #ff4d6d; border-color: #ff4d6d; transform: rotate(10deg); }
#stamp-no { left: 16px; color: #fff; border-color: #fff; transform: rotate(-10deg); text-shadow: 0 1px 3px #000; }
/* 左確定時の短い通知 */
#pass-toast { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 11; background: #000a; color: #fff; font-size: 14px; padding: 8px 18px; border-radius: 20px; pointer-events: none; }

/* 探す1枚目のフリック案内。写真の上に白く薄く重ねるだけ（暗い幕は掛けない）。
   pointer-events:none でスワイプ・タップの邪魔をしない。右端👍📝・情報帯と
   重ならないよう下端は👍📝の上端より上に置く */
.flickguide { position: absolute; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + max(76px, 76px * var(--ui-scale)) + max(176px, 176px * var(--ui-scale))); z-index: 9; display: flex; align-items: stretch; color: #fff; opacity: .75; pointer-events: none; text-shadow: 0 1px 3px #000; transition: opacity .3s; }
.flickguide.fg-out { opacity: 0; }
.fg-side { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fg-fig { display: flex; align-items: center; gap: 8px; }
.fg-fig svg { width: calc(30px * var(--ui-scale)); height: calc(30px * var(--ui-scale)); }
.fg-cap { font-size: 17px; line-height: 1.5; text-align: center; white-space: nowrap; }
.fg-line { width: 2px; background: #fff; }

/* 一気見画面 */
#binge-pos { position: absolute; top: 10px; left: 10px; z-index: 10; background: #0009; color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 10px; pointer-events: none; }
#binge-close { position: absolute; top: 10px; right: 10px; z-index: 10; width: max(48px, calc(48px * var(--ui-scale))); height: max(48px, calc(48px * var(--ui-scale))); min-height: 48px; padding: 0; background: rgba(255, 255, 255, .28); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .5); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
#binge-mute { position: absolute; top: 10px; right: calc(10px + max(48px, 48px * var(--ui-scale)) + 8px); z-index: 10; width: max(48px, calc(48px * var(--ui-scale))); height: max(48px, calc(48px * var(--ui-scale))); min-height: 48px; padding: 0; background: rgba(255, 255, 255, .28); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .5); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
#binge-end { z-index: 12; }
#btn-binge { width: 100%; margin-bottom: 12px; }

/* 見る：行った日ごとのサムネ格子 */
.datehead { font-size: 14px; color: #6E6259; margin: 18px 0 8px; font-weight: 700; }
.wgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
@media (max-width: 400px) { .wgrid { grid-template-columns: repeat(2, 1fr); } }
.wcard { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: #000; cursor: pointer; padding: 0; border: none; min-height: 48px; }
.wcard img, .wcard video { width: 100%; height: 100%; object-fit: cover; display: block; }
.wcard .wthumbtext { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--coral); color: #fff; font-size: 13px; padding: 8px; text-align: center; }
.wcard .wname { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); color: #fff; font-size: 12px; text-align: left; }
.wcard .wlock { position: absolute; top: 4px; right: 4px; background: rgba(255, 255, 255, .26); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .55); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); font-size: 12px; border-radius: 999px; padding: 2px 6px; }

/* わたしのアルバム：年の切替＋月タブ＋月の大きな1枚＋初回案内 */
#watch-calsel { margin: 4px 0 10px; }
#watch-yearwrap { position: relative; display: inline-block; }
#watch-year { font-size: 17px; cursor: pointer; }
#watch-year-list { position: absolute; top: 100%; left: 0; z-index: 30; background: #fff; border: 1px solid rgba(192, 103, 79, .25); border-radius: 16px; box-shadow: 0 4px 16px #0002; overflow: hidden; }
.wyopt { display: block; min-width: 120px; min-height: 48px; padding: 0 16px; border: none; background: #fff; font-size: 17px; text-align: left; cursor: pointer; }
.wyopt + .wyopt { border-top: 1px solid #eee; }
#watch-months { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
#watch-months::-webkit-scrollbar { display: none; }
.wmtab { flex: 0 0 auto; min-width: 48px; min-height: 48px; padding: 0 12px; border: none; background: none; font-size: 15px; color: #8A7D72; cursor: pointer; border-radius: 999px; }
.wmtab.on { background: rgba(255, 255, 255, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .95); color: var(--coral); font-weight: 700; box-shadow: 0 2px 8px rgba(192, 103, 79, .12); }
.wmtab-all svg { width: 22px; height: 22px; display: block; margin: 0 auto; }
.whero { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border: none; padding: 0; border-radius: 20px; overflow: hidden; background: #000; cursor: pointer; box-shadow: 0 6px 18px rgba(59, 50, 44, .16); }
.whero img, .whero video { width: 100%; height: 100%; object-fit: cover; display: block; }
.whero .wthumbtext { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--coral); color: #fff; font-size: 17px; padding: 16px; text-align: center; }
.whero .vthumbwrap { width: 100%; height: 100%; }
.whero-ovl { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .32)); color: #fff; text-shadow: 0 1px 6px #000a; }
.whero-m { font-size: 40px; font-weight: 700; line-height: 1.3; }
.whero-s { font-size: 14px; margin-top: 4px; padding: 2px 12px; border-radius: 999px; background: rgba(255, 255, 255, .24); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .5); }
.whero + .wgrid { margin-top: 8px; }
#watch-guide { position: fixed; inset: 0; z-index: 60; background: #0009; display: flex; align-items: center; justify-content: center; }
#watch-guide.hidden { display: none; }
.wguide-box { background: #fff; border-radius: 20px; padding: 24px 20px; max-width: 300px; text-align: center; }
.wguide-box p { margin: 0 0 16px; font-size: 17px; line-height: 1.6; }
#watch-guide-ok { min-width: 120px; font-size: 16px; cursor: pointer; }

/* アルバム作成 */
.filepick { display: block; background: rgba(255, 255, 255, .45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1.5px dashed rgba(192, 103, 79, .6); border-radius: 18px; padding: 18px; text-align: center; color: var(--coral); font-size: 15px; margin-bottom: 10px; cursor: pointer; }
.filepick input { display: none; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.edtitle { font-size: 17px; font-weight: 700; margin: 10px 0 6px; }
#edit-thumbs video { width: 120px; border-radius: 8px; }
#video-trim { position: relative; }
#trim-loading { position: absolute; inset: 0 0 auto 0; height: 48px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); color: #fff; font-size: 14px; border-radius: 10px 10px 0 0; }
#trim-video { width: 100%; max-height: 220px; background: #000; border-radius: 10px; display: block; }
#video-trim label { display: block; font-size: 14px; margin-top: 8px; }
#trim-start { width: 100%; min-height: 48px; }
.albumform { background: rgba(255, 255, 255, .4); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .95); border-radius: 20px; padding: 14px; margin-top: 12px; box-shadow: 0 6px 18px rgba(192, 103, 79, .10); }
.albumform label { display: block; font-size: 13px; color: #6E6259; margin-top: 10px; }
.albumform input[type="text"], .albumform input:not([type]), .albumform input[type="date"], .albumform select {
  width: 100%; padding: 10px; border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; margin-top: 4px; min-height: 48px; background: rgba(255, 255, 255, .65); }
.areabox { margin-top: 10px; font-size: 13px; color: #6E6259; }
.arearow { display: flex; gap: 8px; margin-top: 6px; }
.arearow input { flex: 1; min-width: 0; }
.visrow { font-size: 14px !important; color: var(--ink) !important; display: flex !important; align-items: center; gap: 8px; min-height: 48px; }
.visrow input { width: 24px; height: 24px; accent-color: var(--coral); }
#btn-suggest { margin-top: 12px; width: 100%; }
#btn-save-album { width: 100%; margin-top: 14px; font-size: 16px; }
#album-msg { margin-top: 10px; font-size: 14px; color: var(--coral); min-height: 20px; }
#album-msg.err { color: #c00; font-weight: 700; }
#photo-count { font-size: 14px; margin: 0 0 10px; font-weight: 700; }
#photo-count.ok { color: var(--coral); }
#photo-count.ng { color: #c00; }

/* お気に入り：基準駅の入力 */
.laterbase { margin-bottom: 10px; }
.laterbase label { display: block; font-size: 13px; color: #6E6259; }
.laterbase input { width: 100%; padding: 10px; border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; margin-top: 4px; min-height: 48px; background: rgba(255, 255, 255, .65); }
.latersug { background: #fff; border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; margin-top: 8px; overflow: hidden; }
.latersug button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #fff; color: var(--coral); border-radius: 0; border-bottom: 1px solid #eee; }
.latersug .lc { flex: 1; min-width: 0; }
.latersug button:last-child { border-bottom: none; }
.latersug p { margin: 0; padding: 12px; font-size: 13px; color: #8A7D72; }
#later-base-label { margin-top: 10px; }
#btn-later-clear { width: 100%; }
/* お気に入り画面（案C）：先頭カードの写真をぼかして画面全体に敷き、カードは濃いめのすりガラス */
#view-later { position: relative; }
#view-later::before { content: ""; position: fixed; inset: 0; z-index: -2; background: var(--favbg, none) center / cover no-repeat, radial-gradient(260px 220px at 85% 6%, #F6D3C2 0, rgba(246,211,194,0) 70%), var(--cream); filter: blur(28px) saturate(1.1); }
#view-later::after { content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(251, 246, 239, .42); pointer-events: none; }
#later-list { gap: 16px; }
#later-list .card { padding: 10px 10px 14px; border-radius: 24px; background: rgba(255, 255, 255, .34); backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3); border: 1px solid rgba(255, 255, 255, .85); box-shadow: 0 8px 24px rgba(59, 50, 44, .12); }
#later-list .card h3 { margin: 12px 6px 0; font-size: 19px; font-weight: 900; }
#later-list .card .tags { margin: 4px 6px 0; font-size: 14px; font-weight: 700; color: #4E433B; }
#later-list .thumb, #later-list .vthumbwrap { height: 170px; border-radius: 16px; }
#later-list .itinbtn { margin-top: 10px; background: rgba(255, 255, 255, .6); }
#later-list .itinbtn.on { background: #fff; }

/* 一覧・詳細 */
.cards { display: grid; gap: 10px; }
.card { background: #fff; border-radius: 20px; padding: 12px; box-shadow: 0 4px 14px rgba(59, 50, 44, .10); }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card .route { color: var(--coral); font-size: 14px; margin: 0; }
.card .meta { color: #8A7D72; font-size: 12px; }
.card .aimeta { margin-top: 4px; }
.aimeta .ailabel { font-size: 12px; opacity: .75; }
.card .tags { font-size: 12px; color: #4E433B; margin-top: 6px; line-height: 1.5; }
.tags .tagp { display: inline-block; }
.card .point { margin-top: 6px; font-size: 13px; background: #fff8e1; border-radius: 8px; padding: 6px 8px; }
.thumb { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; background: #000; display: block; margin-bottom: 8px; }
.thumbtext { display: flex; align-items: center; justify-content: center; background: var(--coral); color: #fff; font-size: 15px; padding: 10px; text-align: center; }
/* poster無し動画サムネ：読めるまで文字サムネ、読めたら中間コマを重ねる（真っ黒にしない） */
.vthumbwrap { position: relative; display: block; overflow: hidden; }
.vthumbwrap .vthumbtxt { position: absolute; inset: 0; width: 100%; height: 100%; }
.vthumbwrap video[data-vthumb] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.vthumbwrap video[data-vthumb].von { opacity: 1; }
.wcard .vthumbwrap { width: 100%; height: 100%; }
.dmedia { width: 100%; max-height: 60vh; border-radius: 8px; background: #000; margin-bottom: 8px; }
.dphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; margin-bottom: 8px; }
.dphotos img { width: 100%; border-radius: 6px; cursor: pointer; }
/* 写真の拡大表示：その写真だけを黒背景の全画面に（縦横比そのまま・切り抜かない）。
   ×と背景タップで閉じる。スワイプで他の写真へは移らない */
#photo-zoom { position: fixed; inset: 0; z-index: 70; background: #000; display: flex; align-items: center; justify-content: center; touch-action: none; }
#pz-img { max-width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; }
#pz-close { position: absolute; top: calc(env(safe-area-inset-top) + 8px); right: 8px; width: max(48px, calc(48px * var(--ui-scale))); height: max(48px, calc(48px * var(--ui-scale))); min-height: 48px; padding: 0; background: rgba(255, 255, 255, .28); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .5); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
#pz-close svg { width: 24px; height: 24px; }
.reacts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#btn-back { margin: 0 8px 8px 0; }
#btn-new-album-d { margin: 0 0 8px; }
#detail .card { margin-top: 8px; }
.mapbox { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ntag { display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 6px; background: rgba(127,127,127,.3); font-size: 10px; line-height: 1.5; text-decoration: none; vertical-align: middle; }
.authorlink2 { background: none; border: none; color: var(--coral); text-decoration: underline; padding: 14px 4px; min-height: 48px; font-size: 12px; }
.conds { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cond { background: #fff; border: 1px solid rgba(192, 103, 79, .35); color: var(--coral); border-radius: 16px; padding: 8px 12px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; min-height: 48px; }
.cond button { flex: none; }
#cond-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
#cond-form input { flex: 1 1 100%; padding: 10px; border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; background-color: rgba(255, 255, 255, .65); min-height: 48px; }
#cond-form select { padding: 8px; border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; background-color: rgba(255, 255, 255, .65); min-height: 48px; flex: 1; }
.withdraw { font-size: 13px; color: #8A7D72; margin-top: 20px; }
.withdraw a { display: inline-block; white-space: nowrap; padding: 15px 3px; min-height: 48px; }
.detail h3 { font-size: 18px; }
.credit { font-size: 12px; color: #8A7D72; text-align: center; padding: 10px 14px calc(var(--nav-h) + env(safe-area-inset-bottom) + 32px * var(--ui-scale)); line-height: 1.5; }
.credit a { color: var(--coral); display: inline-block; padding: 15px 3px; min-height: 48px; }
/* 探す画面の出典は☰メニュー内に出す（メニュー内は下余白を詰める） */
.menucredit { padding: 10px 2px 4px; text-align: left; }

/* ふぁんれぽ（写真1枚＋16文字以上のコメント）と投稿者のコメント */
#repo-box { margin-top: 12px; }
#repo-box h4 { margin: 0 0 4px; font-size: 17px; }
.repoempty { font-size: 14px; color: #8A7D72; }
.repoitem { display: flex; gap: 10px; background: #fff; border-radius: 16px; padding: 10px; margin-top: 10px; }
.repoitem img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #eee; }
.repobody { min-width: 0; flex: 1; }
.repometa { font-size: 12px; color: #8A7D72; }
.repotext { font-size: 17px; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
#btn-repo-more { width: 100%; margin-top: 10px; background: rgba(255, 255, 255, .65); color: var(--coral); border: 1px solid rgba(192, 103, 79, .45); }
.acbox { margin-top: 8px; background: rgba(192, 103, 79, .08); border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; padding: 10px; }
.aclabel { font-size: 12px; color: var(--coral); font-weight: 700; }
.actext { font-size: 17px; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.acform { margin-top: 8px; background: #fff; border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; padding: 10px; }
.acform label { display: block; font-size: 13px; color: #6E6259; }
.acform textarea { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; background-color: rgba(255, 255, 255, .65); font-size: 16px; line-height: 1.5; }
.acform button { width: 100%; margin-top: 8px; }
#repo-form textarea { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; background-color: rgba(255, 255, 255, .65); font-size: 16px; line-height: 1.5; }
#repo-form label { display: block; font-size: 13px; color: #6E6259; margin-top: 10px; }
#repo-form .filepick { margin-top: 0; }
/* ふぁんれぽの投稿条件：満たした行は✓緑、足りない行は・コーラル（14px以上） */
#repo-thumb { margin-bottom: 0; }
/* ふぁんれぽの写真：フォームの横幅いっぱい・縦横比のまま（切らない）・高さは画面の縦の50%まで。
   指で顔を押せる大きさで見せ、タップ直しの判定は写真の中の画素位置へ引き戻す */
#repo-thumb img { display: block; width: 100%; height: auto; max-height: 50vh; object-fit: contain; border-radius: 8px; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#repo-masked { font-size: 15px; font-weight: 700; color: var(--ink); margin: 10px 0 4px; }
#repo-taphint { font-size: 12px; color: rgba(59, 50, 44, .6); margin: 2px 0 8px; }
#repo-req { margin-top: 6px; }
#repo-req .req { font-size: 14px; line-height: 1.5; }
#repo-req .req.ok { color: #2f7d4f; }
#repo-req .req.ng { color: var(--coral); }
#btn-repo-post { width: 100%; margin-top: 10px; font-size: 16px; }
#repo-msg { margin-top: 10px; font-size: 14px; color: var(--coral); min-height: 20px; }
#btn-repo-cancel { width: 100%; margin-top: 10px; }

/* ゴール起点の旅程 */
.goalbox { margin-bottom: 8px; }
.origtitle { font-size: 17px; font-weight: 700; margin: 10px 0 6px; }
#goal-label { display: flex; align-items: center; gap: 10px; margin-top: 8px; background: rgba(192, 103, 79, .08); border: 1px solid rgba(192, 103, 79, .25); border-radius: 12px; padding: 6px 6px 6px 12px; font-size: 17px; line-height: 1.5; }
#goal-label-text { flex: 1; font-weight: 700; }
#goal-search-box { margin-top: 4px; }
.mpin-goal span { background: #e8590c; }
.ttgoal { background: #fff4e6; }
#goal-between h3 { font-size: 17px; margin: 18px 0 4px; }
.btwcard .btwname { flex: 1 1 140px; font-size: 17px; }
.btwcard .btwdist { flex-basis: 100%; margin-left: 58px; font-size: 14px; color: #6E6259; }
.btwcard .itinbtn { margin-top: 0; width: auto; flex-basis: 100%; }
.farhead { font-size: 17px; font-weight: 700; margin: 4px 0 8px; }
.farpicked { font-size: 17px; line-height: 1.5; margin: 8px 0; }
#far-picked button { width: 100%; margin-top: 8px; }
/* 探すパネルを開いている間は、パネルの後ろに隠れるカードの作者リンクを操作対象から外す（重なって押せないものを残さない） */
body:has(#search-panel:not(.hidden)) .swsub .authorlink { visibility: hidden; }

/* 近くに無い時の「近い順」案内（補足12px・カードの上に重ねる帯） */
#wide-note { position: absolute; left: 0; right: 0; top: 0; z-index: 11; padding: 8px 14px; font-size: 12px; line-height: 1.6; text-align: center; color: #fff; background: #000b; pointer-events: none; }
#wide-note.hidden { display: none; }

.nickbox { padding: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.minebtns { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
#btn-edit-cancel { margin: 0 8px 16px 0; }
.nickbox input { width: 100%; box-sizing: border-box; min-height: 48px; margin: 0; }
.nickrow { display: flex; align-items: center; gap: 8px; }
.nicklbl { flex: none; width: 4.5em; font-size: 13px; opacity: .7; }
#nick-now { font-size: 16px; }
.nickbox button:disabled { opacity: .5; }

/* ===== 旅程 itin-v5（丸ボタンA〜Zでルート切替＋下の立ち寄りシート） ===== */
/* 画面 = 上：地図（初期190px・取っ手を下へ引くと大きくなる dec-20261110-097）
   ＋丸ボタン横スクロール＋右上「自分で組む」、下：立ち寄りシート */
#view-itin { display: flex; flex-direction: column; width: 100%; max-width: 640px; margin: 0 auto; height: calc(100dvh - var(--hdr, 110px)); padding: 0; }
#view-itin .bmapwrap { position: relative; flex: none; height: var(--map-h, 190px); }
#view-itin #itin-map { height: var(--map-h, 190px); border-radius: 0; margin-bottom: 0; }
/* 丸ボタン 48×48・1行横スクロール（選択中コーラル塗り白文字・他は白すりガラス） */
#itin-rbs { position: absolute; left: 0; right: 0; top: 12px; display: flex; gap: 8px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; z-index: 5; }
#itin-rbs::-webkit-scrollbar { display: none; }
#itin-rbs .rb { flex: none; width: 48px; height: 48px; min-height: 48px; min-width: 48px; border-radius: 50%; padding: 0; font-size: 18px; font-weight: 700; line-height: 1.5; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .95); color: var(--ink); box-shadow: 0 4px 14px rgba(192, 103, 79, .14); }
#itin-rbs .rb.on { background: var(--coral); color: #fff; border-color: var(--coral); }
/* 地図右上の「＋自分で組む」 */
.itent { position: absolute; right: 14px; top: 66px; z-index: 5; display: inline-flex; align-items: center; gap: 2px; min-height: 48px; padding: 0 8px 0 6px; font-size: 15px; white-space: nowrap; }
.itent .ric { width: 32px; height: 32px; }
.itent .ric svg { width: 20px; height: 20px; }
#view-itin .bcr { position: absolute; left: 14px; bottom: 30px; z-index: 5; font-size: 12px; color: #8A7D72; line-height: 1.5; padding: 0 6px; border-radius: 6px; background: rgba(251, 246, 239, .85); }
/* 立ち寄りシート：地図の下端に24px重ねて上角丸。中身だけ縦スクロール */
/* iOS：長押しがテキスト選択に取られて pointercancel になるのを防ぐため、
   文字を選べなくするのは立ち寄りカード(.cd)と取っ手(.dots)に絞る。
   input/textarea/select の操作は妨げない（シート全体には掛けない） */
#itin-sheet { position: relative; z-index: 4; flex: 1; min-height: 0; overflow-y: auto; margin-top: -24px; padding: 8px 14px calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); border-radius: 24px 24px 0 0; background: rgba(251, 246, 239, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 -6px 20px rgba(59, 50, 44, .15); }
/* 取っ手：見た目は中央の44x5の細い棒のまま、上下に引けるよう指の当たる範囲を広げる */
#itin-sheet .grab { padding: 10px 0; margin-bottom: 2px; touch-action: none; cursor: grab; }
#itin-sheet .grab::after { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: #CDBFB3; margin: 0 auto; }
#itin-sheet .shd { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
#itin-sheet .shd b { flex: 1; font-size: 18px; line-height: 1.5; min-width: 0; }
#it-depart-row { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #6E6259; margin-top: 0; flex: none; }
#it-depart-row input { margin-left: 0; }
/* 立ち寄りカード：番号・名前・到着時刻・滞在。左の⋮⋮取っ手を掴む＝即入替。
   カード本体は長押しで浮いて上下入替・左スワイプで抜く。本体は縦スクロール可(pan-y) */
.lst { display: flex; flex-direction: column; position: relative; }
.cd { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 4px 6px 4px 0; margin-top: 10px; border-radius: 14px; background: #fff; border: 1px solid rgba(192, 103, 79, .2); box-shadow: 0 3px 8px rgba(59, 50, 44, .14); position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* ⋮⋮取っ手：見た目の点は中央の10x20のまま、指の当たる範囲は48px幅・カードの全高 */
.cd .dots { width: 48px; min-width: 48px; flex: none; align-self: stretch; position: relative; touch-action: none; cursor: grab; }
.cd .dots::before { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 10px; height: 20px; background-image: radial-gradient(circle, #BCAEA2 1.5px, transparent 1.9px); background-size: 5px 5px; }
/* 入替中・差し込み中の浮いたカードはスクロールに取られないよう全面を掴める */
.cd.lift { touch-action: none; }
/* 滞在時間のセレクトは文字選択・ピッカーを妨げない（シートの選択抑止から外す） */
.cd select { user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }
.cd .no { width: 28px; height: 28px; border-radius: 50%; background: var(--coral); color: #fff; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; line-height: 1.5; }
.cd .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.cd .tx b { font-size: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd .tx small { font-size: 12px; color: #8A7D72; }
.cd select { min-height: 48px; padding: 6px 30px 6px 10px; font-size: 15px; border-radius: 12px; background-color: rgba(255, 255, 255, .65); border: 1px solid rgba(192, 103, 79, .25); -webkit-appearance: none; appearance: none; background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0674F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.cd.new { border: 2px solid var(--coral); }
.cd.lift { transform: rotate(-2.5deg) scale(1.04); box-shadow: 0 18px 32px rgba(59, 50, 44, .32); border: 2px solid var(--coral); z-index: 6; margin-top: 0; }
/* 動かし中の落とし先（間が空く） */
.gap { min-height: 60px; margin-top: 10px; border: 2px dashed rgba(192, 103, 79, .6); border-radius: 14px; background: rgba(192, 103, 79, .07); }
/* 左スワイプで「抜く」が出る下地 */
.swl { position: relative; min-height: 60px; margin-top: 10px; border-radius: 14px; background: #D9534F; display: flex; justify-content: flex-end; align-items: center; overflow: hidden; }
.swl .lab { color: #fff; font-size: 15px; font-weight: 700; width: 75px; text-align: center; flex: none; }
.swl .cd { width: 100%; margin-top: 0; }
/* カードとカードの間の移動の目安＋「乗換」 */
.bleg { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-left: 24px; font-size: 12px; color: #8A7D72; min-height: 48px; line-height: 1.5; }
.bleg .m { flex: 1; }
.gm { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px 0 10px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink); }
.gm .ric { width: 24px; height: 24px; }
.gm .ric svg { width: 20px; height: 20px; }
/* 自分で組む（itin-v3 A3/A4） */
#ib-ui #ib-ask { background: rgba(255, 255, 255, .5); border: 1px solid rgba(255, 255, 255, .95); border-radius: 18px; padding: 12px; margin-top: 10px; }
#ib-how { margin-left: 20px; }
#ib-search-box { margin-top: 10px; }
#ib-fav-box { margin-top: 10px; max-height: 240px; overflow-y: auto; }
.ibfav { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 10px; margin-top: 6px; border-radius: 14px; background: #fff; border: 1px solid rgba(192, 103, 79, .2); text-align: left; font-size: 15px; font-weight: 700; color: var(--ink); }
.ibadd { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin-top: 10px; border-radius: 16px; border: 2px dashed rgba(192, 103, 79, .5); background: transparent; color: var(--coral); font-size: 16px; font-weight: 700; }

/* ---- 詳細シート：開いた瞬間から枠いっぱいで下から出る白いシート（casual-v2） ---- */
#detail-sheet { position: fixed; top: calc(58px * var(--ui-scale) + env(safe-area-inset-top)); left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 40; }
#detail-sheet .dsheet { position: absolute; left: 8px; right: 8px; bottom: 8px; height: calc(100% - 8px); display: flex; flex-direction: column; background: #fff; border-radius: 24px; box-shadow: 0 -6px 24px rgba(59, 50, 44, .28); overflow: hidden; transform: translateY(16px); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
#detail-sheet.open .dsheet { transform: none; opacity: 1; }
#detail-sheet .grab { padding: 10px 0; margin-bottom: 2px; touch-action: none; cursor: grab; flex: none; }
#detail-sheet .grab::after { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: #CDBFB3; margin: 0 auto; }
#detail-sheet .dsheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 14px 16px; }
#detail-sheet .dtitle { font-size: 20px; font-weight: 700; color: var(--ink); margin: 2px 0 10px; line-height: 1.5; }
#detail-sheet .ditin-row { display: flex; gap: 8px; margin-bottom: 10px; }
#detail-sheet .ditin-row .rbtn { flex: 1; min-width: 0; justify-content: center; }
#detail-sheet .itin-main { font-size: 16px; font-weight: 700; background: var(--coral); color: #fff; border: 2px solid var(--coral); }
#detail-sheet .itin-main .ric { background: rgba(255, 255, 255, .25); }
#detail-sheet .itin-main.on { background: #fff; color: var(--coral); }
#detail-sheet .itin-main.on .ric { background: var(--coral); }
#detail-sheet .itin-main.done { background: var(--coral); color: #fff; border-color: var(--coral); }
#detail-sheet .itin-main.done .ric { background: rgba(255, 255, 255, .25); }
#detail-sheet .derr { color: #C62828; font-size: 14px; line-height: 1.5; margin-bottom: 10px; }
#ditin-banner { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 56px; padding: 8px 16px; margin-bottom: 10px; border-radius: 16px; border: 2px solid rgba(192, 103, 79, .5); background: rgba(192, 103, 79, .06); color: var(--ink); font-size: 15px; }
#ditin-banner .dgo { color: var(--coral); font-weight: 700; white-space: nowrap; }
#detail-sheet #btn-back, #detail-sheet #btn-new-album-d { margin-top: 8px; margin-bottom: 8px; }

/* ---- 投稿前の確認画面（#post-confirm） ----
   写真を画面いっぱいに見せ、左下に場所名だけ。下の白いシートに混み具合と投稿ボタン。
   「かくした後の写真」への差し替えは state.photos の中身を変えるだけで映る物＝送る物になる */
#post-confirm { position: fixed; inset: 0; z-index: 50; background: #000; }
#pc-photos { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
#pc-photos::-webkit-scrollbar { display: none; }
.pcslide { flex: none; width: 100%; height: 100%; scroll-snap-align: start; }
.pcslide img { width: 100%; height: 100%; object-fit: cover; display: block; }
#pc-back { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; z-index: 8; }
#pc-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; flex-direction: column; }
#pc-ovl { padding: 24px 14px 10px; background: linear-gradient(transparent, #0009); pointer-events: none; display: flex; flex-direction: column; gap: 6px; }
#pc-dots { display: flex; justify-content: center; gap: 6px; }
.pcdot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.pcdot.on { background: #fff; }
#pc-place { pointer-events: none; }
#pc-sheet { background: #fff; border-radius: 24px 24px 0 0; padding: 14px 14px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0, 0, 0, .28); }
#pc-sheet .pcshead { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
#pc-taphint { font-size: 12px; color: rgba(59, 50, 44, .6); margin: -6px 0 10px; }
#pc-crowd { margin-bottom: 12px; }
#pc-crowd .kindtab { flex: 1; }
#pc-submit { width: 100%; justify-content: center; background: var(--coral); color: #fff; border: none; padding: 14px 16px; font-size: 16px; border-radius: 999px; }
#pc-submit:disabled { color: rgba(255, 255, 255, .75); }
#pc-msg { margin-top: 8px; font-size: 14px; color: var(--coral); min-height: 18px; text-align: center; }
#pc-msg.err { color: #c00; font-weight: 700; }

/* 海外向けページ掲載のお知らせ（1回だけ・dec-20261115-038） */
#ovs-notice { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); z-index: 70; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 6px 24px rgba(59, 50, 44, .22); padding: 14px 16px; font-size: 14px; line-height: 1.6; max-width: 560px; margin: 0 auto; }
#ovs-notice p { margin: 0 0 10px; }
#ovs-notice .ovsrow { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
#ovs-notice .ovsrow a { margin-right: auto; color: var(--coral); font-size: 13px; }
#ovs-notice button { min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; border: 1px solid #ddd; background: #fff; color: var(--ink); }
#ovs-notice #ovs-ok { background: var(--coral); color: #fff; border-color: var(--coral); }
/* マイページの海外向けページ掲載欄（dec-20261116-006） */
#my-ovs { margin-top: 20px; padding: 14px 16px; background: #fff; border-radius: 16px; box-shadow: 0 2px 10px rgba(59, 50, 44, .08); font-size: 14px; line-height: 1.6; }
#my-ovs h3 { margin: 0 0 6px; font-size: 15px; }
#my-ovs p { margin: 0 0 10px; }
#my-ovs .ovsrow { display: flex; align-items: center; gap: 10px; }
#my-ovs .ovsrow a { margin-right: auto; color: var(--coral); font-size: 13px; padding: 12px 0; }
#my-ovs button { min-height: 48px; padding: 0 18px; border-radius: 999px; font-weight: 700; background: var(--coral); color: #fff; border: 1px solid var(--coral); }
#my-ovs button:disabled { opacity: .6; }
