:root {
  --bg: #f4f3ef; --panel: #fff; --ink: #1c1917; --muted: #66615b; --line: #dcd8d0;
  --accent: #7c3aed; --accent-soft: #ede9fe; --ok: #15803d; --half: #b45309; --ng: #b91c1c;
  --display: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.6 var(--body); display: flex; flex-direction: column; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.demo-banner { margin: 0; background: #1c1917; color: #fde68a; font-size: 12.5px; text-align: center; padding: 5px 10px; flex: none; }
.app { flex: 1; min-height: 0; display: grid; grid-template-columns: 440px 1fr; }
.side { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; border-right: 1px solid var(--line); }
.head { padding: 16px 16px 4px; }
h1 { font: 900 26px/1.2 var(--display); margin: 0; letter-spacing: .02em; }
h1::after { content: "デモ"; font: 700 11px var(--body); background: var(--accent); color: #fff; border-radius: 4px; padding: 1px 6px; margin-left: 8px; vertical-align: 5px; }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.ask { padding: 10px 16px 12px; display: grid; gap: 8px; }
textarea { width: 100%; resize: vertical; border: 2px solid var(--accent); border-radius: 10px; padding: 10px 12px; font: 15px/1.6 var(--body); background: var(--panel); color: var(--ink); }
textarea:focus { outline: 3px solid var(--accent-soft); }
.ask-row { display: flex; gap: 8px; justify-content: space-between; }
button { font: inherit; cursor: pointer; }
.go { flex: 1; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; padding: 10px 14px; }
.ghost { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 12px; color: var(--ink); }
.samples { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.samples button { text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 10px; font-size: 13px; line-height: 1.5; }
.samples button:hover { border-color: var(--accent); }
.thinking { margin: 0 16px 10px; padding: 12px 14px; border-radius: 10px; background: var(--ink); color: #e7e5e4; font-size: 13.5px; }
.thinking p { margin: 2px 0; opacity: .35; transition: opacity .25s; }
.thinking p.on { opacity: 1; }
.thinking p.done::before { content: "✓ "; color: #86efac; }
.parsed { margin: 0 16px 10px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); }
.parsed h2 { font: 700 14px var(--body); margin: 0 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { background: var(--panel); border: 1px solid #c4b5fd; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; }
.chip i { font-style: normal; margin-right: 4px; }
.notes { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.watch-btn { margin-top: 10px; width: 100%; border: 2px solid var(--accent); background: var(--panel); color: var(--accent); border-radius: 10px; padding: 8px; font-weight: 700; }
.result-head { margin: 0 16px 6px; font-size: 13px; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: 96px 1fr; gap: 0; overflow: hidden; cursor: pointer; }
.item:hover, .item.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.item .thumb { width: 96px; height: 100%; min-height: 96px; background: #eff6ff; }
.item .thumb svg { width: 100%; height: 100%; display: block; }
.item .info { padding: 8px 10px; display: grid; gap: 2px; }
.pct { font: 900 20px/1 var(--display); color: var(--accent); }
.pct small { font: 400 11.5px var(--body); color: var(--muted); margin-left: 4px; }
.price { font-weight: 700; }
.meta { font-size: 12px; color: var(--muted); }
.why { font-size: 12px; display: flex; flex-wrap: wrap; gap: 3px 8px; }
.r1 { color: var(--ok); } .r1::before { content: "✓ "; }
.rh { color: var(--half); } .rh::before { content: "△ "; }
.r0 { color: var(--ng); } .r0::before { content: "✕ "; }
.new { background: #dc2626; color: #fff; border-radius: 4px; font-size: 11px; padding: 0 5px; margin-right: 4px; font-weight: 700; }
.mapwrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: #e7e5e4; }
.tag { display: inline-block; transform: translate(-50%, -100%); background: var(--panel); border: 2px solid var(--accent); color: var(--ink); border-radius: 6px; padding: 1px 6px; font: 700 12px/1.3 var(--body); white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.25); cursor: pointer; }
.tag b { color: var(--accent); }
.tag.hi { background: var(--accent); color: #fff; } .tag.hi b { color: #fde68a; }
.tag.isnew { border-color: #dc2626; animation: pulse 1.2s ease-out 3; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.6); } 100% { box-shadow: 0 0 0 14px rgba(220,38,38,0); } }
.leaflet-div-icon.pin { background: none; border: 0; }
.poi { font-size: 15px; transform: translate(-50%, -50%); display: inline-block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.place { transform: translate(-50%, -50%); display: inline-block; background: var(--ink); color: #fff; font: 700 11.5px var(--body); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.watches { position: absolute; right: 10px; top: 10px; z-index: 600; background: var(--panel); border: 2px solid var(--accent); border-radius: 10px; padding: 8px 12px; max-width: 320px; font-size: 12.5px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.watches b { color: var(--accent); }
.toast { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 700; background: #dc2626; color: #fff; border-radius: 12px; padding: 12px 18px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.3); cursor: pointer; max-width: 90%; }
.modal { position: fixed; inset: 0; z-index: 2000; background: rgba(28,25,23,.55); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.sheet { position: relative; background: var(--panel); border-radius: 14px; width: min(860px, 100%); max-height: 92vh; overflow-y: auto; padding: 18px 20px; }
.sheet.narrow { width: min(460px, 100%); }
.close { position: absolute; right: 10px; top: 6px; border: 0; background: none; font-size: 26px; color: var(--muted); }
.d-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.d-pics svg { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; display: block; }
.d-match { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.d-match td { border-top: 1px solid var(--line); padding: 6px 4px; }
.d-match td:first-child { width: 2em; text-align: center; font-weight: 700; }
.d-title { font: 900 20px var(--display); margin: 0; }
.d-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.d-acts button { border-radius: 10px; padding: 9px 14px; font-weight: 700; }
.primary { border: 0; background: var(--accent); color: #fff; }
.r-price { font: 900 22px var(--display); color: var(--accent); margin: 8px 0; }
.r-list { margin: 6px 0; padding-left: 1.2em; font-size: 13.5px; }
.fine { font-size: 12px; color: var(--muted); }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 55% 45%; }
  .mapwrap { order: -1; }
  .d-pics { grid-template-columns: 1fr; }
}
button:focus-visible, textarea:focus-visible, .item:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
