/* カチトリ住まい 試作版 — 骨格の実装（見た目の作り込みは工程08） */
:root {
  /* Googleマップ寄りの配色：白地・グレーの線・青のボタン・赤の選択ピン */
  --ink: #202124; --ink-2: #3c4043; --ink-3: #5f6368; --line: #dadce0; --bg: #fff; --bg-2: #f1f3f4;
  --accent: #1a73e8; --accent-ink: #fff; --danger: #d93025; --accent-soft: #e8f0fe; --accent-soft-ink: #1967d2;
  --r: 8px; --shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 2px 6px 2px rgba(60, 64, 67, .15);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --drawer-peek: 66px;
  --bbar: calc(58px + var(--safe-b));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; width: 100%; overflow-x: hidden; }
body { font-family: Roboto, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { position: fixed; inset: 0; overflow: hidden; }
#map { position: absolute; inset: 0; background: #eef1f5; }
.leaflet-control-container .leaflet-top, .leaflet-control-container .leaflet-bottom { z-index: 500; }
.leaflet-control-container .leaflet-top.leaflet-right { top: 70px; }
@media (max-width: 899px) { .leaflet-control-zoom { display: none; } }
.leaflet-control-attribution { font-size: 10px; }

/* ---- 上のバー ---- */
.topbar { position: absolute; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top, 0px)); display: flex; gap: 8px; z-index: 600; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; height: 44px; background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 0 12px 0 14px; gap: 8px; }
.search svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { border: 0; background: var(--bg-2); color: var(--ink-2); width: 24px; height: 24px; border-radius: 50%; line-height: 1; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; flex: none; }
.round-btn svg { width: 22px; height: 22px; }

