/* Baltz Street: The panel (slide-up on phones): lists, house view, forms, components. */

/* ---------------- Icon buttons ---------------- */

.icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper-2);
  display: grid;
  place-items: center;
  flex: none;
}

.icon:hover {
  background: var(--line);
}

.ib {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
  text-decoration: none;
}

.ib:hover {
  background: var(--paper-2);
}

.x {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 0;
}

.x svg {
  display: block;
}

.x:hover {
  color: var(--danger);
}

/* ---------------- Text buttons and links ---------------- */

.txtlink {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  padding: 6px 0;
}

.txtbtn {
  font-weight: 600;
  color: var(--accent);
  padding: calc(10px + var(--nudge)) 4px calc(10px - var(--nudge));
  flex: none;
}

.txtbtn.strong {
  background: var(--accent);
  color: var(--accent-ink);
  padding: calc(10px + var(--nudge)) 16px calc(10px - var(--nudge));
  border-radius: 99px;
}

.txtbtn[disabled] {
  opacity: 0.5;
  cursor: default;
}

.allbtn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 22px;
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 600;
  flex: none;
}

.allbtn span {
  padding-top: var(--nudge);
}

.allbtn:hover {
  background: var(--line);
}

/* ---------------- Pills ---------------- */

.pill {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  padding: calc(6px + var(--nudge)) 12px calc(6px - var(--nudge));
  border-radius: 99px;
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pill:hover {
  background: var(--line);
}

.pill.acc {
  background: var(--accent);
  color: var(--accent-ink);
}

.pill.danger {
  color: var(--danger);
}

.pill.danger-fill {
  background: var(--danger);
  color: var(--danger-ink);
}

/* ---------------- Buttons ---------------- */

.btn {
  font-weight: 600;
  padding: calc(12px + var(--nudge)) 16px calc(12px - var(--nudge));
  border-radius: 12px;
  background: var(--paper-2);
}

.btn:hover {
  background: var(--line);
}

.btn.acc {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn.danger {
  color: var(--danger);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

.btn.wide {
  width: 100%;
}

/* ---------------- Tags and dots ---------------- */

.tag {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--muted);
  background: var(--paper-2);
  padding: calc(2px + var(--nudge)) 8px calc(2px - var(--nudge));
  border-radius: 99px;
}

.tag.me {
  background: var(--mark);
  color: var(--mark-ink);
}

.tag.new {
  background: var(--accent);
  color: var(--accent-ink);
}

.tag.bd {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tag.ok {
  background: var(--accent-soft);
  color: var(--accent);
}

.mine-dot.new-dot {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
}

.fdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  margin-right: 8px;
}

.ndot {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.udot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------------- Segmented control ---------------- */
/* one choice out of a few: Updates tabs, sign-in method, theme, demo view */
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--paper-2);
  align-self: stretch;
}

.seg button {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.seg button[aria-selected="true"],
.seg button[aria-checked="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ---------------- Screen-reader-only text ---------------- */

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------- Panel shell ---------------- */

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  height: calc(100% - env(safe-area-inset-top, 0px) - 32px);
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.25, 1);
  will-change: transform;
  touch-action: none;
}

.sheet-head {
  flex: none;
  padding-top: 8px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: 8px;
  cursor: grab;
  touch-action: none;
}

.grab {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  margin: 0 auto 8px;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 32px);
}

.sheet-body.hasfoot {
  display: flex;
  flex-direction: column;
  padding-bottom: 0 !important;
}

.sheet-body.isform {
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
}

.hview {
  flex: none;
}

.sheet-foot {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 24px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, var(--paper) 16px);
}

.sheet-foot .btn {
  width: 100%;
}

/* ---------------- Panel header ---------------- */

.headrow {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
}

.headrow .icon {
  margin-left: auto;
}

/* main list: the big title hands off to a small one in the header as you scroll; search sticks under the header */

.mini-title {
  flex: 1;
  min-width: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  line-height: 28px;
  padding-top: var(--nudge);
  opacity: 0;
  transform: translateY(8px);
  will-change: opacity, transform;
}

.sbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--paper);
  padding-bottom: 8px;
  margin-inline: -16px;
  padding-inline: 16px;
}

.sbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 24px;
  background: linear-gradient(var(--paper), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.sbar.stuck::after {
  opacity: 1;
}

#hTop h1 {
  will-change: opacity, transform;
  transform-origin: left bottom;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.titlebar .tt {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.titlebar .tt b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  display: block;
}

.titlebar .tt span {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  display: block;
}

/* ---------------- Search ---------------- */

.search {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-2);
  border-radius: 12px;
  padding: 0 12px;
  height: 48px;
  box-shadow: inset 0 0 0 1px transparent;
}

.search[hidden] {
  display: none;
}

.search:focus-within {
  box-shadow: inset 0 0 0 1.5px var(--accent);
  background: var(--paper);
}

.search svg {
  flex: none;
  color: var(--muted);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  background: none;
  outline: none;
  font-size: 16px;
  line-height: 24px;
  height: 100%;
}

.search input::placeholder {
  color: var(--muted);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}

.search .clear {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

/* ---------------- Activity feed ---------------- */

.feed {
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
}

.frow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  text-align: left;
  width: 100%;
}

.frow + .frow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: color-mix(in srgb, var(--line) 60%, transparent);
}

.frow .face {
  width: 32px;
  height: 32px;
  flex: none;
  box-shadow: none;
  font-size: 12px;
}

.fmain {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ftext {
  font-size: 14px;
  line-height: 20px;
}

.ftext b {
  font-weight: 700;
}

.fmain small {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.frow:hover .ftext b {
  text-decoration: underline;
}

/* ---------------- Updates pill ---------------- */

.npill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.npill span {
  padding-top: var(--nudge);
}

.npill svg:first-child {
  color: var(--ink);
  flex: none;
  transition: color 0.3s;
  transform-origin: 50% 12%;
}

.npill.add {
  box-shadow:
    var(--shadow-sm),
    inset 0 0 0 1px var(--lot-empty-edge);
  color: var(--muted);
  padding: 0 16px 0 12px;
}

.npill.add svg {
  color: var(--muted);
}

.npill.ring svg:first-child {
  color: var(--accent);
  animation: bellShake 2.6s ease-in-out infinite;
}

@keyframes bellShake {
  0%,
  48%,
  100% {
    transform: rotate(0);
  }
  6% {
    transform: rotate(16deg);
  }
  12% {
    transform: rotate(-14deg);
  }
  18% {
    transform: rotate(10deg);
  }
  24% {
    transform: rotate(-8deg);
  }
  30% {
    transform: rotate(4deg);
  }
  36% {
    transform: rotate(-2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .npill.ring svg:first-child {
    animation: none;
  }
}

.npill .caret {
  color: var(--muted);
  flex: none;
  transition: transform 0.15s;
}

.npill.open .caret {
  transform: rotate(180deg);
}

/* ---------------- Urgent notice banner ---------------- */

.urgent {
  position: absolute;
  top: 100%;
  left: max(16px, env(safe-area-inset-left, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.urgent[hidden] {
  display: none;
}

.ubar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 16px;
  text-align: center;
  background: color-mix(in srgb, var(--mark) 72%, var(--paper));
  color: var(--mark-ink);
  box-shadow:
    var(--shadow-sm),
    inset 0 0 0 1.5px color-mix(in srgb, var(--mark-ink) 25%, transparent);
}

.uem {
  font-size: 20px;
  line-height: 24px;
  margin-right: 8px;
  vertical-align: -2px;
}

.ubar p {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding-top: var(--nudge);
}

/* ---------------- Updates dropdown ---------------- */

.nempty {
  margin: 0;
  padding: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  background: none !important;
}

.upanel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.upanel .feed {
  margin: 0;
  align-self: stretch;
}

.upanel .frow {
  padding: 8px;
  border-radius: 8px;
}

.ndrop {
  position: absolute;
  top: 100%;
  right: max(16px, env(safe-area-inset-right, 0px));
  margin-top: 8px;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100dvh - 120px);
  overflow: auto;
  background: var(--paper);
  border-radius: 16px;
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px var(--line);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  pointer-events: auto;
}

.ndrop[hidden] {
  display: none;
}

.ndrop p {
  margin: 0;
  align-self: stretch;
  background: var(--paper-2);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ndrop p.has-dot {
  position: relative;
  padding-right: 32px;
}

.ndrop p:has(.nem) {
  display: flex;
  gap: 8px;
}

.nem {
  flex: none;
}

.ntx {
  flex: 1;
  min-width: 0;
}

/* ---------------- Notice editor ---------------- */

.nblk {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.nblk + .nblk {
  padding-top: 12px;
}

.nblk + .nblk::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
}

.nblk-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.epick {
  flex: none;
}

.ecur {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 24px;
}

.egrid {
  display: grid;
  grid-template-columns: repeat(5, 40px);
  gap: 4px;
}

.eopt {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 24px;
}

.eopt:hover {
  background: var(--paper-2);
}

.eopt[aria-pressed="true"] {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.urg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  cursor: pointer;
}

.urg input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--lot-empty-edge);
  cursor: pointer;
  transition:
    background-color 0.12s,
    box-shadow 0.12s;
}

.urg input:hover {
  box-shadow: inset 0 0 0 1.5px var(--muted);
}

.urg input:checked {
  background: var(--accent) var(--chk) center/20px no-repeat;
  box-shadow: none;
}

.urg input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.urg:has(input:checked) span {
  color: var(--ink);
}

.nlist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nlist:empty {
  display: none;
}

.nblk textarea {
  flex: 1;
  min-width: 0;
  min-height: 80px;
  padding: 12px;
  resize: vertical;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  line-height: 24px;
}

.nblk textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
}

.nblk .x {
  margin-top: 4px;
  flex: none;
}

/* ---------------- Demo bar ---------------- */

.demobar {
  position: fixed;
  z-index: 40;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 16px;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px var(--line);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}

.demobar[hidden] {
  display: none;
}

.demobar b {
  font-weight: 700;
}

/* ---------------- Home: title and tip ---------------- */

.hero {
  padding: 0 0 16px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: 40px;
  line-height: 40px;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero .tally {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--ink);
}

.hero .tally b {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tipcard {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 8px 8px 16px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.tip-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.tip-main svg {
  flex: none;
  color: var(--accent);
}

.tip-main b {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 20px;
}

.tip-main small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

/* ---------------- Home: street list ---------------- */

.sec {
  font-size: 14px;
  line-height: 20px;
  font-weight: 800;
  color: var(--ink);
  margin: 24px 0 4px;
  padding-bottom: 8px;
  box-shadow: inset 0 -2px 0 var(--ink);
}

.rows {
  display: flex;
  flex-direction: column;
}

.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-radius: 12px;
  text-align: left;
  width: 100%;
}

.row:hover {
  background: var(--paper-2);
}

.row + .row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
}

.row:hover::before,
.row:hover + .row::before {
  opacity: 0;
}

.mini {
  width: 48px;
  height: 40px;
  border-radius: 4px;
  background: var(--lot);
  outline: 1.5px solid var(--lot-edge);
  outline-offset: -1.5px;
  display: grid;
  place-items: center;
  flex: none;
}

.mini.unk {
  background: var(--lot-empty);
  outline: 1.5px dashed var(--lot-empty-edge);
}

.mini span {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 12px;
  line-height: 16px;
  background: var(--plaque);
  color: var(--plaque-ink);
  padding: calc(2px + var(--nudge)) 4px calc(2px - var(--nudge));
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--lot-edge);
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-main b {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-main small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-main small mark {
  background: var(--accent-soft);
  color: inherit;
  border-radius: 4px;
  padding: 0 4px;
}

.row .tag {
  flex: none;
}

.row-main small .st {
  color: var(--muted);
}

.row-main b.dim {
  color: var(--muted);
  font-weight: 500;
}

.row-main small .st.ok {
  color: var(--accent);
  font-weight: 600;
}

.empty {
  color: var(--muted);
  padding: 24px 4px;
  text-align: center;
}

.empty b {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: 20px;
  line-height: 28px;
  margin-bottom: 4px;
}

/* ---------------- Pages: privacy, install ---------------- */

.page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}

.page-h {
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  line-height: 32px;
  margin: 0;
}

.lede {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.pts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.pts li {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  box-shadow: inset 0 -1px 0 var(--line);
}

.pts li b {
  font-weight: 700;
}

.pts li span {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------------- House ---------------- */

.nbrs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.nbrs .ib {
  flex: none;
}

.hhero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 8px 16px 0;
}

.hhero .nbrs {
  margin: 16px 0 0;
}

.hhero .num {
  font-family: var(--display);
  font-weight: 900;
  font-size: 52px;
  line-height: 48px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.hhero .grow {
  flex: 1;
  min-width: 0;
}

.bigdoor {
  margin-top: 6px;
  width: 48px;
  height: 80px;
  border-radius: 24px 24px 4px 4px;
  background: var(--door, var(--door-default));
  position: relative;
  flex: none;
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.18),
    0 0 0 4px var(--lot),
    0 0 0 5.5px var(--lot-edge);
}

.bigdoor::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 12px;
  height: 24px;
  border-radius: 12px 12px 2px 2px;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.bigdoor::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--knob);
  right: 8px;
  top: 44px;
}

.person {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  box-shadow: inset 0 1px 0 var(--line);
}

.person .face {
  width: 44px;
  height: 44px;
  font-size: 16px;
  line-height: 24px;
  box-shadow: none;
}

.pmain {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pname {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.pname b {
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}

.about {
  color: var(--ink);
  margin: 0;
}

/* ---------------- House: details ---------------- */

/* each detail: dim label, then the value; subtle divider between details; one text size (14/20) */

.kv {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
  font-size: 14px;
  line-height: 20px;
}

.kv + .kv {
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--line) 60%, transparent);
}

.kv .k {
  flex: none;
  width: 64px;
  color: var(--muted);
}

.kv .val {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  user-select: all;
  -webkit-user-select: all;
}

.kv .acts {
  display: flex;
  gap: 4px;
  flex: none;
}

/* long notes: label stays beside the first line */

.kv:not(:has(.acts)) {
  align-items: flex-start;
}

.kv .val.txt {
  font-family: var(--body);
  user-select: text;
}

.pacts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ---------------- House: cars ---------------- */

.vehicle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  box-shadow: inset 0 1px 0 var(--line);
}

.vehicle.hl {
  background: var(--accent-soft);
  border-radius: 12px;
  padding-inline: 12px;
}

.sec + .person,
.sec + .vehicle {
  box-shadow: none;
}

/* same car as the map (desktop orientation): 36×16, windshield right, rear window left */

.vcar {
  width: 36px;
  height: 16px;
  border-radius: 6px;
  background: var(--car);
  position: relative;
  flex: none;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.vcar::before {
  content: "";
  position: absolute;
  right: 7px;
  top: 3px;
  bottom: 3px;
  width: 8px;
  border-radius: 1px 3px 3px 1px;
  background: var(--win, rgba(20, 30, 40, 0.55));
}

.vcar::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  bottom: 3px;
  width: 5px;
  border-radius: 3px 1px 1px 3px;
  background: var(--win2, rgba(20, 30, 40, 0.45));
}

.vmain {
  flex: 1;
  min-width: 0;
}

.vmain b {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
}

.vmain small {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.plate {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  line-height: 20px;
  background: var(--plaque);
  color: var(--plaque-ink);
  border-radius: 4px;
  padding: 6px 8px 2px;
  box-shadow:
    inset 0 4px 0 var(--face),
    inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  flex: none;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

/* ---------------- House: notes, actions, pending invites ---------------- */

.note {
  background: var(--paper-2);
  border-radius: 12px;
  padding: 12px 16px;
  white-space: pre-wrap;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.pending {
  margin-top: 12px;
  border: 1.5px dashed var(--lot-empty-edge);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pending-h {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  color: var(--muted);
}

.pend-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pend-row .face.pend {
  width: 44px;
  height: 44px;
  font-size: 16px;
  line-height: 24px;
  box-shadow: none;
  flex: none;
}

.pend-main {
  flex: 1;
  min-width: 0;
}

.pend-main b {
  display: block;
  font-weight: 600;
}

.pend-main small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- Invites ---------------- */

.inv-tally {
  margin: 4px 0 16px;
}

.inv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding-top: 12px;
  box-shadow: inset 0 1px 0 var(--line);
}

.inv-main {
  min-width: 0;
}

.inv-main b {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
}

.inv-main small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-acts {
  grid-column: 1/-1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.confirm-t {
  flex-basis: 100%;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

.group #invlist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group #invform:empty {
  display: none;
}

.invf {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}

.invf-acts {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ---------------- Forms: fields ---------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > span {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select,
.vrow input,
.vrow select,
.rrow input {
  height: 48px;
  padding: 0 12px;
}

.field textarea {
  min-height: 80px;
  padding: 12px;
  resize: vertical;
}

.field input,
.field textarea,
.field select,
.vrow input,
.vrow select,
.rrow input {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  line-height: 24px;
  min-width: 0;
  width: 100%;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%237A8696' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.field [aria-invalid="true"],
.field [aria-invalid="true"]:focus,
.vrow input[aria-invalid="true"],
.vrow input[aria-invalid="true"]:focus {
  border-color: var(--danger);
}

.vrow input,
.vrow select,
.rrow input {
  padding-inline: 8px;
}

.field input:focus,
.field textarea:focus,
.vrow input:focus,
.rrow input:focus,
.vrow select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
}

.field select:has(option[value=""]:checked) {
  color: var(--muted);
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.addphone {
  align-self: flex-start;
}

.hint {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  margin: 0;
}

/* ---------------- Forms: colour pickers ---------------- */

.pick {
  position: relative;
  align-self: flex-start;
}

.pick-btn {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 11px 0 7px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  color: var(--muted);
}

.pick-btn::-webkit-details-marker {
  display: none;
}

.pick-btn:hover {
  border-color: var(--muted);
}

.pick-btn:focus-visible,
.pick[open] .pick-btn {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
}

.pick-cur {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--s);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.pick.doorish .pick-cur {
  width: 20px;
  height: 32px;
  border-radius: 10px 10px 4px 4px;
  margin-inline: 6px;
}

.pick-cur.none {
  box-shadow: none;
  border: 1px dashed var(--muted);
}

.pick .caret {
  transition: transform 0.15s;
}

.pick[open] .caret {
  transform: rotate(180deg);
}

.pick-pop {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  padding: 12px;
  background: var(--paper);
  border-radius: 16px;
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 8px 24px rgba(0, 0, 0, 0.16);
}

.namerow .pick-pop {
  left: auto;
  right: 0;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(5, 32px);
  gap: 8px;
}

.pick.doorish .swatches {
  grid-template-columns: repeat(5, 32px);
  row-gap: 12px;
}

.sw {
  position: relative;
  display: flex;
  justify-content: center;
  cursor: pointer;
}

.sw input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.sw span {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--s);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.sw input:checked + span {
  box-shadow:
    0 0 0 2px var(--paper),
    0 0 0 4px var(--ink);
}

.sw input:focus-visible + span {
  box-shadow:
    0 0 0 2px var(--paper),
    0 0 0 4px var(--accent);
}

.pick.doorish .sw span {
  border-radius: 12px 12px 4px 4px;
  height: 40px;
  width: 24px;
}

/* ---------------- Forms: name and photo ---------------- */

.namerow {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.namerow .field {
  flex: 1;
  min-width: 0;
}

.namerow .pick {
  align-self: flex-end;
  flex: none;
}

.ppick {
  align-self: flex-end;
  flex: none;
}

.pp-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  display: block;
}

.pp-btn .face {
  width: 48px;
  height: 48px;
  font-size: 16px;
  line-height: 24px;
  box-shadow: none;
}

.pp-cam {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 1px var(--line),
    var(--shadow-sm);
}

.pp-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pp-remove {
  align-self: flex-end;
  margin-top: -8px;
}

.pp-remove[hidden] {
  display: none;
}

/* ---------------- Forms: groups, cars and phone rows ---------------- */

.group {
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.group-h b {
  font-weight: 700;
}

#vlist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#vlist:empty {
  display: none;
}

.vrow {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.vrow + .vrow {
  padding-top: 12px;
  background: linear-gradient(90deg, var(--line) 50%, transparent 0) left top/8px 1px repeat-x;
}

.vrow .full {
  grid-column: 1/-1;
}

.vrow .row3 {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px auto;
  gap: 8px;
  align-items: center;
}

.rrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

/* ---------------- Forms: delete confirm ---------------- */

#rmzone {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#rmzone:not(:empty) {
  padding-top: 16px;
  box-shadow: inset 0 1px 0 var(--line);
}

#rmzone:empty {
  display: none;
}

.confirm {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--paper-2);
  border-radius: 12px;
  padding: 16px;
}

#rmzone .confirm {
  align-self: stretch;
}

.confirm p {
  flex-basis: 100%;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 20px;
}

.confirm .btn {
  background: var(--paper);
}

/* ---------------- Toast and loading ---------------- */

.toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  transform: translate(-50%, -12px);
  background: var(--ink);
  color: var(--paper);
  padding: calc(10px + var(--nudge)) 16px calc(10px - var(--nudge));
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  max-width: calc(100% - 32px);
  text-align: center;
}

.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.skel {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
}
