/* =========================================================
   Leo Property Command
   Mobile-first manager app UI
   ========================================================= */

:root {
  /* Surfaces */
  --bg: #f7f8f6;
  --bg-soft: #eef1ed;
  --bg-deep: #dde3dd;
  --surface: #ffffff;
  --surface-tint: #f9fbf9;

  /* Ink */
  --ink: #0f0d0a;
  --ink-2: #2a241c;
  --ink-soft: #5a5144;
  --ink-muted: #8a8073;
  --line: rgba(15, 13, 10, 0.08);
  --line-strong: rgba(15, 13, 10, 0.16);

  /* Brand */
  --copper: #c25d2a;
  --copper-deep: #8d421f;
  --copper-soft: #fae0d1;
  --emerald: #12705e;
  --emerald-soft: #d7ece6;
  --steel: #3f6b86;
  --steel-soft: #dce7ef;
  --amber: #a57d2b;
  --amber-soft: #f3e2b7;
  --red: #d93322;
  --red-soft: #fbd9d4;

  /* Type */
  --serif: "Fraunces", ui-serif, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;

  /* Space */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadow stack */
  --sh-1: 0 1px 2px rgba(20, 15, 8, 0.04), 0 2px 8px rgba(20, 15, 8, 0.05);
  --sh-2: 0 4px 14px rgba(20, 15, 8, 0.06), 0 16px 36px rgba(20, 15, 8, 0.08);
  --sh-3: 0 18px 48px rgba(20, 15, 8, 0.14), 0 4px 14px rgba(20, 15, 8, 0.08);
  --glow-copper: 0 14px 40px rgba(200, 80, 29, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background:
    linear-gradient(135deg, rgba(63, 107, 134, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(18, 112, 94, 0.09), transparent 32%),
    var(--bg);
}

img, svg { display: block; max-width: 100%; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }

h1, h2, h3, h4 { margin: 0; letter-spacing: 0; }
p { margin: 0; }

/* Ambient backgrounds */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.15 0 0 0 0 0.11 0 0 0 0 0.05 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ambient {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.55;
}
.ambient-a,
.ambient-b { display: none; }

/* =========================================================
   App shell — phone-first single column
   ========================================================= */
.app {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0;
  overflow-x: clip;
}

/* On larger screens, keep the phone-app feel instead of becoming a desktop table. */
@media (min-width: 720px) {
  .app { max-width: 560px; }
}

@media (min-width: 1080px) {
  .app { max-width: 560px; }
  .scroller { padding: 10px 16px 160px; }
}

/* =========================================================
   App bar
   ========================================================= */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 12px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(247, 248, 246, 0.96) 0%, rgba(247, 248, 246, 0.82) 85%, rgba(247, 248, 246, 0) 100%);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
}

.appbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-align: left;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.brand-dot {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 18px;
  color: #fff6ea;
  background: linear-gradient(140deg, var(--ink) 0%, #2a241c 100%);
  box-shadow: 0 8px 18px rgba(15, 13, 10, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0;
}
.brand-sub {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.env-chip {
  justify-self: center;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, #ffffff 0%, #f1f4ef 100%);
  border: 1px solid rgba(15, 13, 10, 0.08);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: var(--sh-1);
  white-space: nowrap;
}

/* On tiny phones, drop sub-text */
@media (max-width: 380px) {
  .brand-sub { display: none; }
  .env-chip { padding: 7px 10px; font-size: 10px; letter-spacing: 0.1em; }
}

.leah-floating-widget {
  position: fixed;
  left: 10px;
  bottom: calc(104px + env(safe-area-inset-bottom));
  z-index: 110;
  touch-action: none;
  opacity: 0;
  transform: translateX(-18px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.2s ease;
}

.leah-floating-widget[hidden] {
  display: none !important;
}

.leah-floating-widget.is-open {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

@media (max-width: 640px) {
  .leah-floating-widget {
    left: 8px;
    bottom: calc(96px + env(safe-area-inset-bottom));
  }
}

/* =========================================================
   Scroller / screens
   ========================================================= */
.scroller {
  padding: 8px 16px 188px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.screen {
  display: none;
  flex-direction: column;
  gap: 16px;
  scroll-margin-top: 72px;
  width: 100%;
  min-width: 0;
}

.screen.is-active {
  display: flex;
}

#home .priority-strip { order: 2; }
#home .fast-lane { order: 3; }
#home .tiles,
#home .ops-strip {
  display: none;
}

@keyframes screenRise {
  from {
    opacity: 0.65;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.header-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  width: 100%;
  max-width: 320px;
  margin-left: auto;
}

.screen-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.screen-controls.is-sticky {
  position: sticky;
  top: calc(64px + env(safe-area-inset-top));
  z-index: 18;
  padding: 8px;
  border-radius: 18px;
  background: rgba(251, 251, 248, 0.94);
  border: 1px solid rgba(15, 13, 10, 0.08);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  box-shadow: 0 8px 22px rgba(20, 15, 8, 0.07);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.screen-controls .search-pill { width: 100%; }
.screen-controls .filter-rail { justify-content: flex-start; }

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--copper);
  margin: 0 0 6px;
}

.screen-head h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
  color: var(--ink);
}

/* Search pill */
.search-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: none;
  min-width: 140px;
  flex-shrink: 0;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.search-pill:focus-within {
  border-color: var(--copper);
  box-shadow: 0 0 0 4px var(--copper-soft);
}
.search-ico { width: 16px; height: 16px; color: var(--ink-muted); flex-shrink: 0; }
.search-pill input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.search-pill input::placeholder { color: var(--ink-muted); }

.filter-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-rail::-webkit-scrollbar { display: none; }

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: none;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.filter-pill:hover { transform: translateY(-1px); border-color: var(--emerald); color: var(--ink); }
.filter-pill.is-active {
  background: linear-gradient(180deg, var(--emerald), #0d5f50);
  border-color: transparent;
  color: #f8fffc;
  box-shadow: 0 10px 20px rgba(18, 112, 94, 0.18);
}

.filter-count {
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--ink-muted);
  background: rgba(15, 13, 10, 0.06);
}

.filter-pill.is-active .filter-count {
  color: rgba(248, 255, 252, 0.92);
  background: rgba(255, 255, 255, 0.18);
}

.filter-overflow {
  position: relative;
}

.filter-overflow > summary {
  list-style: none;
  cursor: pointer;
}

.filter-overflow > summary::-webkit-details-marker { display: none; }

.filter-overflow-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--sh-2);
  min-width: 170px;
}

.filter-overflow-menu .filter-pill {
  width: 100%;
  justify-content: space-between;
}

.fast-lane {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fast-action {
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--sh-1);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.fast-action:hover {
  transform: translateY(-1px);
  border-color: var(--emerald);
  box-shadow: var(--sh-2);
}

.fast-action.primary {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, var(--emerald), #0d5f50);
  color: #f7fffb;
  border-color: transparent;
}

.priority-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(180deg, #fffdfa 0%, #f7faf7 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: none;
}

.priority-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.priority-copy h3 {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0;
}

.priority-copy p:last-child {
  color: var(--ink-muted);
  font-size: 13px;
}

.priority-button {
  flex: 0 0 auto;
  min-width: 84px;
}

.manager-brief {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(194, 93, 42, 0.1), transparent 44%),
    linear-gradient(180deg, #fffdfa, #f8faf7);
  border: 1px solid var(--line);
  box-shadow: none;
}

.manager-brief h3 {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.1;
}

.manager-brief p:not(.eyebrow) {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.brief-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.brief-stats span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: 15px;
  background: rgba(18, 112, 94, 0.08);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.brief-stats strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
}

@media (min-width: 560px) {
  .fast-lane { grid-template-columns: 1.2fr 1fr 1fr; }
  .fast-action.primary { grid-column: auto; }
}

@media (max-width: 559px) {
  .scroller {
    padding: 6px 14px 132px;
    gap: 20px;
  }
  .screen {
    gap: 14px;
  }
  .screen-head {
    flex-direction: column;
    align-items: stretch;
  }
  .header-stack {
    width: 100%;
    margin-left: 0;
  }
  .search-pill {
    width: 100%;
    min-width: 0;
  }
  .filter-rail {
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
  }
  .today-card {
    min-height: 300px;
    padding: 18px;
  }
  .today-headline {
    font-size: 40px;
    margin-top: 12px;
  }
  .today-caption {
    margin-top: 12px;
  }
  .today-actions {
    gap: 8px;
  }
  .tiles {
    gap: 8px;
  }
  .tile {
    padding: 12px;
  }
  .tile-num {
    font-size: 32px;
  }
  .priority-strip {
    flex-direction: column;
    align-items: stretch;
  }
  .priority-button {
    width: 100%;
  }
  .screen-controls.is-sticky,
  .queue-card,
  .vendor-bench,
  .quick-add {
    border-radius: 18px;
  }
  .queue-card {
    padding: 13px;
  }
  .queue-card-top {
    gap: 8px;
  }
  .queue-title-row {
    align-items: flex-start;
    gap: 6px;
  }
  .queue-title {
    font-size: 15px;
  }
  .queue-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
  }
  .queue-meta .dot {
    display: none;
  }
  .queue-card-summary {
    -webkit-line-clamp: 3;
  }
  .queue-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .queue-card-open {
    width: 100%;
    text-align: left;
  }
  .call-panel-head,
  .vendor-bench-head,
  .leah-call-summary-meta {
    flex-direction: column;
    align-items: stretch;
  }
  .leah-call-badges,
  .call-actions {
    justify-content: flex-start;
  }
  .leah-call-card,
  .leah-call-panel {
    border-radius: 18px;
  }
  .brief-stats {
    grid-template-columns: 1fr;
  }
  .ops-strip div {
    padding: 12px;
  }
}

@media (max-width: 400px) {
  .ops-strip {
    display: none;
  }
}

/* =========================================================
   Today card (hero)
   ========================================================= */
.today-card {
  position: relative;
  min-height: 336px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #171a19;
  border: 1px solid rgba(15, 13, 10, 0.08);
  border-radius: 24px;
  padding: 20px 20px 18px;
  box-shadow: 0 12px 34px rgba(20, 15, 8, 0.12);
  overflow: hidden;
}
.today-card::before { display: none; }
.today-photo,
.today-scrim {
  position: absolute;
  inset: 0;
}
.today-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}
.today-scrim {
  background:
    linear-gradient(180deg, rgba(10, 13, 15, 0.16) 0%, rgba(10, 13, 15, 0.34) 38%, rgba(10, 13, 15, 0.84) 100%),
    linear-gradient(90deg, rgba(10, 13, 15, 0.54), rgba(10, 13, 15, 0.08));
}
.today-card > *:not(.today-photo):not(.today-scrim) {
  position: relative;
  z-index: 1;
}

.today-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 248, 236, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-wrap: wrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: #56d1b6;
  box-shadow: 0 0 0 4px rgba(86, 209, 182, 0.22);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(86, 209, 182, 0.22); }
  50%      { box-shadow: 0 0 0 8px rgba(86, 209, 182, 0.08); }
}

