/* heydave.bot/home/house: the house tour and inventory. Builds on home.css. */
.house [hidden] { display: none !important; }
.brand.back { color: var(--fg); text-decoration: none; }
.house > section { max-width: 40rem; margin: 0 auto; }
.house h1 { margin: 0.2rem 0 0.2rem; font-size: 1.6rem; letter-spacing: -0.01em; }
.house-head, .room-head { margin: 0.2rem 0 1rem; }

.tips summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.tips ol { margin: 0.7rem 0 0.4rem; padding-left: 1.2rem; color: var(--fg); }
.tips li { margin: 0 0 0.45rem; }

.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.7rem; margin: 0 0 0.9rem; }
.room-card {
  display: flex; flex-direction: column; gap: 0.25rem; text-align: left; width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 0.9rem; color: var(--fg); font: inherit; cursor: pointer;
}
.room-card:active { transform: scale(0.98); }
.room-card .name { font-weight: 700; font-size: 1.05rem; }
.room-card .meta { color: var(--muted); font-size: 0.85rem; }
.badge-pill { align-self: flex-start; margin-top: 0.3rem; font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; background: rgba(126, 249, 255, 0.12); color: var(--accent); }
.badge-pill.reading { background: rgba(255, 211, 126, 0.14); color: var(--warm); }
.badge-pill.error { background: rgba(255, 126, 126, 0.14); color: var(--urgent); }

.row { display: flex; gap: 0.5rem; align-items: center; }
.row input { flex: 1; min-width: 0; }
input, textarea, select {
  font: inherit; color: var(--fg); background: rgba(232, 246, 255, 0.06); border: 1px solid var(--line);
  border-radius: 0.7rem; padding: 0.6rem 0.75rem; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(126, 249, 255, 0.45); outline-offset: 1px; }
textarea { resize: vertical; margin: 0.6rem 0 0; }
button, .file-btn { font: inherit; cursor: pointer; border-radius: 999px; padding: 0.6rem 1rem; border: 1px solid var(--line); white-space: nowrap; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.ghost { background: transparent; color: var(--fg); }
.file-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.7rem; }
.chips button { padding: 0.35rem 0.75rem; font-size: 0.88rem; background: rgba(232, 246, 255, 0.06); color: var(--fg); }
.export { text-align: center; margin: 0.4rem 0 1.4rem; }
.back-btn { margin: 0 0 0.6rem; padding: 0.4rem 0.8rem; font-size: 0.9rem; }

.dave-asks { border-color: rgba(126, 249, 255, 0.35); background: rgba(126, 249, 255, 0.06); }
.dave-says { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; margin: 0 0 0.4rem; }
.dave-asks li { padding: 0.3rem 0 0.3rem 1rem; position: relative; }
.dave-asks li::before { content: ''; position: absolute; left: 0; top: 0.85em; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--accent); }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: 0.4rem; margin: 0 0 0.7rem; }
.photos:empty { display: none; }
.photo { position: relative; aspect-ratio: 1; border-radius: 0.6rem; overflow: hidden; background: rgba(232, 246, 255, 0.06); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.new::after { content: 'new'; position: absolute; top: 4px; left: 4px; font-size: 0.65rem; font-weight: 700; padding: 0.05rem 0.35rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.photo button { position: absolute; top: 3px; right: 3px; width: 1.6rem; height: 1.6rem; padding: 0; border-radius: 50%; background: rgba(5, 7, 10, 0.7); color: var(--fg); font-size: 0.8rem; border: 0; }
.photo.uploading img { opacity: 0.45; }
.capture { margin: 0.2rem 0 0.2rem; }
.read { display: block; width: 100%; margin: 0.8rem 0 0; padding: 0.85rem; font-weight: 700; font-size: 1rem; background: var(--accent); color: var(--accent-ink); border: 0; }
.read:disabled { opacity: 0.35; cursor: default; }
.reading { display: flex; align-items: center; gap: 0.5rem; color: var(--warm); }
.reading .mini-face i { animation: think 1.2s ease-in-out infinite; }

.category h2 { margin-top: 0; }
.inv-item { padding: 0.75rem 0; border-top: 1px solid var(--line); cursor: pointer; }
.inv-item:first-of-type { border-top: 0; }
.inv-item .title { font-weight: 650; }
.inv-item .detail { color: var(--muted); font-size: 0.88rem; margin-top: 0.1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.tag { font-size: 0.72rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: rgba(232, 246, 255, 0.08); color: var(--muted); }
.tag.gas { background: rgba(255, 158, 94, 0.15); color: var(--clash); }
.tag.poor { background: rgba(255, 126, 126, 0.14); color: var(--urgent); }
.tag.value { background: rgba(255, 211, 126, 0.12); color: var(--warm); }
.edit { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; margin-top: 0.6rem; cursor: default; }
.edit label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.78rem; color: var(--muted); }
.edit .wide { grid-column: 1 / -1; }
.edit .actions { grid-column: 1 / -1; display: flex; gap: 0.5rem; justify-content: space-between; margin-top: 0.2rem; }
.danger-link { display: block; margin: 1.5rem auto 2rem; background: none; border: 0; color: var(--urgent); font-size: 0.9rem; }
.danger { background: transparent; color: var(--urgent); border-color: rgba(255, 126, 126, 0.4); }

/* Floor plans */
.plan-list { display: grid; gap: 0.6rem; margin: 0 0 0.7rem; }
.plan-list:empty { display: none; }
.plan { display: flex; gap: 0.8rem; align-items: center; }
.plan .thumb { flex: none; width: 4.6rem; height: 4.6rem; border-radius: 0.6rem; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--accent-ink); font-weight: 800; text-decoration: none; }
.plan .thumb img { width: 100%; height: 100%; object-fit: contain; }
.plan .info { flex: 1; min-width: 0; }
.plan .info .title { font-weight: 700; }
.plan .info .detail { color: var(--muted); font-size: 0.86rem; }
.plan .x { background: none; border: 0; color: var(--muted); padding: 0.3rem; }
.room-card .unvisited { color: var(--warm); font-size: 0.8rem; }

/* The house in 3D */
.model-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.model-head h2 { margin: 0; }
.floors { margin: 0; }
.floors button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.model { position: relative; height: min(62vh, 30rem); margin: 0.7rem -0.4rem 0.5rem; border-radius: 0.9rem; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #102028 0%, #05070a 75%); touch-action: none; }
.model:fullscreen { height: 100%; margin: 0; border-radius: 0; }
.model canvas { display: block; }
.model-labels { position: absolute; inset: 0; }
.model-tag {
  font: inherit; font-size: 0.72rem; font-weight: 650; line-height: 1.25; text-align: center; white-space: nowrap; cursor: pointer;
  padding: 0.2rem 0.5rem; border-radius: 999px; border: 1px solid rgba(232, 246, 255, 0.18); background: rgba(5, 7, 10, 0.72); color: var(--fg);
  backdrop-filter: blur(3px); pointer-events: auto;
}
.model-tag.notToured { color: var(--muted); }
.model-tag.attention { border-color: rgba(255, 211, 126, 0.6); color: var(--warm); }
.model-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.legend { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--muted); }
.legend i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; margin-left: 0.35rem; }
.legend i.toured { background: #1d5a63; }
.legend i.notToured { background: #2a313a; border: 1px solid rgba(232, 246, 255, 0.2); }
.legend i.attention { background: #7a4a16; }
.small-btn { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
