:root {
  --bg: #f6f5f2;
  --panel: #ffffff;
  --text: #1d1f22;
  --muted: #6b7078;
  --line: #e4e2dd;
  --accent: #e8590c;
  --accent-soft: #fff1e8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--text);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html.busy, html.busy * { cursor: progress !important; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { display: flex; overflow: hidden; }

#panel {
  width: 340px;
  flex: none;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 18px 18px 32px;
}

h1 { font-size: 18px; margin: 0 0 16px; letter-spacing: -0.01em; }
h1.brand { display: flex; align-items: center; gap: 9px; font-size: 22px; margin: 0; letter-spacing: -0.02em; }
h1.brand img { flex: none; }
h1.brand b { color: var(--accent); }
.tagline { margin: 2px 0 16px 39px; color: var(--muted); font-size: 12px; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 22px 0 8px; font-weight: 600; }

label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.row { display: flex; gap: 8px; }
input {
  flex: 1; min-width: 0;
  font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button {
  font: inherit; cursor: pointer; border-radius: 8px;
  padding: 8px 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
form button { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
form button:disabled { opacity: 0.6; cursor: wait; }

.locate {
  width: 100%; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--accent); border-color: var(--accent); font-weight: 600;
}
.locate:disabled { opacity: 0.6; cursor: wait; }
#locate-result { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#locate-result .head { padding: 10px 12px; background: var(--bg); font-size: 12px; color: var(--muted); }
#locate-result .cand {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 10px 12px; background: var(--panel);
}
#locate-result .cand:hover { background: var(--accent-soft); }
#locate-result .cand.main { background: var(--accent-soft); }
#locate-result .cand div { flex: 1; min-width: 0; }
#locate-result .cand b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#locate-result .cand small { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
#locate-result .cand em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#locate-result .cand.main em { color: var(--accent); font-weight: 600; }

#rc-form .search { position: relative; }
#rc { font-family: inherit; font-size: 14px; }
#suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 10; margin: 0; padding: 4px; list-style: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  max-height: 320px; overflow-y: auto;
}
#suggest li { padding: 8px 10px; border-radius: 7px; cursor: pointer; }
#suggest li b { display: block; font-size: 13px; font-weight: 600; }
#suggest li small { color: var(--muted); font-size: 12px; }
#suggest li.active, #suggest li:hover { background: var(--accent-soft); }
#suggest li.street b { font-weight: 500; }
#suggest li.rc b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.status { color: var(--muted); font-size: 13px; min-height: 18px; margin: 10px 0 0; }
.status.error { color: #c92a2a; }

.address { font-size: 15px; font-weight: 600; margin: 18px 0 2px; }
.sub { color: var(--muted); font-size: 13px; }

dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.stat { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.stat b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
td:last-child { text-align: right; }
tr { cursor: default; }
table.bounds tr.multi { cursor: pointer; }
table.bounds .chev { display: inline-block; width: 12px; color: var(--muted); transition: transform 0.15s; }
table.bounds tr.open .chev { transform: rotate(90deg); }
table.bounds tr.detail td { text-align: left; color: var(--muted); font-size: 12px; padding: 4px 4px 8px 16px; line-height: 1.5; background: var(--bg); }
tr:hover td, tr.hl td { background: var(--accent-soft); }
.note { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 10px; }
a { color: var(--accent); }

#houses .rules { margin: 16px 0 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
#houses .rules summary { font-weight: 600; font-size: 13px; cursor: pointer; }
#houses .rules summary small { display: block; margin: 2px 0 0 16px; font-weight: 400; font-size: 12px; color: var(--muted); }
#houses .rules summary small:empty { display: none; }
#houses .plan-ctx .plan-line { margin: 10px 0 0; font-size: 13px; line-height: 1.45; }
#houses .plan-ctx .zone { display: block; margin: 10px 0 0; font-size: 12px; }
#houses .plan-ctx select { width: 100%; margin-top: 4px; }
#houses .rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
#houses .rule-grid label { margin: 0; font-size: 12px; }
#houses .rule-grid span { display: flex; align-items: center; gap: 6px; color: var(--muted); margin-top: 4px; }
#houses .rule-grid input { width: 72px; flex: none; padding: 5px 8px; font-family: inherit; }
#houses .only-ok { display: flex; align-items: center; gap: 6px; margin: 8px 0 2px; color: var(--text); font-size: 13px; }
#houses .model small b.price { color: var(--text); font-weight: 600; }
#houses .model i.no { color: #c92a2a; background: #fff5f5; }
#houses .house-stats dt small { display: block; color: var(--muted); font-size: 11px; }
#houses .house-stats dd.ok { color: #2b8a3e; }
#houses .house-stats dd.ko { color: #c92a2a; font-weight: 600; }
#houses .cat-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
#houses .cat-tools input { flex: 1 1 100%; }
#houses .cat-tools select { flex: 1; height: 32px; }
#houses .cat-tools input { font-family: inherit; font-size: 13px; padding: 7px 9px; }
#houses .cat-tools select { font: inherit; font-size: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 0 4px; }
#houses .count { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
#houses .models.list { display: flex; flex-direction: column; gap: 4px; max-height: 330px; overflow-y: auto; padding-right: 2px; }
#houses .models.list .model { display: flex; gap: 10px; align-items: center; padding: 6px; }
#houses .model img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--line); flex: none; }
#houses .model .txt { min-width: 0; }
#houses .model i { font-style: normal; font-size: 10px; font-weight: 700; color: #2b8a3e; background: #ebfbee; padding: 1px 5px; border-radius: 4px; margin-left: 4px; vertical-align: 1px; }
#gallery {
  position: absolute; inset: 0; z-index: 5; background: rgba(12, 14, 16, 0.94); color: #fff;
  display: flex; flex-direction: column;
}
#gallery header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
#gallery header div { flex: 1; min-width: 0; }
#gallery header b { font-size: 16px; display: block; }
#gallery header span { color: #adb5bd; font-size: 12px; }
#gallery header a { color: #ffa94d; font-size: 13px; }
#gallery header button { background: rgba(255,255,255,0.12); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; padding: 0; }
#gallery .stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: 0 64px; }
#gallery .stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
#gallery .nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.14); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; padding: 0; }
#gallery .prev { left: 12px; } #gallery .next { right: 12px; }
#gallery .thumbs { display: flex; gap: 8px; padding: 12px 18px 18px; overflow-x: auto; justify-content: center; }
#gallery .thumbs img { width: 92px; height: 58px; object-fit: cover; border-radius: 6px; opacity: 0.5; cursor: pointer; flex: none; border: 2px solid transparent; }
#gallery .thumbs img.on { opacity: 1; border-color: #ffa94d; }
#houses .models { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#houses .model { text-align: left; padding: 10px 12px; border-radius: 10px; background: var(--bg); border-color: transparent; }
#houses .model.active { border-color: var(--accent); background: var(--accent-soft); }
#houses .model b { display: block; font-size: 14px; }
#houses .model span, #houses .model small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
#houses .house { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
#houses .house-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 10px; }
#houses .house-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; cursor: zoom-in; background: var(--line); }
#houses .house-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
#houses .house-head b { display: block; font-size: 15px; }
#houses .house-head span { color: var(--muted); font-size: 12px; }
#houses .house-head a { font-size: 12px; white-space: nowrap; }
.verdict { margin: 10px 0; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 13px; }
.verdict.good { background: #ebfbee; color: #2b8a3e; }
.verdict.warn { background: #fff4e6; color: #d9480f; }
.verdict.bad { background: #fff5f5; color: #c92a2a; }
#houses .rotate { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
#houses .rotate span { color: var(--muted); }
#houses .rotate button { padding: 5px 8px; font-size: 12px; }
#houses .rotate input { flex: 1 1 100%; accent-color: var(--accent); }
#houses .house-actions { display: flex; gap: 8px; margin-top: 10px; }
#houses .house-actions button { flex: 1; }
#houses .house-actions .best { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

#viewport { position: relative; flex: 1; min-width: 0; }
#viewport canvas { display: block; }
#empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); padding: 24px; text-align: center;
}
#empty .hero { max-width: 460px; }
#empty h2 { margin: 0 0 12px; font-size: clamp(32px, 5vw, 46px); line-height: 1.08; letter-spacing: -0.03em; text-transform: none; font-weight: 800; color: var(--text); }
#empty h2 span { white-space: nowrap; }
#empty h2 b { color: var(--accent); }
#empty .lead { margin: 0 0 22px; font-size: 17px; color: var(--text); }
#empty p { margin: 0; font-size: 14px; }

#toolbar {
  position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; z-index: 2;
}
.group { display: flex; background: rgba(255,255,255,0.92); border-radius: 10px; padding: 3px; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.group button { border: 0; background: transparent; padding: 6px 11px; border-radius: 7px; font-size: 13px; }
.group button.active { background: var(--text); color: #fff; }
.group button.loading::after { content: "…"; }
.group button svg { vertical-align: -2px; margin-right: 3px; }

#sunbar { flex-basis: 100%; }
#sunbar .card {
  max-width: 440px; background: rgba(255,255,255,0.95); border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15); display: flex; flex-direction: column; gap: 8px;
}
#sunbar .days { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
#sunbar .days button { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 10px; font-size: 12px; }
#sunbar .days button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
#sunbar input[type="date"] { font: inherit; font-size: 12px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; margin-left: auto; }
#sunbar .time { display: flex; align-items: center; gap: 10px; }
#sunbar .play {
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; font-size: 12px;
  background: var(--accent); color: #fff;
}
#sun-time {
  flex: 1; min-width: 0; accent-color: var(--accent);
  /* night | daylight | night along the track */
  --rise: 30%; --set: 75%;
  -webkit-appearance: none; appearance: none; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #39465a var(--rise), #ffd27a var(--rise), #ffb347 50%, #ffd27a var(--set), #39465a var(--set));
}
#sun-time::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--accent);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3); cursor: grab;
}
#sun-time::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
#sun-clock { flex: none; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
#sun-info { margin: 0; font-size: 12px; line-height: 1.45; }
#sun-info span { color: var(--muted); }