.pill {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.pill.is-staging { background: var(--amber); color: #ffffff; }

.today-headline {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 44px;
  line-height: 0.95;
  letter-spacing: 0;
  margin-top: 12px;
  color: #fff8ec;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.today-headline .num {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  color: #f6d0b6;
  letter-spacing: 0;
}
.today-headline .num.soft { color: #f9fffd; }
.today-headline .dim {
  font-size: 16px;
  font-family: var(--sans);
  font-weight: 500;
  color: rgba(249, 255, 253, 0.76);
  letter-spacing: 0;
}
.today-headline .dim-sep {
  font-size: 20px;
  color: rgba(249, 255, 253, 0.45);
  margin: 0 2px;
}

.today-caption {
  margin-top: 10px;
  color: rgba(249, 255, 253, 0.84);
  font-size: 13.5px;
  max-width: 38ch;
}
.today-caption strong { color: #fffdf9; font-weight: 700; }

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

.ops-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.ops-strip div {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 12px;
  row-gap: 2px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-1);
}
.ops-strip span {
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--steel-soft);
  color: var(--steel);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.ops-strip strong { font-size: 14px; }
.ops-strip p { color: var(--ink-muted); font-size: 13px; }

@media (min-width: 640px) {
  .ops-strip { grid-template-columns: repeat(3, 1fr); }
}

elevenlabs-convai { max-width: 100%; }

/* =========================================================
   Stat tiles
   ========================================================= */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 520px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 14px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-1);
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
  border-color: var(--line-strong);
}
.tile-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}
.tile-num {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tile-num.accent { color: var(--copper-deep); }
.tile-num small {
  font-size: 18px;
  font-family: var(--sans);
  font-weight: 600;
  margin-left: 2px;
  color: var(--ink-soft);
}
.tile-trend {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.arrow.up { color: var(--emerald); }

/* =========================================================
   Card list (queue)
   ========================================================= */
.card-list { display: flex; flex-direction: column; gap: 12px; }

.queue-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.queue-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 0;
}

.queue-section-head div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.queue-section-head strong {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.queue-section-head span {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
}

.queue-section-head small {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.queue-card {
  width: 100%;
  max-width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: none;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.queue-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--sh-1);
}

.queue-card:focus-visible {
  outline: 3px solid rgba(48, 98, 78, 0.26);
  outline-offset: 3px;
}

.queue-card.active {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px var(--copper-soft), var(--sh-2);
}

.queue-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.queue-urgency-bar {
  width: 6px;
  align-self: stretch;
  border-radius: 999px;
  background: var(--ink-muted);
  flex-shrink: 0;
}

.queue-urgency-bar.urgent { background: linear-gradient(180deg, var(--red), #b12316); }
.queue-urgency-bar.normal { background: linear-gradient(180deg, var(--amber), #8f6312); }
.queue-urgency-bar.low { background: linear-gradient(180deg, var(--emerald), #0a4c35); }

.queue-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.queue-card-summary {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.queue-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.queue-card-next {
  min-width: 0;
}

.queue-card-next span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--copper);
}

.queue-card-next p {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.35;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.queue-card-open {
  border: 0;
  border-radius: 999px;
  background: rgba(47, 111, 85, 0.1);
  padding: 8px 11px;
  color: var(--emerald);
  font-size: 12px;
  font-weight: 700;
  white-space: normal;
  text-align: right;
  cursor: pointer;
}

.queue-card-open:hover {
  background: rgba(47, 111, 85, 0.16);
}

.queue-item {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-1);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}
.queue-item:hover {
  box-shadow: var(--sh-2);
  border-color: var(--line-strong);
}
.queue-item.active,
.queue-item[open] {
  border-color: var(--copper);
  box-shadow: 0 0 0 4px var(--copper-soft), var(--sh-2);
}

.queue-item > summary {
  list-style: none;
  cursor: pointer;
}
.queue-item > summary::-webkit-details-marker { display: none; }

.queue-summary-toggle {
  position: relative;
  display: block;
  padding: 14px 14px 14px 24px;
}
.queue-summary-toggle .queue-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.queue-item > summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--ink-muted);
  border-radius: 999px;
}
.queue-item[data-urgency="urgent"] > summary::before { background: linear-gradient(180deg, var(--red), #b12316); }
.queue-item[data-urgency="normal"] > summary::before { background: linear-gradient(180deg, var(--amber), #8f6312); }
.queue-item[data-urgency="low"] > summary::before    { background: linear-gradient(180deg, var(--emerald), #0a4c35); }

.queue-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.queue-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.queue-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--ink);
  flex: 1 1 auto;
  min-width: 0;
}
.queue-id {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  background: var(--bg-soft);
  padding: 4px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.chip {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip.urgent { background: var(--red-soft); color: var(--red); }
.chip.normal { background: var(--amber-soft); color: #8f6312; }
.chip.low    { background: var(--emerald-soft); color: var(--emerald); }
.chip.soft   { background: var(--bg-soft); color: var(--ink-soft); }

.chip.status-urgent { background: var(--red-soft); color: var(--red); }
.chip.status-review { background: var(--copper-soft); color: var(--copper-deep); }
.chip.status-waiting { background: var(--amber-soft); color: #8f6312; }
.chip.status-dispatch { background: var(--emerald-soft); color: var(--emerald); }
.chip.status-confirmed { background: var(--steel-soft); color: var(--steel); }
.chip.status-soft { background: var(--bg-soft); color: var(--ink-soft); }

.queue-meta {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.queue-meta .dot { color: var(--ink-muted); margin: 0 4px; }

.queue-age {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 13, 10, 0.045);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.queue-resident-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
}

.queue-resident-line strong {
  font-size: 14px;
}

.queue-resident-line span {
  color: var(--ink-soft);
}

.queue-summary {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.45;
  margin-top: 2px;
}

.workflow-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0 0;
}

.triage-chip,
.match-chip,
.signal-chip,
.quality-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.triage-chip.urgent { background: var(--red-soft); color: #9e2118; }
.triage-chip.review { background: var(--amber-soft); color: #7c5a15; }
.triage-chip.dispatch { background: var(--emerald-soft); color: var(--emerald); }
.triage-chip.waiting { background: var(--steel-soft); color: var(--steel); }
.triage-chip.low { background: var(--bg-soft); color: var(--ink-soft); }

.match-chip.strong { background: rgba(18, 112, 94, 0.12); color: var(--emerald); }
.match-chip.weak { background: rgba(165, 125, 43, 0.16); color: #7c5a15; }

.signal-chip.strong { background: rgba(18, 112, 94, 0.12); color: var(--emerald); }
.signal-chip.active { background: rgba(70, 92, 135, 0.12); color: var(--steel); }
.signal-chip.waiting { background: rgba(176, 92, 48, 0.14); color: #96502b; }
.signal-chip.weak { background: rgba(165, 125, 43, 0.16); color: #7c5a15; }
.signal-chip.urgent { background: var(--red-soft); color: #9e2118; }
.signal-chip.soft { background: var(--bg-soft); color: var(--ink-soft); }

.quality-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.quality-row span.done {
  background: rgba(18, 112, 94, 0.1);
  color: var(--emerald);
}

.quality-row span.missing {
  background: rgba(15, 13, 10, 0.05);
  color: var(--ink-muted);
}

.queue-next {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.queue-next span {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--copper);
}
.queue-next p {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.4;
}

.queue-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  align-items: center;
}

.queue-item:not([open]) .queue-foot {
  display: none;
}

.vendor-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.vendor-pill.attention {
  background: var(--amber-soft);
  color: #7c5a15;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.queue-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}

.queue-actions .btn-ghost,
.queue-actions .btn-dark,
.queue-actions .btn-primary {
  padding: 7px 12px;
  font-size: 12px;
}

.vendor-select {
  flex: 1 1 140px;
  min-width: 0;
  padding: 7px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-tint);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.vendor-select:focus { outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px var(--copper-soft); }

/* Empty state */
.empty,
.empty-state {
  padding: 28px 20px;
  background: var(--surface-tint);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  text-align: center;
  color: var(--ink-muted);
  font-size: 14px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary, .btn-dark, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 40px;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(180deg, var(--emerald) 0%, #0d5f50 100%);
  color: #f6fffb;
  box-shadow: 0 14px 30px rgba(18, 112, 94, 0.22);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 44px rgba(18, 112, 94, 0.28); }
.btn-primary.wide { width: 100%; }

.btn-dark {
  background: var(--ink);
  color: #fffdf8;
  box-shadow: 0 8px 20px rgba(15, 13, 10, 0.18);
}
.btn-dark:hover { transform: translateY(-1px); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--surface-tint); border-color: var(--emerald); }

/* =========================================================
   Quick-add (disclosure)
   ========================================================= */
.quick-add {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.quick-add[open] { box-shadow: var(--sh-2); }

.quick-add > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.quick-add > summary::-webkit-details-marker { display: none; }
.qa-plus {
  width: 26px;
  height: 26px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--emerald), #0d5f50);
  color: #f8fffc;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}
.quick-add[open] .qa-plus {
  background: var(--copper);
  transform: rotate(45deg);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 4px 16px 16px;
}
@media (min-width: 500px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-grid label.wide { grid-column: 1 / -1; }

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-grid label > span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-grid textarea { resize: vertical; min-height: 68px; }
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px var(--copper-soft);
}

/* =========================================================
   Portfolio: compact data list
   ========================================================= */
.portfolio-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portfolio-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 10px;
}

.portfolio-summary-pill,
.portfolio-focus-pill {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.2;
}

.portfolio-summary-pill strong,
.portfolio-focus-pill strong {
  color: var(--ink);
  font-size: 13px;
}

.portfolio-focus-pill {
  background: #fff5e9;
  border-color: rgba(198, 126, 57, 0.26);
}

.portfolio-tools {
  display: flex;
  width: 100%;
}

.header-drawer {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  padding: 8px 10px;
}

.header-drawer[open] {
  box-shadow: var(--sh-1);
}

.header-drawer[open] .qa-plus {
  background: var(--copper);
  transform: rotate(45deg);
}

.header-drawer > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  padding: 4px 2px;
}

.header-drawer > summary::-webkit-details-marker { display: none; }

.header-drawer-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portfolio-mini-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 4px;
}

#portfolio .screen-head {
  flex-direction: column;
  align-items: stretch;
}

#portfolio .header-stack {
  width: 100%;
  margin-left: 0;
}

.mini-tab {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-tab.is-active {
  color: #fffdf8;
  background: linear-gradient(140deg, #1f5f69 0%, #186057 100%);
  box-shadow: 0 10px 20px rgba(20, 84, 90, 0.22);
}

.sort-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: none;
}

.sort-pill span {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.sort-pill select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.portfolio-view {
  display: none;
}

.portfolio-view.is-active {
  display: block;
}

.property-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 0 16px;
}

.property-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--sh-1);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: background 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.property-card:hover { background: #fff; border-color: rgba(33, 43, 37, 0.2); box-shadow: var(--sh-1); }
.property-card.selected {
  border-color: var(--copper);
  background: #fffaf3;
  box-shadow: 0 0 0 2px var(--copper-soft), var(--sh-1);
}

.property-thumb {
  display: none;
}

.property-card-portrait-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(15, 13, 10, 0.04);
}

.property-card-portrait-wrap::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 2px solid #fffdf9;
  background: var(--emerald);
  box-shadow: 0 3px 10px rgba(15, 13, 10, 0.18);
}

.property-card-portrait-wrap.open::after {
  background: var(--amber);
}

.property-card-portrait-wrap.urgent::after {
  background: var(--red);
}

.property-portrait {
  --portrait-a: #f4d9b4;
  --portrait-b: #c76c42;
  --portrait-c: #254d43;
  position: relative;
  display: block;
  overflow: hidden;
  width: 64px;
  aspect-ratio: 1;
  border-radius: 18px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.72), transparent 24%),
    linear-gradient(155deg, var(--portrait-a), var(--portrait-b));
  border: 1px solid rgba(15, 13, 10, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 8px 18px rgba(20, 15, 8, 0.08);
  flex: 0 0 auto;
}

.property-portrait.has-photo {
  background: var(--bg-soft);
}

.property-portrait.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-portrait.v1 { --portrait-a: #f4d9b4; --portrait-b: #d97943; --portrait-c: #254d43; }
.property-portrait.v2 { --portrait-a: #dce8cf; --portrait-b: #7ca07e; --portrait-c: #304d39; }
.property-portrait.v3 { --portrait-a: #ead5d0; --portrait-b: #b66d60; --portrait-c: #513332; }
.property-portrait.v4 { --portrait-a: #f0dfb7; --portrait-b: #bd9047; --portrait-c: #4f3f25; }
.property-portrait.v5 { --portrait-a: #dfddf1; --portrait-b: #777faf; --portrait-c: #2f3554; }
.property-portrait.v6 { --portrait-a: #f0d6c4; --portrait-b: #c25f3f; --portrait-c: #4c2e24; }

.property-portrait-building {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 11px;
  height: 43%;
  border-radius: 7px 7px 3px 3px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0 5px, transparent 5px 11px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)),
    var(--portrait-c);
  box-shadow: 0 -13px 0 -6px rgba(255, 255, 255, 0.2);
}

.property-portrait-building::before {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 0;
  height: 46%;
  border-radius: 5px 5px 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.36) 0 4px, transparent 4px 9px),
    rgba(255, 255, 255, 0.16);
}

.property-portrait-trees::before,
.property-portrait-trees::after {
  content: "";
  position: absolute;
  bottom: 9px;
  width: 15px;
  height: 20px;
  border-radius: 999px 999px 6px 6px;
  background: rgba(19, 92, 72, 0.72);
}

.property-portrait-trees::before { left: 5px; }
.property-portrait-trees::after { right: 5px; transform: scale(0.82); opacity: 0.82; }

.property-portrait.hero {
  width: 92px;
  border-radius: 22px;
}

.property-portrait.sheet {
  width: 52px;
  border-radius: 16px;
}
.property-thumb.v1 { background: linear-gradient(160deg, #f4d9b4, #e6a870); }
.property-thumb.v2 { background: linear-gradient(160deg, #d8e4c6, #86ac8a); }
.property-thumb.v3 { background: linear-gradient(160deg, #e8d3d0, #b9786a); }
.property-thumb.v4 { background: linear-gradient(160deg, #efe0b7, #c69a4e); }
.property-thumb.v5 { background: linear-gradient(160deg, #dedcef, #7e84b8); }
.property-thumb.v6 { background: linear-gradient(160deg, #f1d5c4, #c66846); }

.property-thumb::before {
  content: "";
  position: absolute;
  left: 14px;
  bottom: 12px;
  right: 14px;
  height: 42%;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 8px, transparent 8px 14px),
    rgba(15, 13, 10, 0.12);
}
.property-thumb::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: 12px;
  right: 22px;
  height: 26%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 6px, transparent 6px 12px);
}

.property-card-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.property-line-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 5px;
}

.property-line-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.property-line-top strong {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.property-line-id {
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.property-line-address {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.property-line-people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.property-line-people span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  border-radius: 999px;
  padding: 3px 7px 3px 3px;
  background: rgba(15, 13, 10, 0.045);
  border: 1px solid rgba(15, 13, 10, 0.05);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.2;
}

.property-line-people strong {
  font-size: inherit;
  white-space: normal;
}

.mini-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid !important;
  place-items: center;
  padding: 0 !important;
  border: 0 !important;
  background: var(--ink) !important;
  color: #fff6ea !important;
  font-size: 9px !important;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.mini-avatar.resident {
  background: var(--emerald) !important;
}

.property-last-activity {
  display: block;
  margin-top: 1px;
  color: var(--ink-muted);
  font-size: 11.5px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-line-next {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 13, 10, 0.045);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-side-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.property-line-status {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-soft);
  white-space: nowrap;
  text-align: right;
}

.property-stat-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(52px, auto));
  gap: 5px;
}

.property-stat-chip {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f8faf7;
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.property-stat-chip strong {
  font-size: 14px;
  line-height: 1;
  color: var(--ink);
}

.property-stat-chip span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.property-row-open {
  border-color: rgba(31, 95, 105, 0.16);
}

.property-row-urgent {
  border-color: rgba(177, 35, 22, 0.18);
  background: #fffaf8;
}

@media (max-width: 560px) {
  .property-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }
  .property-card-portrait-wrap {
    width: 62px;
    height: 62px;
    border-radius: 19px;
  }
  .property-portrait.card {
    width: 58px;
  }
  .property-side-stats {
    grid-column: 1 / -1;
    width: 100%;
    align-items: stretch;
  }
  .property-line-status {
    text-align: left;
    white-space: normal;
  }
  .property-stat-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.address-card-modal[hidden] {
  display: none !important;
}

.address-card-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
}

.address-card-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 13, 10, 0.42);
}

.address-card-sheet {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-3);
  padding: 14px;
  max-height: min(72vh, 560px);
  overflow-y: auto;
}

.address-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.address-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.address-card-title-row > div {
  min-width: 0;
}

.address-card-head h4 {
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.address-card-close {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  min-width: 32px;
  min-height: 32px;
  font-size: 18px;
  line-height: 1;
}

.address-card-meta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.address-card-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.address-card-actions .btn-ghost.compact,
.address-card-actions .btn-primary.compact {
  width: 100%;
  justify-content: center;
}

.address-card-section {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.address-card-section h5 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper);
}

.address-card-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.address-card-stat {
  border: 1px solid var(--line);
  background: var(--surface-tint);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.address-card-stat span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.address-card-stat strong {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}

.address-card-people {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.address-card-person {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.address-card-person span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.address-card-person strong {
  font-size: 14px;
}

.address-card-person a,
.address-card-person small {
  text-decoration: none;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.address-card-worklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.address-card-workitem {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.address-card-workitem strong {
  font-size: 13.5px;
}

.address-card-workitem small {
  color: var(--ink-muted);
  line-height: 1.4;
}

.address-card-workitem button {
  margin-top: 4px;
  align-self: flex-start;
}

.address-card-editor details,
.address-card-editor .quick-add.property-editor {
  margin-top: 0;
}

.sheet-modal[hidden] {
  display: none !important;
}

.sheet-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 13, 10, 0.42);
}

.sheet-panel {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-3);
  padding: 14px;
  max-height: min(72vh, 620px);
  overflow-y: auto;
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.sheet-head h4 {
  font-size: 18px;
  line-height: 1.15;
}

.sheet-close {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  min-width: 32px;
  min-height: 32px;
  font-size: 18px;
  line-height: 1;
}

.sheet-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resident-focus-card {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf8, #f6f2e9);
  border: 1px solid var(--line);
}

.resident-focus-card div {
  min-width: 0;
}

.resident-focus-card span {
  display: block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.resident-focus-card strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.resident-focus-card p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.resident-focus-card a,
.resident-focus-card small {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 10px;
  background: var(--ink);
  color: #fff6ea;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.resident-focus-card small {
  background: var(--bg-soft);
  color: var(--ink-muted);
}

.queue-sheet-block {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-sheet-block h5 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper);
}

.queue-sheet-copy {
  color: var(--ink-soft);
  line-height: 1.45;
}

.outreach-tracker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.outreach-tracker div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.outreach-tracker span {
  display: block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.outreach-tracker strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outreach-tracker.vendor-outreach div {
  border-color: rgba(70, 92, 135, 0.18);
  background: rgba(237, 242, 246, 0.72);
}

.outreach-tracker.vendor-confirmed div,
.outreach-tracker.waiting-on-completion div,
.outreach-tracker.scheduled div {
  border-color: rgba(47, 111, 85, 0.2);
  background: rgba(232, 242, 234, 0.72);
}

@media (max-width: 420px) {
  .outreach-tracker {
    grid-template-columns: 1fr;
  }
}

.ticket-media-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ticket-media-strip a {
  flex: 0 0 78px;
  width: 78px;
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-tint);
  overflow: hidden;
}

.ticket-media-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-command {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.emergency-handoff {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(191, 54, 38, 0.26);
  background: linear-gradient(135deg, #fff6ee, #fff1ee);
}

.emergency-handoff span {
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a13b2b;
}

.emergency-handoff strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
}

.emergency-handoff p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}

.emergency-handoff a,
.emergency-handoff small {
  border-radius: 999px;
  padding: 9px 11px;
  background: #a13b2b;
  color: #fff8f3;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.emergency-handoff small {
  background: rgba(161, 59, 43, 0.1);
  color: #8f3529;
}

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

.queue-command-main span,
.queue-step span {
  display: block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.queue-command-main strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.15;
  color: var(--ink);
}

.queue-command-main p {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.queue-command-story {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(15, 13, 10, 0.035);
}

.queue-command-story span {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.queue-command-story p {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}

.queue-command-action {
  justify-self: end;
  white-space: nowrap;
}

.queue-command-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.queue-step {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.queue-step strong {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-step.done {
  border-color: rgba(47, 111, 85, 0.34);
  background: rgba(232, 242, 234, 0.72);
}

.queue-step.active {
  border-color: rgba(176, 92, 48, 0.36);
  background: rgba(255, 239, 221, 0.72);
}

@media (max-width: 520px) {
  .queue-command-steps {
    display: flex;
  }
}

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

.message-entry {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.message-entry-top strong {
  font-size: 13px;
  color: var(--ink);
}

.message-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.message-status.ok {
  background: rgba(34, 125, 90, 0.12);
  color: #1d6c51;
  border-color: rgba(34, 125, 90, 0.18);
}

.message-status.warn {
  background: rgba(196, 133, 58, 0.12);
  color: #946229;
  border-color: rgba(196, 133, 58, 0.18);
}

.message-status.bad {
  background: rgba(179, 79, 68, 0.12);
  color: #9c3a2f;
  border-color: rgba(179, 79, 68, 0.18);
}

.message-status.soft {
  background: rgba(104, 112, 103, 0.1);
  color: var(--ink-soft);
  border-color: rgba(104, 112, 103, 0.16);
}

.message-body {
  color: var(--ink-soft);
  line-height: 1.5;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.message-media {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.message-media a,
.message-media span {
  flex: 0 0 70px;
  width: 70px;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-tint);
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--ink-muted);
  text-align: center;
}

.message-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--ink-muted);
  font-size: 11px;
}

.message-error {
  color: #9c3a2f;
  font-size: 12px;
  line-height: 1.45;
}

.event-log {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.event-entry {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: var(--surface);
}

.event-entry span {
  display: block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.event-entry strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.event-entry p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.event-entry small {
  display: block;
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 11px;
}

.mini-disclosure {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.mini-disclosure summary {
  cursor: pointer;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.quiet-disclosure {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.quiet-disclosure .queue-meta {
  padding: 0 12px 10px;
}

.transcript-lines.compact {
  max-height: 260px;
  overflow: auto;
  padding: 0 10px 10px;
}

.sheet-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.sheet-check input {
  margin-top: 3px;
}

.sheet-check span {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.queue-sheet-actions {
  position: sticky;
  bottom: 0;
  margin: 14px -14px 0;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(15, 13, 10, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 253, 249, 0) 0%,
    rgba(255, 253, 249, 0.92) 24%,
    rgba(255, 253, 249, 1) 100%
  );
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-sheet-primary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.queue-sheet-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.queue-sheet-more {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 10px;
}

.queue-sheet-more > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--ink);
  padding: 4px 2px;
}

.queue-sheet-more > summary::-webkit-details-marker { display: none; }

.queue-sheet-more .queue-sheet-secondary {
  margin-top: 10px;
}

.queue-sheet-actions .btn-primary {
  min-height: 44px;
  justify-content: center;
}

.queue-sheet-primary-action {
  width: 100%;
}

.queue-sheet-actions .btn-ghost {
  justify-content: center;
  background: var(--surface);
}

.queue-sheet-vendor {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.queue-sheet-vendor select {
  min-width: 0;
}

.confirm-sheet {
  max-width: 420px;
  margin: 0 auto;
}

.confirm-copy {
  margin-top: 10px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.confirm-target {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.confirm-target span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.confirm-target strong {
  font-size: 14px;
}

.confirm-preview {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  line-height: 1.45;
  white-space: pre-wrap;
}

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

.confirm-preview-actions .btn-ghost {
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
}

.confirm-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.entity-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entity-sheet-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.entity-sheet-item strong {
  font-size: 14px;
  line-height: 1.2;
}

.entity-sheet-item span,
.entity-sheet-item small {
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.entity-sheet-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.entity-sheet-actions .btn-primary,
.entity-sheet-actions .btn-ghost {
  justify-content: center;
}

/* Selected property detail */
.property-detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--sh-1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.property-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.property-profile-card {
  position: relative;
  isolation: isolate;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.7), transparent 34%),
    linear-gradient(145deg, #f3eee2, #e9f1e8);
}

.property-profile-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95);
  opacity: 0.42;
  z-index: -2;
}

.property-profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(250, 247, 239, 0.98), rgba(250, 247, 239, 0.76) 58%, rgba(250, 247, 239, 0.28));
  z-index: -1;
}

.property-profile-content {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 168px;
  padding: 16px;
}

.upload-button {
  cursor: pointer;
}

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

.person-card {
  padding: 12px;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.person-card span {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--copper);
}
.person-card strong {
  font-size: 14px;
  color: var(--ink);
}
.person-card a,
.person-card small {
  color: var(--ink-muted);
  font-size: 12.5px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.person-card .btn-ghost.compact {
  margin-top: 6px;
  width: fit-content;
}

.people-card-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entity-button,
.entity-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.15s ease;
}

.entity-button:hover,
.entity-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-2);
  border-color: var(--line-strong);
}

.entity-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.entity-row-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.entity-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.entity-row-top strong {
  min-width: 0;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-row-label {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.entity-row-line {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.entity-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.entity-row-meta span {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-tint);
  padding: 5px 8px;
  font-size: 11px;
  color: var(--ink-soft);
}

.entity-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.entity-row-open {
  font-size: 11px;
  font-weight: 800;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 560px) {
  .entity-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .entity-row-side {
    align-items: flex-start;
  }
}

body.overlay-open {
  overflow: hidden;
}

.photo-callout {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfaf5 0%, #f4f1e9 100%);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}
.photo-callout > img {
  width: 84px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
}
.photo-callout h4 {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.1;
  margin-top: 2px;
}
.photo-callout p:last-child {
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.35;
  margin-top: 4px;
}

.upload-inline {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-top: 8px;
}
.upload-inline input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.upload-inline span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fffdf8;
  font-size: 12px;
  font-weight: 700;
}

.attachment-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.attachment-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 1;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.attachment-thumb span {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(15, 13, 10, 0.72);
  color: #fffdf8;
  font-size: 10px;
  font-weight: 700;
}
.attachment-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(15, 13, 10, 0.62);
  color: #fffdf8;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
}
.attachment-remove:active {
  transform: scale(0.98);
}

.photo-callout .photo-cover {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-soft);
}
.photo-callout .photo-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.btn-ghost.compact {
  padding: 8px 12px;
  min-height: 36px;
  font-size: 12px;
  border-radius: 999px;
}

.btn-primary.compact,
.btn-dark.compact {
  padding: 8px 12px;
  min-height: 36px;
  font-size: 12px;
  border-radius: 999px;
}

.property-hero-row {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  align-items: center;
}
.property-card-portrait-wrap.hero-wrap {
  width: 104px;
  height: 104px;
  border-radius: 26px;
}
.property-hero-row p:not(.eyebrow),
.property-profile-content p:not(.eyebrow),
.property-summary p {
  color: var(--ink-muted);
  font-size: 13px;
}

.property-hero-activity {
  margin-top: 4px;
  color: var(--ink-soft) !important;
  font-weight: 700;
}

.property-detail h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0;
}

.property-editor {
  padding: 0;
}
.property-editor .form-grid {
  padding: 16px;
}
.property-editor form {
  margin: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.detail-grid .cell {
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.detail-grid .cell span:first-child {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}
.detail-grid .cell span:last-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.work-trail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.work-trail h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}
.work-trail li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  list-style: none;
}
.work-trail li:last-child { border-bottom: none; }
.work-trail ul { list-style: none; padding: 0; margin: 0; }
.work-trail strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}
.work-trail small {
  display: block;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.35;
}

.property-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-title h4 {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.1;
  margin-top: 2px;
}

.property-event {
  padding-left: 14px;
  align-items: flex-start;
}
.property-event > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.property-event strong {
  font-size: 13.5px;
  color: var(--ink);
}
.property-event span {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.35;
}

@media (max-width: 559px) {
  .property-detail {
    padding: 14px;
    gap: 10px;
  }
  .property-profile-card {
    min-height: 148px;
    border-radius: 22px;
  }
  .property-profile-content {
    grid-template-columns: 80px minmax(0, 1fr);
    min-height: 148px;
    padding: 13px;
  }
  .property-hero-row {
    grid-template-columns: 80px 1fr;
  }
  .property-card-portrait-wrap.hero-wrap {
    width: 80px;
    height: 80px;
    border-radius: 22px;
  }
  .property-portrait.hero {
    width: 72px;
    border-radius: 18px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .work-trail li {
    font-size: 12.5px;
  }
  .property-actions {
    gap: 6px;
  }
  .person-card {
    padding: 10px;
  }
  .photo-callout {
    grid-template-columns: 72px 1fr;
    gap: 10px;
  }
  .photo-callout img {
    width: 72px;
  }
  .queue-next p {
    font-size: 12px;
  }
  .queue-item {
    gap: 10px;
    padding: 12px;
  }
  .queue-title {
    font-size: 16px;
  }
  .queue-meta,
  .queue-summary {
    font-size: 12.5px;
  }
  .queue-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .vendor-select {
    width: 100%;
    flex: 1 1 auto;
  }
  .queue-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-left: 0;
    width: 100%;
  }
  .queue-actions .btn-ghost,
  .queue-actions .btn-dark,
  .queue-actions .btn-primary {
    min-width: 0;
    padding-inline: 8px;
    text-align: center;
  }
}

/* Portfolio empty */
.portfolio-empty {
  padding: 28px 22px;
  background: var(--surface-tint);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.portfolio-empty h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
}
.portfolio-empty p { color: var(--ink-muted); font-size: 13px; max-width: 36ch; }

/* =========================================================
   Activity timeline
   ========================================================= */
.leah-call-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background:
    linear-gradient(160deg, rgba(18, 112, 94, 0.12), rgba(255, 255, 255, 0.88) 42%),
    var(--surface);
  border: 1px solid rgba(18, 112, 94, 0.18);
  border-radius: 24px;
  box-shadow: var(--sh-2);
}

.call-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.call-panel-head h3 {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.05;
}

.call-panel-head p:not(.eyebrow) {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.leah-call-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leah-call-empty,
.call-skeleton {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px dashed rgba(15, 13, 10, 0.14);
  border-radius: 18px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.leah-call-empty strong { color: var(--ink); }
.leah-call-empty.setup { border-color: rgba(165, 125, 43, 0.34); background: #fff8e8; }
.leah-call-empty.error { border-color: rgba(217, 51, 34, 0.28); background: #fff1ef; }

.call-skeleton span {
  height: 12px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef1ed, #ffffff, #eef1ed);
  animation: pulseLine 1.1s ease-in-out infinite;
}
.call-skeleton span:nth-child(2) { width: 78%; }
.call-skeleton span:nth-child(3) { width: 52%; }

@keyframes pulseLine {
  0%, 100% { opacity: 0.45; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(4px); }
}

.leah-call-card {
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--sh-1);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.leah-call-card:hover {
  border-color: rgba(18, 112, 94, 0.2);
  box-shadow: var(--sh-2);
}

.leah-call-card:focus-visible {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px var(--copper-soft), var(--sh-2);
}

.leah-call-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  min-width: 0;
  flex-wrap: wrap;
}

.call-source {
  color: var(--emerald);
}

.leah-call-card h4 {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.1;
}

.leah-call-card > p {
  margin-top: 7px;
  font-size: 13.5px;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.leah-call-summary-meta {
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.leah-call-person {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.leah-call-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper);
}

.leah-call-person strong {
  font-size: 15px;
  line-height: 1.2;
  color: var(--ink);
}

.leah-call-person small {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.leah-call-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.call-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.call-actions .btn-primary.compact {
  min-width: 0;
}

.leah-call-link {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.transcript-drawer {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.transcript-drawer summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.transcript-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.transcript-line {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  padding: 10px 11px;
  background: var(--surface-tint);
  border-radius: 14px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.transcript-line strong {
  color: var(--ink);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.transcript-line.agent {
  background: #f5eee4;
}

.vendor-bench {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8faf5);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.vendor-bench-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.vendor-bench-head h3 {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.1;
}

.vendor-bench-head > span {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.vendor-bench-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vendor-card-mini {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f7f6f0);
  border: 1px solid var(--line);
}

.vendor-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.vendor-card-mini strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.2;
}

.vendor-route-label {
  display: block;
  margin-bottom: 2px;
  color: var(--copper);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vendor-route-score {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--emerald-soft);
  color: var(--emerald);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.vendor-job-focus {
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 13, 10, 0.035);
  border: 1px solid rgba(15, 13, 10, 0.055);
}

.vendor-job-focus span {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.vendor-job-focus strong {
  margin-top: 4px;
  font-size: 13px;
}

.vendor-job-focus small {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.35;
}

.vendor-route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vendor-route-meta span {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.vendor-route-actions {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr 0.75fr;
  gap: 8px;
}

.vendor-route-actions .btn-primary,
.vendor-route-actions .btn-ghost {
  width: 100%;
  justify-content: center;
}

.vendor-empty {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed var(--line-strong);
}

.vendor-empty strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.vendor-empty span {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 430px) {
  .leah-call-summary-meta {
    flex-direction: column;
  }
  .leah-call-badges {
    justify-content: flex-start;
  }
  .call-actions {
    justify-content: space-between;
  }
  .vendor-route-actions {
    grid-template-columns: 1fr;
  }
}

.timeline { display: flex; flex-direction: column; gap: 10px; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: linear-gradient(180deg, var(--copper-soft), var(--bg-deep));
  border-radius: 999px;
}

.activity-entry {
  position: relative;
  padding: 12px 14px 12px 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.activity-entry::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--copper);
  box-shadow: 0 0 0 3px #fff6ea, 0 0 0 4px var(--copper-soft);
}

.activity-entry time {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Rules list */
.rules {
  margin-top: 6px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #fffaf0, #fbeed6);
  border: 1px solid rgba(200, 80, 29, 0.18);
  border-radius: 18px;
}
.rules ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rules li {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--copper);
  transform: rotate(45deg);
}

.footnote {
  font-size: 11px;
  color: var(--ink-muted);
  text-align: center;
  letter-spacing: 0.06em;
  margin-top: 8px;
}

.footnote-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  letter-spacing: 0;
}

.footnote-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
}

.footnote-links a:hover {
  text-decoration: underline;
}

/* =========================================================
   Tab bar
   ========================================================= */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 16px));
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px;
  background: rgba(246, 239, 226, 0.96);
  border: 1px solid rgba(15, 13, 10, 0.08);
  border-radius: var(--r-pill);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  align-items: end;
  box-shadow: var(--sh-3);
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 14px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--ink); }
.tab.active::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--copper);
  margin-top: 2px;
}

.tab-mid { margin-top: -28px; }
.tab-mid .tab-voice {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--steel), var(--emerald));
  color: #fff6ea;
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 34px rgba(47, 95, 127, 0.34);
  transition: transform 0.15s ease;
}
.tab-mid .tab-voice svg { width: 24px; height: 24px; }
.tab-mid:hover .tab-voice { transform: scale(1.05); }

.tab-mid.has-leah-hint .tab-voice::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 12px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--copper), var(--copper-deep));
  box-shadow: 0 0 0 4px rgba(194, 93, 42, 0.18);
}

.tab-badge {
  position: absolute;
  top: 6px;
  right: 14px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--copper), var(--copper-deep));
  color: #fff6ea;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(194, 93, 42, 0.26);
}

@media (min-width: 1080px) {
  /* Let the tab bar breathe as a floating pill on desktop */
  .tabbar {
    width: min(440px, 80vw);
  }
  .tab-mid { margin-top: -22px; }
}

/* =========================================================
   Toast
   ========================================================= */
.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff6ea;
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--sh-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: min(460px, calc(100% - 32px));
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.toast .toast-action {
  background: rgba(255, 246, 234, 0.12);
  color: #fff6ea;
  border: 1px solid rgba(255, 246, 234, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.toast .toast-action:hover,
.toast .toast-action:focus-visible {
  background: rgba(255, 246, 234, 0.22);
  border-color: rgba(255, 246, 234, 0.45);
  outline: none;
}

/* Keep scrolling immediate so screen switches feel crisp instead of floaty. */
html { scroll-behavior: auto; }

::selection { background: var(--copper-soft); color: var(--ink); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* Respect reduced-motion preference: kill decorative loops, keep UI transitions fast */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .live-dot,
  .voice-meter span,
  .call-skeleton span {
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}
