/* 売出物件ページ（/p/）。不動産サイトらしい見た目：左に条件、右に写真の大きい物件カード */
:root {
  color-scheme: light;
  --bg: #f3f4f1; --surface: #ffffff; --line: #dfe1dc; --soft: #eef0ec;
  --text: #1d1f1c; --text-2: #50544d; --muted: #868b83;
  --brand: #11685a; --brand-2: #0c5248; --brand-ink: #ffffff; --brand-soft: #e3f1ed;
  --price: #c8321b; --good: #11785b; --good-bg: #e2f3ea; --warn: #b4361f; --warn-bg: #fdf0e6;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121412; --surface: #1b1e1b; --line: #323631; --soft: #252924;
    --text: #eef0ec; --text-2: #c2c6bf; --muted: #8e938b;
    --brand: #3fae98; --brand-2: #2f8f7c; --brand-ink: #0b0f0d; --brand-soft: #1b322c;
    --price: #ff8a70; --good: #6fd0a6; --good-bg: #183327; --warn: #f39a80; --warn-bg: #3a2718;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121412; --surface: #1b1e1b; --line: #323631; --soft: #252924;
  --text: #eef0ec; --text-2: #c2c6bf; --muted: #8e938b;
  --brand: #3fae98; --brand-2: #2f8f7c; --brand-ink: #0b0f0d; --brand-soft: #1b322c;
  --price: #ff8a70; --good: #6fd0a6; --good-bg: #183327; --warn: #f39a80; --warn-bg: #3a2718;
  --shadow: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif; }
a { color: var(--brand); }
img { max-width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.num { font-variant-numeric: tabular-nums; }

/* ヘッダ */
.hd { background: var(--brand); color: var(--brand-ink); }
.hd .wrap { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.hd .logo { color: var(--brand-ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: .03em; white-space: nowrap; }
.hd .logo small { font-weight: 600; font-size: .72rem; opacity: .85; margin-left: .6em; }
.hd .search { flex: 1; max-width: 520px; margin-left: auto; position: relative; }
.hd .search input { width: 100%; font: inherit; padding: .55em .9em .55em 2.2em; border-radius: 999px; border: 0;
  background: var(--surface); color: var(--text); }
.hd .search svg { position: absolute; left: .8em; top: 50%; transform: translateY(-50%); width: 1em; height: 1em; color: var(--muted); }
.hd nav { display: flex; gap: 14px; font-size: .85rem; white-space: nowrap; }
.hd nav a { color: var(--brand-ink); opacity: .9; text-decoration: none; }
.subhd { background: var(--surface); border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--text-2); }
.subhd .wrap { padding-top: 8px; padding-bottom: 8px; }

/* 一覧：左に条件、右に結果 */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 20px; align-items: start; padding: 16px 0 40px; }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; position: sticky; top: 12px; box-shadow: var(--shadow); }
.side summary { list-style: none; padding: 12px 14px; font-weight: 700; border-bottom: 1px solid var(--line); cursor: default; }
.side summary::-webkit-details-marker { display: none; }
.side .grp { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.side .grp:last-child { border-bottom: 0; }
.side .lbl { display: block; font-size: .8rem; font-weight: 700; color: var(--text-2); margin-bottom: 5px; }
.side select, .side input[type=number] { font: inherit; font-size: .9rem; width: 100%; padding: .4em .5em; border: 1px solid var(--line);
  border-radius: 6px; background: var(--surface); color: var(--text); }
.side .pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 4px; align-items: center; font-size: .8rem; color: var(--muted); }
.side .chk { display: flex; gap: 7px; align-items: flex-start; font-size: .85rem; margin: 4px 0; line-height: 1.45; }
.side .chk input { margin-top: .2em; accent-color: var(--brand); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar h1 { font-size: 1.15rem; margin: 0; }
.toolbar .count { font-size: .85rem; color: var(--text-2); }
.toolbar .count b { font-size: 1.25rem; color: var(--text); margin-right: 2px; }
.toolbar select { font: inherit; font-size: .88rem; padding: .35em .5em; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
.about { font-size: .78rem; color: var(--muted); margin: -4px 0 12px; }

/* 物件カード */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--text);
  text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.pc:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.pc .ph { position: relative; aspect-ratio: 4 / 3; background: var(--soft); }
.pc .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc .ph .none { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; }
.ribbon { position: absolute; left: 0; top: 10px; background: var(--good); color: #fff; font-weight: 800; font-size: .8rem;
  padding: 3px 10px 3px 8px; border-radius: 0 4px 4px 0; }
.ribbon.dear { background: #7a7d78; }
.pc .ph .new { position: absolute; right: 8px; top: 8px; background: var(--price); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 3px; }
.pc .bd { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pc .pr { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pc .price { color: var(--price); font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.pc .was { font-size: .78rem; color: var(--muted); text-decoration: line-through; }
.pc .est { font-size: .78rem; color: var(--text-2); }
.pc .nm { font-weight: 700; font-size: .95rem; line-height: 1.4; }
.pc .spec { display: flex; gap: 0; font-size: .82rem; color: var(--text-2); flex-wrap: wrap; }
.pc .spec span + span::before { content: "｜"; color: var(--line); margin: 0 4px; }
.pc .loc { font-size: .8rem; color: var(--text-2); }
.pc .bld { font-size: .78rem; color: var(--muted); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.tag { font-size: .72rem; padding: 0 .55em; border-radius: 3px; line-height: 1.75; border: 1px solid var(--line); color: var(--text-2); background: var(--surface); }
.tag.warn { border-color: transparent; background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.tag.good { border-color: transparent; background: var(--good-bg); color: var(--good); font-weight: 700; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--surface); border-radius: 10px; }

/* 物件ページ */
.crumb { font-size: .82rem; color: var(--text-2); }
.crumb a { color: var(--text-2); }
.dhead { padding: 16px 0 6px; }
.dhead h1 { font-size: 1.5rem; margin: 0 0 4px; line-height: 1.35; }
.dhead .loc { color: var(--text-2); font-size: .92rem; }
.dtop { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.gal { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.gal .main { margin: 0; position: relative; }
.gal .main img, .gal .main .none { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #111; border-radius: 6px; display: block; }
.gal .main .none { background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.gal .nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.5); color: #fff; font-size: 1.2rem; cursor: pointer; }
.gal .nav.prev { left: 8px; } .gal .nav.next { right: 8px; }
.gal figcaption { font-size: .82rem; color: var(--text-2); margin-top: 6px; display: flex; justify-content: space-between; }
.gal .thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-top: 8px; }
.gal .thumbs button { border: 2px solid transparent; padding: 0; border-radius: 5px; background: none; cursor: pointer; }
.gal .thumbs button.on { border-color: var(--brand); }
.gal .thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; display: block; }
.gal .cap { font-size: .78rem; color: var(--muted); margin: 6px 0 0; }

.box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; position: sticky; top: 12px; box-shadow: var(--shadow); }
.box .lbl { font-size: .8rem; color: var(--text-2); }
.box .price { color: var(--price); font-size: 2rem; font-weight: 800; line-height: 1.2; }
.box .was { font-size: .82rem; color: var(--muted); }
.box .fee { font-size: .85rem; color: var(--text-2); margin-top: 2px; }
.verdict { margin: 14px 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--good-bg); color: var(--good); font-weight: 800; }
.verdict.mid { background: var(--soft); color: var(--text-2); }
.verdict.dear { background: var(--warn-bg); color: var(--warn); }
.verdict small { display: block; font-weight: 500; color: var(--text-2); font-size: .78rem; margin-top: 2px; }
.meter { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--good-bg), var(--soft) 50%, var(--warn-bg)); margin: 18px 0 22px; }
.meter .mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--muted); }
.meter .pin { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--price); border: 2px solid var(--surface);
  transform: translate(-50%, -50%); box-shadow: 0 0 0 1px var(--price); }