#credits {
  position: absolute; right: 6px; bottom: 2px; z-index: 2; font-size: 10px; color: #3b3f45;
  background: rgba(255,255,255,0.7); padding: 1px 6px; border-radius: 4px; pointer-events: none;
}
#legal { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.5; color: var(--muted); }
#legal p { margin: 0 0 8px; }
#legal a { color: inherit; }

#compass {
  position: absolute; right: 18px; bottom: 24px; width: 54px; height: 54px; z-index: 2;
  border-radius: 50%; background: rgba(255,255,255,0.92); box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
#compass .needle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
#compass i { width: 0; height: 0; border: 6px solid transparent; border-bottom: 9px solid var(--accent); border-top: 0; }
#compass span { font-weight: 700; font-size: 13px; color: var(--accent); line-height: 1; margin-top: 2px; }

#readout {
  position: absolute; left: 18px; bottom: 18px; z-index: 2;
  background: rgba(29,31,34,0.85); color: #fff; border-radius: 8px; padding: 6px 10px;
  font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none;
}

.lbl {
  font-size: 11px; font-weight: 600; color: #fff; background: rgba(29,31,34,0.78);
  padding: 2px 6px; border-radius: 5px; white-space: nowrap; font-variant-numeric: tabular-nums;
  transition: background 0.15s;
}
.lbl.hl { background: var(--accent); }
.lbl-b { background: var(--accent); }
.lbl-p { background: #1c7ed6; }
.lbl-ok { background: #2f9e44; }
.lbl-bad { background: #e03131; }
.lbl-n { font-size: 16px; font-weight: 800; color: var(--accent); background: none; text-shadow: 0 0 4px #fff, 0 0 8px #fff; }

.you {
  width: 14px; height: 14px; border-radius: 50%; background: #1c7ed6; border: 2.5px solid #fff;
  box-shadow: 0 0 0 0 rgba(28,126,214,0.6); animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 14px rgba(28,126,214,0); } 100% { box-shadow: 0 0 0 0 rgba(28,126,214,0); } }

#actions {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 10px;
}
#photos-btn {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px;
  background: var(--panel); border: 0; color: var(--text); font-size: 15px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); white-space: nowrap;
}
#loading {
  position: absolute; inset: 0; z-index: 4; display: grid; place-items: center;
  background: rgba(246, 245, 242, 0.55); backdrop-filter: blur(1px);
}
#loading span { display: flex; align-items: center; gap: 12px; background: var(--panel); padding: 14px 20px; border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,0.12); font-weight: 600; }
#loading span::before { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
#toast {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 6; max-width: min(520px, calc(100% - 32px));
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45;
  background: #fff5f5; color: #c92a2a; border: 1px solid #ffc9c9; box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
