/* 三陽建設 土地マップ検索
   PC = 左に「条件＋物件リスト」、右に地図。スマホ = リスト／地図の切替＋条件は下から出るシート */
.spm{
  --spm-yellow:#ffcc33;--spm-yellow-soft:#fff4cc;--spm-ink:#222;--spm-ink-2:#666;
  --spm-line:#e2e2e2;--spm-bg:#f5f5f5;--spm-card:#fff;--spm-sold:#999;
  --spm-num:"Century Gothic","Questrial","Noto Sans JP",sans-serif;--spm-r:12px;
  width:100%;position:relative;
  font-family:"Noto Sans JP","Hiragino Sans","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;
  color:var(--spm-ink);font-size:14px;line-height:1.6;background:var(--spm-bg);
  border-top:1px solid var(--spm-line);border-bottom:1px solid var(--spm-line);
}
.spm *,.spm *::before,.spm *::after{box-sizing:border-box}
.spm button,.spm input,.spm select{font:inherit;color:inherit;margin:0}
.spm a{color:inherit;text-decoration:none}
.spm img{max-width:100%}
.spm [hidden]{display:none!important}

.spm-app{display:grid;grid-template-columns:minmax(360px,440px) 1fr;grid-template-rows:minmax(0,1fr);height:calc(100vh - 110px);height:calc(100dvh - 110px);min-height:520px;max-height:960px;max-width:1600px;margin:0 auto}
.spm .spm-app{margin-left:auto!important;margin-right:auto!important;width:100%}
.spm-side{overflow-y:auto;border-right:1px solid var(--spm-line);background:var(--spm-bg);min-height:0}
.spm-mapwrap{position:relative}
#spm-map{position:absolute;inset:0;background:#eef0ea;z-index:1}
.spm-no{position:absolute;left:6px;top:6px;background:rgba(0,0,0,.72);color:#fff;font-family:var(--spm-num);font-size:10.5px;font-weight:700;padding:1px 6px;border-radius:4px;line-height:1.5}

/* 絞り込み */
.spm-filters{padding:14px 20px 8px;background:var(--spm-card);border-bottom:1px solid var(--spm-line);margin:0}
.spm-fgroup{display:grid;grid-template-columns:72px 1fr;gap:8px;align-items:start;padding:8px 0}
.spm-fgroup + .spm-fgroup{border-top:1px dashed var(--spm-line)}
.spm-flabel{font-size:12px;font-weight:700;color:var(--spm-ink-2);padding-top:5px;letter-spacing:.04em;line-height:1.4}
.spm-flabel small{display:block;font-size:10px;font-weight:400;letter-spacing:0;margin-top:2px}
.spm-chips{display:flex;flex-wrap:wrap;gap:6px}
.spm-chip{position:relative;margin:0;display:inline-block}
.spm-chip input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}
.spm-chip span{display:inline-flex;align-items:center;gap:4px;padding:4px 11px;border:1px solid var(--spm-line);border-radius:999px;background:var(--spm-card);font-size:13px;cursor:pointer;transition:background .15s,border-color .15s;user-select:none;line-height:1.5}
.spm-chip span em{font-style:normal;font-family:var(--spm-num);font-size:11px;color:var(--spm-ink-2)}
.spm-chip span:hover{border-color:#bbb}
.spm-chip input:checked + span{background:var(--spm-yellow);border-color:var(--spm-yellow);font-weight:700}
.spm-chip input:checked + span em{color:var(--spm-ink)}
.spm-chip input:focus-visible + span{outline:2px solid var(--spm-ink);outline-offset:2px}
.spm-chip input:disabled + span{opacity:.38;cursor:not-allowed}
.spm-special span{background:var(--spm-yellow-soft);border-color:var(--spm-yellow);font-weight:700}
.spm-special span i{display:inline-block;width:14px;height:14px;border:2px solid #c99a00;border-radius:3px;background:#fff;margin-right:2px;position:relative}
.spm-special input:checked + span{background:var(--spm-yellow)}
.spm-special input:checked + span i{background:#222;border-color:#222}
.spm-special input:checked + span i::after{content:"";position:absolute;left:3px;top:0;width:4px;height:8px;border:solid #ffcc33;border-width:0 2px 2px 0;transform:rotate(45deg)}
.spm-line-name{width:100%;font-size:11px;color:var(--spm-ink-2);margin:2px 0 -2px}
.spm-toggles{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;padding:10px 0 6px;border-top:1px dashed var(--spm-line)}
.spm-sw{display:inline-flex;align-items:center;gap:6px;font-size:13px;cursor:pointer;margin:0}
.spm-sw input{width:16px;height:16px;accent-color:#d9a400}
.spm-clear{margin-left:auto;background:none;border:0;font-size:12px;color:var(--spm-ink-2);text-decoration:underline;cursor:pointer;padding:0}

.spm-kw{display:flex;align-items:center;gap:8px;padding:2px 0 10px}
.spm-kw-label{width:72px;flex-shrink:0;font-size:12px;font-weight:700;color:var(--spm-ink-2);letter-spacing:.04em}
.spm-kw-box{position:relative;flex:1;min-width:0}
.spm .spm-kw-box input{width:100%;height:38px;border:1px solid var(--spm-line);border-radius:999px;background:var(--spm-card);padding:0 34px 0 14px;font-size:14px;box-shadow:none;margin:0}
.spm .spm-kw-box input:focus{outline:2px solid var(--spm-yellow);border-color:var(--spm-yellow)}
.spm .spm-kw-box input::-webkit-search-cancel-button{-webkit-appearance:none}
.spm-kw-box button{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;border:0;border-radius:50%;background:#e2e2e2;font-size:13px;line-height:1;cursor:pointer;padding:0}

/* 並べ替え */
.spm-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 20px 4px}
.spm-n{font-size:13px;color:var(--spm-ink-2)}
.spm-n b{font-family:var(--spm-num);font-size:16px;color:var(--spm-ink)}
.spm-bar select{border:1px solid var(--spm-line);border-radius:8px;padding:4px 8px;background:var(--spm-card);font-size:13px;width:auto;height:auto}

/* 物件カード */
.spm-list{display:flex;flex-direction:column;gap:12px;padding:8px 20px 28px}
.spm-card{display:grid;grid-template-columns:132px 1fr;gap:12px;background:var(--spm-card);border:1px solid var(--spm-line);border-radius:var(--spm-r);padding:10px;cursor:pointer;transition:border-color .15s,box-shadow .15s;position:relative;margin:0}
.spm-card:hover,.spm-card.is-active{border-color:var(--spm-yellow);box-shadow:0 4px 14px rgba(0,0,0,.1)}
.spm-thumb{position:relative;aspect-ratio:4/3;border-radius:8px;overflow:hidden;background:var(--spm-yellow-soft)}
.spm-thumb img{width:100%;height:100%;object-fit:cover;display:block;margin:0}
.spm-card.sold .spm-thumb img{filter:grayscale(1) opacity(.7)}
.spm-soldmark{position:absolute;inset:0;display:grid;place-items:center;font-weight:700;color:#fff;font-size:13px;letter-spacing:.2em;background:rgba(0,0,0,.35)}
.spm-body{min-width:0;display:flex;flex-direction:column;gap:3px}
.spm-tags{display:flex;flex-wrap:wrap;gap:4px}
.spm-tag{font-size:10.5px;padding:1px 7px;border-radius:4px;background:#f0f0f0;color:var(--spm-ink-2);font-weight:500;line-height:1.6}
.spm-tag.plan{background:var(--spm-yellow);color:var(--spm-ink);font-weight:700}
.spm .spm-place{font-size:14px;font-weight:700;line-height:1.4;margin:0;padding:0;border:0;background:none}
.spm .spm-place::before,.spm .spm-place::after{display:none}
.spm-price{font-family:var(--spm-num);font-size:22px;font-weight:700;line-height:1.1;font-variant-numeric:tabular-nums}
.spm-price small{font-size:12px;font-weight:700;margin-left:1px}
.spm-card.sold .spm-price{color:var(--spm-sold)}
.spm-total{font-size:11.5px;color:var(--spm-ink-2)}
.spm-total b{color:var(--spm-ink);font-family:var(--spm-num);font-size:13px}
.spm-meta{font-size:12px;color:var(--spm-ink-2);line-height:1.5}
.spm-more{align-self:flex-end;margin-top:2px;font-size:12px;font-weight:700;border-bottom:2px solid var(--spm-yellow)}
.spm-empty{padding:40px 20px;text-align:center;color:var(--spm-ink-2)}

/* 地図ピン */
.spm .spm-pin-wrap{background:none;border:0}
.spm-pin{display:inline-block;transform:translate(-50%,-100%);white-space:nowrap;background:var(--spm-yellow);color:var(--spm-ink);font-family:var(--spm-num);font-weight:700;font-size:13px;line-height:1.4;padding:3px 9px;border-radius:999px;border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.25);position:relative;transition:transform .15s}
.spm-pin::after{content:"";position:absolute;left:50%;bottom:-7px;transform:translateX(-50%);border:6px solid transparent;border-top-color:#fff;border-bottom:0}
.spm-pin.sold{background:#d9d9d9;color:#666}
.spm-pin.sp{background:#222;color:#ffcc33}
.spm-pin.sp::before{content:"★";font-size:10px;margin-right:2px;vertical-align:1px}
.spm.spm-far .spm-pin.sp:not(.is-active)::before{display:none}
.spm-pin.is-active{background:#0066ff;color:#ffcc33;transform:translate(-50%,-100%) scale(1.15)}
.spm.spm-far .spm-pin:not(.is-active){font-size:0;padding:0;width:16px;height:16px;border-width:2px}
.spm.spm-far .spm-pin:not(.is-active)::after{display:none}
.spm .leaflet-marker-icon.on-top{z-index:9999!important}
.spm-note{position:absolute;left:10px;bottom:22px;z-index:500;background:rgba(255,255,255,.92);font-size:11px;padding:3px 8px;border-radius:6px;color:var(--spm-ink-2)}

/* ポップアップ（PC） */
.spm .leaflet-popup-content-wrapper{border-radius:12px;padding:0;overflow:hidden}
.spm .leaflet-popup-content{margin:0;width:260px!important;font-size:13px;line-height:1.6}
.spm-pop img{width:100%;aspect-ratio:16/10;object-fit:cover;display:block}
.spm-pop .in{padding:10px 12px 12px;display:flex;flex-direction:column;gap:3px}
.spm-pop .spm-price{font-size:20px}
.spm .spm-btn{display:block;text-align:center;background:var(--spm-yellow);color:var(--spm-ink);font-weight:700;padding:9px;border-radius:8px;margin-top:6px;font-size:13px}
.spm .spm-btn.line{background:#06c755;color:#fff}

/* スマホ */
.spm-mbar,.spm-sheet-foot,.spm-peek,.spm-sheet-head{display:none}
@media (max-width:860px){
  .spm-app{display:block;height:auto}
  .spm-side{overflow:visible;border:0}
  .spm-mbar{display:flex;gap:8px;padding:10px 16px;position:sticky;top:0;z-index:600;background:var(--spm-bg);border-bottom:1px solid var(--spm-line)}
  .spm-mbar button{border:1px solid var(--spm-line);background:var(--spm-card);border-radius:999px;padding:7px 14px;font-size:13px;font-weight:700;cursor:pointer;line-height:1.4}
  .spm-fbtn b{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:4px;border-radius:9px;background:var(--spm-yellow);font-family:var(--spm-num);font-size:11px}
  .spm-seg{margin-left:auto;display:flex;border:1px solid var(--spm-line);border-radius:999px;overflow:hidden;background:var(--spm-card)}
  .spm .spm-seg button{border:0;border-radius:0}
  .spm .spm-seg button[aria-pressed="true"]{background:var(--spm-ink);color:#fff}
  .spm-filters{position:fixed;inset:0;z-index:100000;overflow-y:auto;padding:16px 16px 90px;transform:translateY(100%);transition:transform .25s ease;border:0}
  .spm.sheet-open .spm-filters{transform:none}
  .spm-sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
  .spm-sheet-head b{font-size:16px}
  .spm-sheet-head button{border:0;background:none;font-size:24px;line-height:1;cursor:pointer;padding:4px}
  .spm-sheet-foot{display:block;position:fixed;left:0;right:0;bottom:0;z-index:100001;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));background:var(--spm-card);border-top:1px solid var(--spm-line);transform:translateY(120%);transition:transform .25s ease}
  .spm.sheet-open .spm-sheet-foot{transform:none}
  .spm-sheet-foot button{width:100%;border:0;background:var(--spm-yellow);font-weight:700;padding:13px;border-radius:10px;font-size:15px;cursor:pointer}
  .spm-bar,.spm-list{padding-left:16px;padding-right:16px}
  .spm-card{grid-template-columns:112px 1fr}
  .spm-mapwrap{display:none;height:calc(100dvh - 60px)}
  .spm.view-map .spm-mapwrap{display:block}
  .spm.view-map .spm-bar,.spm.view-map .spm-list{display:none}
  .spm .leaflet-popup{display:none}
  .spm-peek{position:fixed;left:12px;right:12px;bottom:calc(14px + env(safe-area-inset-bottom,0px));z-index:100002}
  .spm-peek .spm-more{font-size:14px;padding:6px 0}
  .spm.spm-far .spm-pin:not(.is-active){width:22px;height:22px}
  .spm-peek.show{display:block}
  .spm-peek .spm-card{box-shadow:0 8px 24px rgba(0,0,0,.18)}
  .spm-peek .x{position:absolute;top:-10px;right:-6px;width:28px;height:28px;border-radius:50%;border:1px solid var(--spm-line);background:#fff;font-size:16px;line-height:1;cursor:pointer;z-index:2;padding:0}
}
@media (prefers-reduced-motion:reduce){.spm *{transition:none!important}}
@media (max-width:860px){.spm .spm-kw-box input{font-size:16px}} /* iPhoneで入力時に画面が拡大されないように */

/* Googleマップのふきだし（PC） */
.spm .gm-style .gm-style-iw-c{padding:0!important;border-radius:12px;max-width:280px!important}
.spm .gm-style .gm-style-iw-d{overflow:auto!important;padding:0!important;max-height:none!important}
.spm .gm-style .gm-style-iw-chr{position:absolute;right:0;top:0;z-index:2}
.spm .gm-style .gm-style-iw-chr button{background:rgba(255,255,255,.9)!important;border-radius:50%;width:32px!important;height:32px!important}
.spm .gm-style .gm-style-iw-chr button span{margin:4px!important}
.spm .gm-style .spm-pop{width:260px;font-size:13px;line-height:1.6;font-family:inherit}
@media (max-width:860px){.spm .gm-style .gm-style-iw-a,.spm .gm-style .gm-style-iw-t{display:none}}