/* ---- チップ ---- */
.chips { position: absolute; left: 0; right: 0; top: calc(62px + env(safe-area-inset-top, 0px)); z-index: 600; display: flex; gap: 6px; padding: 0 12px 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); background: #fff; box-shadow: 0 1px 2px rgba(60, 64, 67, .2); font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.chip .caret { font-size: 10px; color: var(--ink-3); }
.chip .v { font-weight: 500; color: var(--accent-soft-ink); }
.chip .v:empty { display: none; }
.chip.on, .chip.set { background: var(--accent-soft); border-color: #c6dafc; color: var(--accent-soft-ink); font-weight: 600; }
.chip.on .caret, .chip.set .caret { color: var(--accent-soft-ink); }
.chip.reset { background: #fff; border-color: var(--line); color: var(--ink-2); }
/* 「募集中」はスイッチの形 */
.sw-chip { gap: 6px; }
.sw-chip .sw { width: 28px; height: 16px; border-radius: 8px; background: #bdc1c6; position: relative; display: inline-block; transition: background .15s; }
.sw-chip .sw i { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .15s; }
.sw-chip.on .sw { background: var(--accent); }
.sw-chip.on .sw i { left: 14px; }
.sw-chip.on { background: #fff; border-color: var(--line); color: var(--ink); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--op, var(--accent)); margin-right: 3px; vertical-align: 0; }
.chip .v .dot { margin-right: 2px; }
.chip .v .dot + .dot { margin-left: -2px; }
.opt .dot { margin-right: 6px; }

/* ---- 現在地 ---- */
.fab { position: absolute; right: 12px; bottom: calc(var(--drawer-peek) + 14px + var(--bbar)); width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); z-index: 590; display: flex; align-items: center; justify-content: center; transition: bottom .25s; }
.fab svg { width: 22px; height: 22px; color: var(--accent); }
.fab.busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26, 115, 232, .25); }

/* ---- 引き出し（一覧） ---- */
.drawer { position: absolute; left: 0; right: 0; bottom: var(--bbar); height: var(--drawer-peek); background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(20, 30, 50, .14); z-index: 610; display: flex; flex-direction: column; transition: height .28s cubic-bezier(.2, .8, .2, 1); }
.drawer.open { height: calc(100% - var(--bbar) - 70px - env(safe-area-inset-top, 0px)); }
.drawer.hidden-by-detail { transform: translateY(110%); }
.handle { height: 22px; display: flex; align-items: center; justify-content: center; flex: none; cursor: grab; touch-action: none; }
.handle span { width: 40px; height: 5px; border-radius: 3px; background: #cfd5df; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 0 16px 8px; flex: none; }
.count { margin: 0; font-weight: 700; font-size: 15px; }
.count small { font-weight: 500; color: var(--ink-3); margin-left: 6px; }
.sort select { border: 0; background: var(--bg-2); border-radius: 10px; padding: 6px 10px; font-size: 13px; color: var(--ink-2); }
.list { list-style: none; margin: 0; padding: 0 16px; overflow-y: auto; flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.drawer:not(.open) .list { overflow: hidden; }
.drawer:not(.open) .more, .drawer:not(.open) .empty { display: none; }
.item { border-top: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; cursor: pointer; }
.item.active { background: var(--accent-soft); margin: 0 -16px; padding: 10px 16px; }
.item b { font-size: 15px; }
.item .rent { font-weight: 700; text-align: right; white-space: nowrap; }
.item .rent .info { font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--bg-2); padding: 2px 7px; border-radius: 6px; }
.item .sub { grid-column: 1 / -1; color: var(--ink-2); font-size: 12.5px; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; margin-right: 5px; color: #fff; background: var(--op, var(--accent)); vertical-align: 1px; }
.tag.cat { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.more { margin: 6px 16px 10px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px; }
.empty { margin: 16px; color: var(--ink-2); }

/* ---- 絞り込みのシート ---- */
.scrim { position: absolute; inset: 0; background: rgba(10, 16, 28, .35); z-index: 700; }
.popover { position: absolute; left: 0; right: 0; bottom: var(--bbar); background: #fff; border-radius: 18px 18px 0 0; z-index: 710; max-height: calc(100% - var(--bbar) - 60px); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.pop-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; }
.pop-head h2 { margin: 0; font-size: 17px; }
.close { border: 0; background: var(--bg-2); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--ink-2); }
.pop-body { position: relative; padding: 0 16px 12px; overflow-y: auto; flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pop-foot { display: flex; gap: 10px; padding: 10px 16px 12px; border-top: 1px solid var(--line); }
.pop-foot .btn { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; padding: 12px 18px; border-radius: 24px; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--accent-soft-ink); border: 1px solid var(--line); }
.btn.small { padding: 9px 14px; font-size: 14px; }
.btn.line { background: #06c755; width: 100%; margin: 14px 0 10px; }
.opt-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 7px 12px; font-size: 14px; color: var(--ink-2); }
.opt[aria-pressed="true"] { background: var(--accent-soft); border-color: #c6dafc; color: var(--accent-soft-ink); font-weight: 600; }
.opt-group { margin: 6px 0 12px; }
.opt-group h4 { margin: 8px 0 6px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.rent-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.rent-row select { flex: 1; padding: 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.hint { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; }
/* 地域：都県 → 市区町村のチェック */
.area-tree { margin: 4px 0 0; }
.pref-row { border-top: 1px solid var(--line); }
.pref-row:first-child { border-top: 0; }
.ck { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 6px 0; cursor: pointer; }
.ck input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.ck small { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.ck.pref { font-weight: 700; font-size: 15px; padding: 11px 0; }
.city-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; padding: 0 0 8px 28px; }
.city-grid .ck { padding: 5px 0; font-size: 13.5px; }
.city-grid .ck small { font-size: 11px; }
/* LINE 導線 */
.line-strip { display: flex; align-items: center; gap: 6px; margin: 0 16px 6px; padding: 7px 12px; border-radius: 10px; background: #e9f9ef; color: #1b5e34; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.line-strip b { color: #06c755; }
.line-strip span { margin-left: auto; font-size: 16px; }
.drawer:not(.open) .line-strip { display: none; }
.line-cta { margin: 14px 0 0; background: #e9f9ef; border: 1.5px solid #9edbb5; border-radius: 12px; padding: 10px 12px; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.line-cta.slim { margin: 10px 0 0; padding: 8px 10px; font-size: 12.5px; }
.line-cta b { color: #06c755; }
.line-cta span { flex: 1; }
.line-btn { background: #06c755; color: #fff; font-weight: 700; padding: 8px 12px; border-radius: 9px; font-size: 13px; white-space: nowrap; text-decoration: none; }

/* ---- 物件の詳細 ---- */
.detail { position: absolute; left: 0; right: 0; bottom: var(--bbar); top: 45%; background: #fff; border-radius: 18px 18px 0 0; z-index: 650; display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: hidden; transition: top .22s; }
.detail .close { position: absolute; top: 12px; right: 14px; }
.detail-body { padding: 0 16px 12px; overflow-y: auto; flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.detail.full { top: calc(8px + env(safe-area-inset-top, 0px)); }
.detail .handle { cursor: pointer; }
.detail-foot { padding: 10px 16px 10px; border-top: 1px solid var(--line); flex: none; }
.detail-foot .btn { width: 100%; }
.btn-row { display: flex; gap: 8px; }
.btn-row .gmap { flex: 0 0 auto; width: auto; padding: 13px 12px; font-size: 14px; }
.btn-row .official { flex: 1; font-size: 14.5px; white-space: nowrap; }
.detail-foot .links { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; }
.detail-foot .links a { color: var(--ink-2); }
.detail h2 { margin: 2px 40px 2px 0; font-size: 20px; }
.detail .addr { margin: 0 0 8px; color: var(--ink-2); font-size: 13px; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.kv { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
.kv .k { font-size: 11px; color: var(--ink-3); }
.kv .v { font-size: 16px; font-weight: 700; white-space: nowrap; }
.kv .v.wrap { white-space: normal; overflow-wrap: anywhere; font-size: 15px; }
.kv .v small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.detail table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 4px; }
.detail td { padding: 7px 2px; border-top: 1px solid var(--line); vertical-align: top; }
.detail td:first-child { color: var(--ink-3); width: 34%; }
.cards-h { font-size: 13px; color: var(--ink-3); margin: 14px 0 6px; }
.cards { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.cards::-webkit-scrollbar { display: none; }
.card { flex: none; width: 168px; border: 1px solid var(--line); border-radius: 14px; padding: 0 0 10px; text-decoration: none; color: inherit; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(20, 30, 50, .08); transition: transform .12s; }
.card:active { transform: scale(.97); }
.card-img { display: block; height: 92px; background: var(--card-bg, #eef3fb); margin-bottom: 8px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card b { display: block; font-size: 14px; padding: 0 10px; }
.card .card-sub { display: block; font-size: 12px; color: var(--ink-2); padding: 0 10px; min-height: 2.9em; }
.card .card-go { display: block; font-size: 12.5px; font-weight: 700; color: var(--accent); padding: 4px 10px 0; }
.aff-move { --card-bg: #fff1e3; } .aff-net { --card-bg: #e6f0ff; } .aff-power { --card-bg: #fff8d9; } .aff-ur { --card-bg: #e9f6ee; } .aff-rent { --card-bg: #f2ecfb; }
.line-cta.watch small { display: block; color: var(--ink-3); font-size: 11.5px; }
.deadline { display: inline-block; font-size: 12px; font-weight: 700; color: var(--danger); margin-left: 6px; }

/* ---- 全画面ページ（カレンダー・通知・について） ---- */
.page { position: absolute; inset: 0 0 var(--bbar) 0; background: #fff; z-index: 800; display: flex; flex-direction: column; }
.page header { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; border-bottom: 1px solid var(--line); flex: none; }
.page header h2 { margin: 0; font-size: 17px; }
.back { border: 0; background: transparent; font-size: 22px; width: 40px; height: 40px; border-radius: 50%; }
.page-body { padding: 14px 16px calc(20px + var(--safe-b)); overflow-y: auto; flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.seg { display: flex; border: 1.5px solid var(--accent); border-radius: 10px; overflow: hidden; margin: 0 0 14px; }
.seg button { flex: 1; border: 0; background: #fff; padding: 9px; font-size: 14px; font-weight: 600; color: var(--accent); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.tl-h { font-size: 13px; color: var(--ink-3); margin: 14px 0 6px; font-weight: 600; }
.tl { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 14px; }
.ev { position: relative; padding: 10px 0; }
.ev::before { content: ""; position: absolute; left: -21px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--op, var(--accent)); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.ev .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ev b { font-size: 15px; }
.ev .sub { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.ev .bar { height: 7px; background: var(--bg-2); border-radius: 4px; margin-top: 8px; position: relative; overflow: hidden; }
.ev .bar i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--op, var(--accent)); border-radius: 4px; }
.ev .acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ev .acts button, .ev .acts a { border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 9px; padding: 7px 10px; font-size: 13px; text-decoration: none; }
.ev .acts .primary { background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 16px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #fce8e6; color: var(--danger); white-space: nowrap; }
.badge.ok { background: #e6f4ea; color: #188038; }
.badge.soon { background: #fef7e0; color: #b06000; }
.badge.gray { background: var(--bg-2); color: var(--ink-3); }
/* 募集の予定：1年の早見表 */
.cal-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.cal-pref { font-size: 13px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.cal-pref select { font-size: 15px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; }
.cal-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-kinds .opt { padding: 5px 11px; font-size: 13px; }
.legend { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 11px; color: var(--ink-3); margin: 12px 0 10px; }
/* 凡例の小さいブロック：本物の月ブロックと同じ見た目（色は灰色＝運営元の色ではない） */
.legend i { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 20px; border-radius: 5px; font-size: 9.5px; font-style: normal; font-weight: 700; background: var(--bg-2); color: #a4acb6; margin-right: 4px; vertical-align: -6px; position: relative; }
.legend i.any { background: color-mix(in srgb, var(--op) 24%, #fff); color: var(--op); }
.legend i.exp { background: #fff; box-shadow: inset 0 0 0 1.5px var(--op); color: var(--op); }
.legend i.fix { background: var(--op); color: #fff; }
.legend i.open { background: var(--op); color: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--op) 30%, #fff); padding-bottom: 4px; }
.legend i.open::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #fff; }
.legend i.now { outline: 2px solid #f9ab00; outline-offset: 1px; }
.cal-op { --op: var(--accent); margin: 10px 0 0; padding: 8px 0 2px; border-top: 1px solid var(--line); }
.cal-head { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 6px; padding: 2px 0 6px; font-size: 14px; color: var(--ink); }
.cal-head b { white-space: nowrap; }
.cal-head .dot { width: 10px; height: 10px; margin: 0; }
.cal-head b { font-size: 15px; margin-right: 4px; }
.cal-head .when { font-size: 12px; color: var(--ink-2); }
.cal-note { font-size: 11.5px; color: var(--ink-3); margin: -4px 0 10px; }
.region-sel { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); margin: 0 0 8px; }
.region-sel select { flex: 1; font-size: 15px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
.pref-soon { border-top: 1px solid var(--line); padding: 10px 0 4px; font-size: 12.5px; color: #9aa3ad; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pref-soon b { font-size: 11px; background: #eceff3; color: var(--ink-3); border-radius: 5px; padding: 1px 6px; font-weight: 700; }
.cal-sub { font-size: 12px; color: var(--ink-2); margin: 6px 0 2px; }
.cal-official { margin: 8px 0 4px; font-size: 13px; }
.cal-official a { color: var(--accent); text-decoration: none; font-weight: 600; }
.cal-pop .ev.quiet { padding: 6px 0 4px; }
.cal-pop .ev.quiet b { font-size: 13.5px; font-weight: 600; }
.cal-pop .ev { padding: 8px 0 6px; border-top: 1px dashed var(--line); margin-top: 6px; }
.cal-pop .ev::before { display: none; }
.cal-pop .ev b { font-size: 14px; }
.cal-pop .ev .bar i { background: var(--op); }
.h { margin: 4px 0 10px; font-size: 18px; }
.three { list-style: none; margin: 0; padding: 0; }
.three li { border-top: 1px solid var(--line); padding: 10px 0; display: grid; }
.three li:first-child { border-top: 0; }
.three b { font-size: 15px; }
.three span { color: var(--ink-2); font-size: 13px; }
.label { font-size: 13px; color: var(--ink-3); margin: 16px 0 6px; font-weight: 600; }
.area-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.area-chips .chip { box-shadow: none; border-color: var(--line); }
.mail { display: flex; gap: 8px; }
.mail input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; font-size: 16px; }
.note { font-size: 12px; color: var(--ink-3); margin: 12px 0 0; }
.proto { font-size: 12px; color: var(--accent); background: #eef3fb; padding: 8px 10px; border-radius: 10px; }
.about p, .about li { font-size: 14px; }
.about h3 { font-size: 14px; margin: 18px 0 6px; color: var(--ink-3); }
.about a { color: var(--accent); }

/* ---- 1回だけの案内・メニュー・トースト ---- */
.nudge { position: absolute; left: 12px; right: 12px; bottom: calc(var(--drawer-peek) + 14px + var(--bbar)); z-index: 640; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; }
.nudge p { margin: 0 0 8px; font-weight: 700; }
.nudge-btns { display: flex; gap: 8px; }
.menu { position: absolute; right: 12px; top: calc(60px + env(safe-area-inset-top, 0px)); z-index: 620; background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; min-width: 200px; }
.menu button { border: 0; background: #fff; text-align: left; padding: 12px 16px; border-top: 1px solid var(--line); }
.menu button:first-child { border-top: 0; }
.toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--drawer-peek) + 70px + var(--bbar)); background: rgba(27, 36, 50, .92); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13px; z-index: 900; max-width: 90%; }

/* ---- ピン ---- */
.pin-icon { background: transparent; border: 0; }
.pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--op, var(--accent)); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.pin.active { opacity: 0; }
.pin-red { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); animation: drop .25s ease-out; }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.pin.info { background: #fff; border: 3px solid var(--op, var(--accent)); }
.cluster { border-radius: 50%; background: #fff; color: var(--accent-soft-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; border: 3px solid var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); font-size: 13px; }
.cluster.m { font-size: 14px; }
.cluster.l { font-size: 15px; border-width: 4px; }
.ward-label { background: transparent; border: 0; }
.ward-label span { display: block; transform: translate(-50%, -50%); font-size: 11px; color: #5f6368; white-space: nowrap; text-shadow: 0 0 3px #fff, 0 0 3px #fff; font-weight: 600; pointer-events: none; }
.hide-ku .ward-label.ku { display: none; }
.labels-small .ward-label span { font-size: 10px; }

/* ---- パソコン ---- */
@media (min-width: 900px) {
  :root { --drawer-peek: 0px; }
  .drawer, .drawer.open { left: 0; top: 0; bottom: 0; width: 400px; height: auto; border-radius: 0; box-shadow: 4px 0 24px rgba(20, 30, 50, .1); padding-top: 70px; bottom: var(--bbar); }
  .drawer.hidden-by-detail { transform: none; }
  .handle { display: none; }
  .drawer:not(.open) .list { overflow-y: auto; }
  .topbar { left: 16px; width: 368px; right: auto; z-index: 620; }
  .bbar { right: auto; width: 400px; }
  .fab { bottom: 24px; }
  .drawer.open { height: auto; }
  .detail { left: 416px; right: auto; width: 420px; top: 16px; bottom: 16px; border-radius: 18px; }
  .scrim { right: auto; width: 400px; background: transparent; }
  .detail .handle { display: none; }
  .popover { left: 0; right: auto; width: 400px; top: 0; max-height: none; border-radius: 0; }
  .page { left: 0; width: 400px; right: auto; bottom: var(--bbar); box-shadow: 4px 0 24px rgba(20, 30, 50, .1); }
  .menu { left: 184px; right: auto; top: 64px; }
  .nudge { left: 432px; right: auto; width: 360px; bottom: 24px; }
  .toast { bottom: 24px; }
  .leaflet-control-container .leaflet-top.leaflet-right { top: 16px; }
}

/* 詳細：募集の状態（いつ・何の締切・決め方） */
.round-box { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0 10px; background: #fbfcfe; }
.round-box .rb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.round-box .rb-name { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.round-box .rb-line { font-size: 14px; margin-top: 6px; }
.round-box .bar { height: 6px; background: var(--bg-2); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.round-box .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.round-box dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 8px 0 0; font-size: 13px; }
.round-box dt { color: var(--ink-3); white-space: nowrap; }
.round-box dd { margin: 0; color: var(--ink); }
.feats { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.feats span { font-size: 12px; background: #e8f0fe; color: #1a56c4; border-radius: 999px; padding: 3px 9px; font-weight: 600; }
.detail h3.sec { font-size: 13px; color: var(--ink-3); margin: 12px 0 0; font-weight: 600; }
.loc-steps { padding-left: 1.3em; line-height: 1.8; font-size: 15px; }
.loc-steps li { margin: 6px 0; }

/* ---- 下の固定バー（案D） ---- */
.bbar { position: absolute; left: 0; right: 0; bottom: 0; height: var(--bbar); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); z-index: 900; display: grid; grid-template-columns: repeat(4, 1fr); }
.bbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--ink-3); position: relative; padding: 4px 0 2px; }
.bbar button svg { width: 24px; height: 24px; padding: 2px 14px; box-sizing: content-box; border-radius: 14px; transition: background .15s; }
.bbar button.on { color: var(--accent-soft-ink); }
.bbar button.on svg { background: var(--accent-soft); }
.bbar .bdg { position: absolute; top: 3px; left: calc(50% + 10px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; line-height: 17px; text-align: center; padding: 0 4px; }
/* 一覧の上：件数といま効いている条件 */
.count-wrap { min-width: 0; flex: 1; }
.cond { margin: 0; font-size: 12px; color: var(--accent-soft-ink); display: flex; align-items: center; gap: 8px; min-width: 0; }
.cond span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cond button { flex: none; border: 0; background: var(--bg-2); color: var(--ink-2); font-size: 11.5px; border-radius: 10px; padding: 2px 8px; }
.drawer:not(.open) .cond { display: none; }
.about-link { display: block; margin: 8px auto 20px; border: 0; background: none; color: var(--ink-3); font-size: 12.5px; text-decoration: underline; }
/* 絞り込み：項目ごとの折りたたみ */
.pop-head .pop-n { margin-left: auto; margin-right: 10px; font-size: 13px; color: var(--ink-3); }
.acc { border-bottom: 1px solid var(--line); }
.acc-head { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 14px 2px; text-align: left; }
.acc-t { font-size: 15px; font-weight: 700; color: var(--ink); flex: none; }
.acc-v { margin-left: auto; font-size: 13.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.acc-v.set { color: var(--accent-soft-ink); font-weight: 600; }
.acc-c { flex: none; color: var(--ink-3); font-size: 18px; line-height: 1; transition: transform .2s; }
.acc.open .acc-c { transform: rotate(90deg); }
.acc-body { display: none; padding: 0 2px 14px; }
.acc.open .acc-body { display: block; }
.acc.open { background: linear-gradient(#fafbfd, #fafbfd); }

/* ---- 募集カレンダー：月のブロック ---- */
/* 表示する運営元：チェックの付いたチップ（市営が増えても1つずつ選べる） */
.cal-ops-h { font-size: 11.5px; color: var(--ink-3); margin: 0 0 5px; }
.cal-ops { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.cal-ops .chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 8px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
.cal-ops .chip input { width: 15px; height: 15px; margin: 0; accent-color: var(--op, var(--ink)); }
.cal-ops .chip .dot { width: 9px; height: 9px; margin: 0; opacity: .35; }
.cal-ops .chip.on { border-color: color-mix(in srgb, var(--op, var(--ink)) 45%, #fff); background: color-mix(in srgb, var(--op, var(--ink)) 8%, #fff); color: var(--ink); }
.cal-ops .chip.on .dot { opacity: 1; }
.cal-ops .chip.all { --op: var(--ink); }
.cal-grid-head { position: sticky; top: 0; background: #fff; z-index: 1; padding: 2px 0 0; }
.cal-years { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .3px; }
.cal-years span { padding: 0 2px 2px; border-bottom: 1.5px solid var(--line); }
.cal-years span.next { color: #9aa3ad; }
.cal-mark { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; height: 14px; margin-top: 2px; }
.cal-mark span { font-size: 9.5px; font-weight: 800; color: #b06000; text-align: center; line-height: 16px; letter-spacing: -.3px; white-space: nowrap; }
.cal-blocks { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.blk { aspect-ratio: 1 / 1.15; border: 0; border-radius: 7px; background: var(--bg-2); color: #a4acb6; font-size: 12.5px; font-weight: 700; padding: 0; position: relative; line-height: 1; transition: transform .12s; -webkit-tap-highlight-color: transparent; }
.blk[disabled] { cursor: default; }
.blk.any { background: color-mix(in srgb, var(--op) 16%, #fff); color: var(--op); }
.blk.exp { background: #fff; box-shadow: inset 0 0 0 1.5px var(--op); color: var(--op); }
.blk.fix { background: var(--op); color: #fff; }
.blk.open { background: var(--op); color: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--op) 30%, #fff), 0 3px 8px color-mix(in srgb, var(--op) 40%, transparent); }
.blk.open::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #fff; animation: calpulse 1.6s ease-in-out infinite; }
@keyframes calpulse { 50% { transform: scale(1.7); opacity: .5; } }
.blk.now { outline: 2px solid #f9ab00; outline-offset: 1px; }
.blk.sel { transform: scale(1.1); z-index: 1; box-shadow: 0 0 0 2px var(--ink); }
.blk.sel.open { box-shadow: 0 0 0 2px var(--ink), 0 3px 8px color-mix(in srgb, var(--op) 40%, transparent); }
.cal-pop { margin: 10px 0 6px; padding: 10px 12px 10px; border-radius: 12px; background: #fbfcfe; border: 1.5px solid var(--line); border-left: 4px solid var(--op); }
.cal-pop-h { display: flex; align-items: center; gap: 8px; }
.cal-pop-h b { font-size: 15px; }
.cal-pop-h span { font-size: 12.5px; color: var(--ink-3); flex: 1; }
.cal-pop-x { border: 0; background: var(--bg-2); width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--ink-2); }
.cal-pop .ev { padding: 8px 0 6px; border-top: 1px dashed var(--line); margin-top: 8px; }
.cal-pop .ev:first-of-type { border-top: 0; margin-top: 2px; }
.cal-pop .ev::before { display: none; }
.cal-pop .ev.quiet { padding: 6px 0 4px; }
.cal-pop .ev.quiet b { font-size: 13.5px; font-weight: 600; }
.cal-pop .cal-sub { margin: 8px 0 0; }
.cal-pop .cal-official { margin: 6px 0 0; }
.three.steps li b { min-width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.three.steps li { grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.three.steps li span { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