#toast.info { background: var(--panel); color: var(--text); border-color: var(--line); }
#toast div { flex: 1; }
#toast button { flex: none; padding: 4px 10px; font-size: 12px; }
#toast .x { border: 0; background: none; font-size: 16px; padding: 0 2px; color: inherit; }
#virt-btn {
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  background: var(--accent); border: 0; color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(232, 89, 12, 0.45);
}
#virt-btn.on { background: var(--text); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
#houses .virt {
  width: 100%; margin-top: 12px; padding: 11px; border-radius: 10px; font-weight: 700; font-size: 14px;
  background: var(--text); border-color: var(--text); color: #fff;
}
#houses .virt.on { background: var(--panel); color: var(--text); border-color: var(--line); }

#bcard {
  position: absolute; top: 64px; right: 14px; width: 290px; max-height: calc(100% - 150px); overflow-y: auto; z-index: 3;
  background: var(--panel); border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
#bcard.left { right: auto; left: 14px; }
#bcard .photo { aspect-ratio: 4 / 3; background: var(--bg); overflow: hidden; border-radius: 12px 12px 0 0; }
#bcard .photo.loading { display: grid; place-items: center; }
#bcard .photo.loading::after {
  content: ""; width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#bcard .photo canvas { display: block; width: 100%; height: 100%; }
