/* 会員マイページ。ChatGPT のカンプ（design/comp-mypage-chatgpt.png）に準拠。トークンは form.css を共有 */
:root { --price: #E8473F; }
.mp { padding: 16px 16px 110px; }
.loading, .center-msg { text-align: center; padding: 60px 8px; color: var(--text-sub); }
.center-msg .big { font-size: 20px; }
.center-msg p { font-size: 14px; }
.pulse { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); margin-right: 8px; animation: blink 1.2s infinite; }

.me { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--primary-light); display: grid; place-items: center; flex: none; }
.avatar img { width: 40px; }
.me-name { font-size: 20px; margin: 0; line-height: 1.4; }
.me-name small { font-size: 14px; }
.me-no { display: inline-block; margin: 4px 0 2px; background: var(--bg-soft); border-radius: 8px; padding: 2px 10px; font-size: 13px; }
.me-no b { letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.me-up { margin: 0; font-size: 12px; color: var(--text-sub); }

.st-card { background: var(--primary-light); border-radius: 14px; padding: 14px 16px; margin-bottom: 24px; }
.st-ttl { color: var(--primary-dark); font-size: 15px; display: flex; align-items: center; }
.st-card p { font-size: 13px; color: var(--text-sub); margin: 4px 0 0; }

.sec-ttl { display: flex; align-items: center; justify-content: space-between; font-size: 18px; margin: 0 0 12px; padding-left: 10px; border-left: 4px solid var(--primary); }
.cnt { color: var(--primary); font-size: 14px; }
.cnt b { font-size: 20px; }
.sorts { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.sorts button { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: 13px; }
.sorts button[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

/* 物件カード（写真左・情報右） */
.pcard { display: grid; grid-template-columns: 42% 1fr; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 14px; background: #fff; cursor: pointer; box-shadow: var(--shadow-card); }
.pcard.is-closed { opacity: .55; }
.pthumb { position: relative; background: var(--bg-soft); min-height: 150px; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.ph-none { display: grid; place-items: center; height: 100%; min-height: 150px; color: var(--text-sub); font-size: 12px; }
.ph-count { position: absolute; right: 8px; bottom: 8px; background: rgba(23,37,43,.65); color: #fff; font-size: 11px; border-radius: 999px; padding: 2px 8px; z-index: 2; }
.badge { position: absolute; left: 8px; top: 8px; z-index: 2; color: #fff; font-size: 11px; font-weight: 900; border-radius: 6px; padding: 2px 8px; }
.b-new { background: var(--price); }
.b-down { background: #2F7DE1; }
.b-chg { background: #8A6BD1; }
.b-applied, .b-closed { background: #6B7780; }
.pbody { padding: 10px 12px; min-width: 0; }
.pname { font-size: 14px; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rent { margin: 0; color: var(--price); font-weight: 700; font-size: 14px; }
.rent b { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rent span { color: var(--text-sub); font-size: 11px; font-weight: 500; margin-left: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 4px; }
.tags span { font-size: 11px; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.meta { font-size: 11px; color: var(--text-sub); margin: 0; }
.init { margin: 8px 0 0; background: var(--primary-light); color: var(--primary-dark); font-size: 11px; border-radius: 8px; padding: 4px 8px; }
.init b { font-size: 13px; }

.empty { text-align: center; }
.empty img { width: 100%; max-width: 300px; height: auto; }
.empty-ttl { color: var(--primary-dark); font-size: 20px; font-weight: 700; margin: 4px 0; }
.empty > p { font-size: 13px; color: var(--text-sub); }
.empty .info { text-align: left; }

.cond { margin-top: 28px; }
.cond-hd { display: flex; justify-content: space-between; align-items: center; }
.cond-hd .sec-ttl { margin: 0; }
.dl { margin: 10px 0 0; display: grid; grid-template-columns: 7.5em 1fr; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: 13px; }
.dl dt, .dl dd { margin: 0; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.dl dt { background: var(--bg-soft); color: var(--text-sub); }
.dl dd { word-break: break-all; }
.dl dt:nth-last-child(2), .dl dd:last-child { border-bottom: 0; }

.mp-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; background: #fff; box-shadow: var(--shadow-footer); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 40% 1fr; gap: 10px; max-width: 480px; margin: 0 auto; }
.mp-foot .btn-back { border-color: var(--primary); color: var(--primary-dark); font-size: 14px; }
.btn-line.sm { min-height: 54px; margin: 0; font-size: 15px; padding: 0 12px; }

.back-link { background: none; border: 0; color: var(--primary-dark); font-weight: 700; padding: 8px 0; min-height: 44px; }

/* 詳細 */
.ph.big { position: relative; margin: 0 -16px; }
.ph-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ph-track::-webkit-scrollbar { display: none; }
.ph-track > * { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--bg-soft); }
.fav { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #C8D1CD; font-size: 20px; box-shadow: var(--shadow-card); z-index: 2; }
.fav.on { color: var(--price); }
.thumbs { display: flex; gap: 6px; overflow-x: auto; margin: 8px -16px 0; padding: 0 16px; }
.thumbs button { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.dbody { padding-top: 12px; }
.dname { font-size: 18px; margin: 0 0 4px; }
.money { font-size: 13px; color: var(--text-sub); margin: 4px 0; }
.comment { background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.sec { font-size: 15px; margin: 20px 0 0; padding-left: 8px; border-left: 3px solid var(--primary); }
.map { width: 100%; height: 200px; border: 0; border-radius: 12px; margin-top: 10px; }
.dfoot { position: sticky; bottom: 0; background: #fff; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
.dfoot .btn-line { margin: 0; }

/* 初期費用の内訳 */
.init-box { margin: 10px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--primary-light); }
.init-box summary { list-style: none; display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; cursor: pointer; color: var(--primary-dark); font-size: 13px; font-weight: 700; }
.init-box summary::-webkit-details-marker { display: none; }
.init-box summary b { font-size: 20px; color: var(--primary-dark); }
.init-box summary i { margin-left: auto; font-style: normal; font-size: 12px; }
.init-box summary i::after { content: "内訳を見る ▾"; }
.init-box[open] summary i::after { content: "閉じる ▴"; }
.init-tbl { width: calc(100% - 24px); margin: 0 12px; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; font-size: 13px; }
.init-tbl th, .init-tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; font-weight: 500; }
.init-tbl td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.init-tbl small { display: block; font-size: 11px; color: var(--text-sub); }
.init-tbl .sum th, .init-tbl .sum td { font-weight: 700; color: var(--primary-dark); border-bottom: 0; }
.init-box .note { margin: 8px 12px 12px; }

/* 条件変更後の検索中画面 */
[data-view=searching] .btn-next.wide, [data-view=searching] .btn-outline.wide { display: block; width: 100%; margin: 16px 0 0; }
[data-view=searching] .btn-outline.wide { background: #fff; height: 50px; }
[data-view=searching] .btn-next.wide::after { content: " →"; }
[data-view=searching] .info { margin-top: 18px; }

/* 一覧の見出し・リスト/地図の切り替え */
.list-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.list-hd .sec-ttl { margin: 0; flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; background: #fff; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 700; color: var(--text-sub); }
.seg button[aria-pressed=true] { background: var(--primary); color: #fff; }

/* すべて／お気に入り */
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tabs2 button { min-height: 42px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 700; color: var(--text-sub); }
.tabs2 button[aria-selected=true] { background: var(--primary); border-color: var(--primary); color: #fff; }
.tab-hint { background: var(--primary-light); color: var(--primary-dark); font-size: 12px; font-weight: 700; border-radius: 8px; padding: 6px 12px; margin: 0 0 10px; }

/* カードのお気に入り・比較チェック */
.pcard { position: relative; }
.pbody { position: relative; }
.fav.mini { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; font-size: 16px; box-shadow: none; background: none; }
.pname { padding-right: 30px; }
.pick { position: absolute; left: 8px; top: 8px; z-index: 3; }
.pick input { position: absolute; opacity: 0; }
.pick span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; border: 2px solid #fff; background: rgba(23,37,43,.35); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.pick input:checked + span { background: var(--primary); border-color: var(--primary); }
.pick input:checked + span::after { content: "✓"; color: #fff; font-weight: 900; }
.cmp-bar { position: fixed; left: 0; right: 0; bottom: 78px; z-index: 96; max-width: 480px; margin: 0 auto; padding: 10px 16px; background: rgba(255,255,255,.97); box-shadow: var(--shadow-footer); text-align: center; }
.cmp-bar p { margin: 0 0 6px; font-size: 13px; color: var(--primary-dark); font-weight: 700; }
.cmp-bar .btn-next { width: 100%; }
.cmp-bar .btn-next::after { content: ""; }

/* 比較表 */
.cmp-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.cmp-tbl { border-collapse: collapse; min-width: 100%; font-size: 12px; }
.cmp-tbl th, .cmp-tbl td { border-bottom: 1px solid var(--border); padding: 8px; vertical-align: top; text-align: left; }
.cmp-tbl th { position: sticky; left: 0; background: var(--bg-soft); color: var(--text-sub); font-weight: 700; white-space: nowrap; z-index: 1; }
.cmp-tbl td { min-width: 112px; }
.cmp-head td img, .cmp-head .ph-none { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; min-height: 0; display: block; }
.cmp-head td b { display: block; font-size: 12px; margin-top: 4px; }
.cmp-head .rent b { font-size: 20px; display: inline; }
.cmp-head small { color: var(--text-sub); }
.ftag { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; margin: 0 4px 4px 0; font-size: 11px; }

/* 地図 */
#map { height: 420px; border-radius: 14px; overflow: hidden; background: var(--bg-soft); }
#mapCard { margin-top: 12px; }
.pin span { display: inline-block; transform: translate(-50%, -100%); background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; padding: 4px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.25); white-space: nowrap; position: relative; }
.pin span::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--primary); border-bottom: 0; }

/* 内見予約 */
.mini-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin: 8px 0 18px; }
.mini-card img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; }
.mini-card b { font-size: 14px; }
.mini-card .rent b { font-size: 20px; }
.mini-card small { color: var(--text-sub); font-size: 12px; }
.slot input[type=date] { width: 100%; height: 48px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; margin-bottom: 8px; background: #fff; }
.vtime button { padding: 0 6px; font-size: 12px; }
.btn-next.wide, .btn-outline.wide { display: block; width: 100%; margin: 16px 0 0; }
.two-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.two-btns .btn-outline { margin: 0; height: 54px; line-height: 52px; background: #fff; }
.two-btns .btn-next, .two-btns .btn-line.sm { margin: 0; height: 54px; min-height: 54px; }
.dfoot.two-btns { margin-top: 0; }
[data-view=visitDone] .big { margin-top: 0; }

/* 写真の全画面表示 */
.viewer { position: fixed; inset: 0; z-index: 200; background: #000; }
.viewer-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; overflow: auto; touch-action: pan-x pan-y pinch-zoom; }
.viewer-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-close { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 26px; }
.viewer-count { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; background: rgba(0,0,0,.45); padding: 3px 12px; border-radius: 999px; }
.ph-track img { cursor: zoom-in; }

/* 通知設定 */
.settings { margin-top: 28px; }
.opt-cards { display: grid; gap: 10px; margin: 10px 0; }
.opt-card { display: flex; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; font-size: 12px; color: var(--text-sub); }
.opt-card input { accent-color: var(--primary); width: 20px; height: 20px; flex: none; margin-top: 2px; }
.opt-card b { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.opt-card:has(input:checked) { background: var(--primary-light); border: 2px solid var(--primary); padding: 13px; }
.saved-msg { text-align: center; color: var(--primary-dark); font-weight: 700; font-size: 13px; }
/* 調整：比較チェックとバッジが重ならない／地図が固定フッターの上に出ない／時間帯を1行に */
.pcard .pick ~ .pthumb .badge { left: 40px; }
#map { position: relative; z-index: 0; isolation: isolate; }
.vtime button { white-space: nowrap; font-size: 11px; padding: 0 4px; }
/* 詳細の写真：縦長の間取り図なども切らずに枠に収める（余白は薄い背景） */
.ph.big .ph-track > img { object-fit: contain; background: var(--bg-soft); }

/* 通勤時間 */
.commute { margin: 4px 0 0; font-size: 11px; font-weight: 700; color: var(--primary-dark); }
.commute.big { font-size: 13px; background: var(--primary-light); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.commute small { display: block; font-weight: 500; color: var(--text-sub); font-size: 11px; }

/* 内見予約の3ステップ（design/comp-visit-chatgpt.png） */
.vsteps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; margin: 4px 0 14px; counter-reset: vs; }
.vsteps li { text-align: center; font-size: 12px; color: var(--text-sub); position: relative; counter-increment: vs; }
.vsteps li::before { content: counter(vs); display: grid; place-items: center; width: 26px; height: 26px; margin: 0 auto 4px; border-radius: 50%; background: #EDF1F2; font-weight: 700; }
.vsteps li.now { color: var(--primary-dark); font-weight: 700; } .vsteps li.now::before { background: var(--primary); color: #fff; }
.vsteps li.done::before { content: "✓"; background: var(--primary-light); color: var(--primary-dark); }
.sub-ttl { font-size: 15px; margin: 18px 0 8px; padding-left: 8px; border-left: 3px solid var(--primary); }
.pill { display: inline-block; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px; margin: 0 0 6px; }
.vcard { display: grid; grid-template-columns: 28px 92px 1fr; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 8px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.vcard.on { border: 2px solid var(--primary); padding: 7px; background: var(--primary-light); }
.vcard input { position: absolute; opacity: 0; }
.vcard .vbox { width: 24px; height: 24px; border-radius: 6px; border: 2px solid #B8C4C0; background: #fff; display: grid; place-items: center; }
.vcard input:checked + .vbox { background: var(--primary); border-color: var(--primary); }
.vcard input:checked + .vbox::after { content: "✓"; color: #fff; font-weight: 900; }
.vcard img, .vcard .ph-none { width: 92px; height: 70px; object-fit: cover; border-radius: 8px; min-height: 0; }
.vcard b { font-size: 13px; } .vcard .rent b { font-size: 20px; } .vcard small { font-size: 11px; color: var(--text-sub); }
.tip { background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--text-sub); }
#vToDate:disabled { opacity: .5; }
.vslots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.vslot { position: relative; border: 1px dashed #B8C4C0; border-radius: 10px; padding: 8px 6px; text-align: center; min-height: 70px; display: flex; flex-direction: column; justify-content: center; }
.vslot.filled { border: 1px solid var(--primary); background: var(--primary-light); }
.vslot small { font-size: 11px; color: var(--primary-dark); font-weight: 700; }
.vslot b { font-size: 14px; } .vslot span { font-size: 11px; } .vslot .empty { color: #A2AEB3; }
.vslot button { position: absolute; top: 2px; right: 4px; border: 0; background: none; color: var(--text-sub); font-size: 16px; }
.cal { border: 1px solid var(--border); border-radius: 14px; padding: 10px; }
.cal-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cal-hd button { border: 0; background: none; font-size: 22px; width: 40px; height: 36px; color: var(--text); }
.cal-hd button:disabled { opacity: .25; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid > b { font-size: 12px; color: var(--text-sub); padding: 2px 0; }
.cal-grid .w0 { color: #E8473F; } .cal-grid .w6 { color: #2F7DE1; }
.cal-grid .d { aspect-ratio: 1; border: 0; border-radius: 50%; background: #fff; font-size: 14px; font-weight: 700; }
.cal-grid .d.out { opacity: .35; }
.cal-grid .d:disabled { color: #C8D1CD; background: none; }
.cal-grid .d.picked { background: var(--primary-light); color: var(--primary-dark); }
.cal-grid .d.sel { background: var(--primary); color: #fff; }
.chips.eq2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.chips.eq2 button { justify-content: center; }
.chips.eq2 button[aria-checked=true] { background: var(--primary); color: #fff; }
.chips.eq2 button[aria-checked=true]::before { content: none; }
.chips.eq2 button:disabled { opacity: .4; }
.vlist .vrow { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.vlist img { width: 80px; height: 60px; object-fit: cover; border-radius: 8px; }
.vlist b { font-size: 13px; } .vlist .rent b { font-size: 18px; } .vlist .rent span { font-size: 11px; }
.vslots.readonly .vslot { min-height: 60px; }

/* 申込状況 */
.app { margin: 6px 0 0; font-size: 11px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.app span { display: inline-flex; align-items: center; gap: 5px; }
.app span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.app small { font-weight: 400; font-size: 10px; color: var(--text-sub); }
.app-yes { color: #C2410C; }
.app-no { color: var(--primary-dark); }
.app-chk { color: var(--text-sub); }
.app.big { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); font-size: 14px; }
.app.big small { font-size: 11px; }
.app.big em { flex-basis: 100%; font-style: normal; font-weight: 400; font-size: 12px; color: var(--text-sub); }

/* 家族・パートナーと共有 */
.share-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: -12px 0 24px; min-height: 44px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--primary-dark); font-size: 14px; font-weight: 700; }
.share-btn:disabled { opacity: .6; }
.friend-add { background: #FFF8E6; border: 1px solid #F1DC9E; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 13px; }
.friend-add p { margin: 0; }
.friend-add .btn-line { min-height: 46px; margin: 10px 0 0; font-size: 14px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: 96px; z-index: 50; background: rgba(28,36,40,.92); color: #fff; font-size: 13px; line-height: 1.5; border-radius: 12px; padding: 12px 14px; text-align: center; }