.meter .l, .meter .c, .meter .r { position: absolute; top: 12px; font-size: .68rem; color: var(--muted); white-space: nowrap; }
.meter .l { left: 0; } .meter .c { left: 50%; transform: translateX(-50%); } .meter .r { right: 0; }
.score { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0 0 12px; font-size: .85rem; }
.score dt { color: var(--text-2); }
.score dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.cta { display: block; text-align: center; background: var(--price); color: #fff; font-weight: 800; text-decoration: none; padding: .8em; border-radius: 8px; margin-top: 12px; }
.cta:hover { filter: brightness(1.06); }

.sec { margin-top: 24px; }
.sec h2 { font-size: 1.1rem; margin: 0 0 10px; padding: 0 0 0 10px; border-left: 4px solid var(--brand); line-height: 1.4; }
.sec .note { font-size: .8rem; color: var(--muted); margin: -4px 0 10px; }
.spec-t { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.spec-t th, .spec-t td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-t th { background: var(--soft); color: var(--text-2); font-weight: 600; width: 9.5em; white-space: nowrap; }

.notes { margin: 8px 0 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px; }
.notes summary { cursor: pointer; padding: 10px 0; font-weight: 700; }
.notes li { font-size: .85rem; color: var(--text-2); margin: .35em 0; }
.ft { font-size: .75rem; color: var(--muted); padding: 16px 0 32px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .side summary { cursor: pointer; }
  .side summary::after { content: "▾"; float: right; color: var(--muted); }
  .dtop { grid-template-columns: 1fr; }
  .box { position: static; }
}
@media (max-width: 640px) {
  .hd .wrap { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .hd .search { order: 3; flex-basis: 100%; max-width: none; }
  .grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pc .bd { padding: 8px; }
  .pc .price { font-size: 1.1rem; }
  .pc .bld, .pc .est { display: none; }
  .spec-t th { width: 7em; }
}
@media (max-width: 380px) { .grid { grid-template-columns: 1fr; } }

/* 静的ページ（区・町・物件）の部品 */
.crumb a { color: var(--text-2); }
.dhead .loc { margin: 0; }
.txt { font-size: .92rem; color: var(--text-2); line-height: 1.8; max-width: 52em; }
.more { margin: 14px 0; font-size: .92rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 8px 0 4px; }
.kpis div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.kpis dt { font-size: .78rem; color: var(--text-2); }
.kpis dd { margin: 0; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.towns { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.towns a { display: flex; justify-content: space-between; gap: 6px; padding: 7px 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; text-decoration: none; color: var(--text); font-size: .9rem; }
.towns a:hover { border-color: var(--brand); }
.towns span { color: var(--muted); font-size: .8rem; }
.ft-h { font-size: .95rem; margin: 4px 0 8px; color: var(--text-2); }
.wardlinks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }
.wardlinks a { color: var(--text-2); font-size: .82rem; }
.ft p { margin: 6px 0; }
.ft a { color: var(--text-2); }
.intro { margin: 16px 0 0; }
.intro h2 { font-size: 1rem; margin: 0 0 8px; }