#bcard .body { padding: 12px 14px 14px; }
#bcard .title { display: flex; align-items: flex-start; gap: 8px; }
#bcard .title div { flex: 1; min-width: 0; }
#bcard .title b { display: block; font-size: 15px; }
#bcard .title small { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
#bcard .close { border: 0; background: var(--bg); width: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 16px; line-height: 1; }
#bcard .stats { margin-top: 12px; }
#bcard .stat b { font-size: 16px; }
#bcard dl { margin-top: 12px; }
#bcard .sub { margin: 6px 0 0; }
#bcard table { font-size: 13px; }
#bcard .import { width: 100%; margin-top: 14px; background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
#bcard .own { margin-top: 10px; font-size: 12px; color: var(--accent); font-weight: 600; }

/* phones: viewer on top, panel below */
@media (max-width: 760px) {
  body { flex-direction: column-reverse; }
  #panel { width: 100%; min-width: 0; min-height: 0; overflow-x: hidden; flex: 1; border-right: 0; border-top: 1px solid var(--line); padding: 14px 16px 24px; }
  #viewport { flex: none; height: 55vh; }
  h1 { margin-bottom: 10px; }
  #toolbar { top: 10px; left: 10px; right: 10px; gap: 6px; }
  .group button { padding: 6px 8px; font-size: 12px; }
  #compass { width: 44px; height: 44px; right: 12px; bottom: 20px; }
  #readout { left: 12px; bottom: 20px; }
  #actions { bottom: 20px; }
  #sunbar .card { max-width: none; padding: 8px 10px; }
  #sunbar input[type="date"] { margin-left: 0; flex: 1 1 100px; min-width: 0; }
  #sunbar .days button { padding: 4px 8px; }
  #sun-info span { display: none; } /* sunrise/sunset: the slider's colours already show them */
  #credits { left: 0; right: 0; bottom: 0; border-radius: 0; text-align: center; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #photos-btn span { display: none; }
  #gallery .stage { padding: 0 8px; }
  #bcard, #bcard.left { top: auto; bottom: 10px; left: 10px; right: 10px; width: auto; max-height: 70%; }
  #bcard .photo { aspect-ratio: 16 / 7; }
}

/* manufacturers: chips with their access status, and the access form for locked ones */
#houses .maker-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#houses .maker { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); }
#houses .maker .ico { display: inline-flex; }
#houses .maker small { font-size: 10.5px; color: var(--muted); background: #fff; border-radius: 999px; padding: 0 6px; }
#houses .maker.public .ico { color: #2b8a3e; }
#houses .maker.unlocked .ico { color: var(--accent); }
#houses .maker.locked { color: var(--muted); }
#houses .maker.locked .ico { color: #a3a7ad; }
#houses .maker.active { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
#houses .maker-login { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: #fafaf8; font-size: 13px; line-height: 1.45; }
#houses .maker-login p { margin: 0 0 8px; }
#houses .maker-login .title { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); }
#houses .maker-login .muted { color: var(--muted); font-size: 12px; }
#houses .maker-login form { display: grid; gap: 6px; }
#houses .maker-login .row { display: flex; gap: 6px; }
#houses .maker-login .row button { flex: 1; }
#houses .maker-login button[type=submit] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
#houses .maker-login .err { color: #c92a2a; font-size: 12px; margin: 0; }
#houses .maker-login .err:empty { display: none; }
#houses .maker-me { font-size: 12px; color: var(--muted); margin: -4px 0 10px; }
#houses .link { border: 0; background: none; padding: 0; color: var(--accent); font-size: inherit; text-decoration: underline; cursor: pointer; }
#houses .maker-login input { font-family: inherit; flex: none; }
#houses .maker-login .cancel { background: var(--panel); border-color: var(--line); color: var(--text); font-weight: 500; }

/* risks and legal constraints of the plot */
#houses .risks .risk-sum.ok { color: #2b8a3e; }
#houses .risks .risk-sum.mid { color: #b35c00; }
#houses .risks .risk-sum.high { color: #c92a2a; }
#houses .risks ul { list-style: none; margin: 10px 0 6px; padding: 0; display: grid; gap: 8px; }
#houses .risks li { position: relative; padding-left: 18px; font-size: 12.5px; line-height: 1.4; }
#houses .risks li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #adb5bd; }
#houses .risks li.ok::before { background: #2b8a3e; }
#houses .risks li.low::before { background: #f59f00; }
#houses .risks li.mid::before { background: #e8590c; }
#houses .risks li.high::before { background: #c92a2a; }
#houses .risks li b { display: block; font-size: 12.5px; }
#houses .risks li span { color: var(--muted); }

/* own design: piece-by-piece editor */
#houses .designer { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 10px; margin: 14px 0; }
#houses .designer h3 { font-size: 12.5px; margin: 14px 0 6px; }
#houses .designer h3 small { color: var(--muted); font-weight: 400; }
#houses .d-add, #houses .d-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
#houses .d-add button, #houses .d-row button { flex: 1 1 auto; font-size: 12.5px; padding: 6px 8px; }
#houses .d-add button { border-color: var(--accent); color: var(--accent); font-weight: 600; }
#houses .d-list, #houses .d-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
#houses .d-item, #houses .d-vol { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: var(--bg); }
#houses .d-item.active, #houses .d-vol.active { border-color: var(--accent); background: var(--accent-soft); }
#houses .d-item.bad { color: #c92a2a; }
#houses .d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 10px; }
#houses .d-grid label { font-size: 11.5px; margin: 0; }
#houses .d-grid label.wide { grid-column: 1 / -1; }
#houses .d-grid label span { display: flex; align-items: center; gap: 4px; color: var(--muted); }
#houses .d-grid input, #houses .d-grid select { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 13px; padding: 6px 8px; margin-top: 3px; }
#houses .d-grid input[type=range] { padding: 0; accent-color: var(--accent); }
#houses .d-grid label.check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); }
#houses .d-grid label.check input { width: auto; margin: 0; }
#houses .d-open { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
#houses .d-o { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 4px; padding: 6px; border-radius: 8px; background: var(--bg); }
#houses .d-o.off { opacity: 0.45; }
#houses .d-o label { display: flex; flex-direction: column; font-size: 10.5px; color: var(--muted); margin: 0; }
#houses .d-o label:last-of-type { grid-column: span 2; }
#houses .d-o select, #houses .d-o input { width: 100%; min-width: 0; box-sizing: border-box; font-family: inherit; font-size: 12px; padding: 4px 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
#houses .d-o .x { padding: 0 6px; border: 0; background: none; color: var(--muted); font-size: 16px; }
#houses .d-foot { border-top: 1px solid var(--line); padding-top: 8px; }
#houses .designer .danger { color: #c92a2a; }
#houses .d-report { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
#houses .d-report li::before { content: "✓ "; color: #2b8a3e; font-weight: 700; }
#houses .d-report li.bad::before { content: "✗ "; color: #c92a2a; }
#houses .d-report li.info::before { content: ""; }
#houses .d-report li b { color: var(--text); font-weight: 600; }

/* own pieces in the 3D card: what it is, its state and what can be done with it */
#bcard .own-lines { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; line-height: 1.5; }
#bcard .own-lines .ok { color: #2b8a3e; }
#bcard .own-lines .bad { color: #c92a2a; }
#bcard .own-lines .note { color: var(--muted); font-size: 12px; }
#bcard .own-actions { display: flex; gap: 8px; margin-top: 12px; }
#bcard .own-actions button { flex: 1; }
#bcard .danger, #bcard .del { color: #c92a2a; border-color: #ffc9c9; background: #fff5f5; font-weight: 600; }
#bcard .del { width: 100%; margin-top: 12px; }

/* "¿Qué quieres hacer ahora?" */
#houses .next { margin-top: 18px; display: grid; gap: 8px; }
#houses .next h2 { margin: 0 0 2px; }
#houses .next .choice {
  display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); cursor: pointer;
}
#houses .next .choice:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
#houses .next .choice b { display: block; font-size: 14px; }
#houses .next .choice span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.4; }
#houses .next .choice:disabled { opacity: 0.55; cursor: default; }
#houses .next .back { justify-self: start; border: 0; background: none; padding: 2px 0; color: var(--muted); font-size: 12px; }
#houses .next .crumb { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
#houses .next .crumb b { color: var(--text); }
#houses .next .crumb button { padding: 4px 10px; font-size: 12px; }

#locate-result .picked { cursor: default; }
#locate-result .picked:hover { background: var(--accent-soft); }
#locate-result .picked .built { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
#locate-result .picked .built em { font-style: normal; color: var(--accent); font-weight: 600; }
#houses .next .crumb-extra { display: flex; flex-wrap: wrap; gap: 4px 14px; }
#houses .next .link { border: 0; background: none; padding: 2px 0; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; }
