:root{
  --navy:#0f2540; --navy-deep:#0a1a2f;
  --gold:#e8d7c4; --gold-soft:#f0e5d4;
  --paper:#f5f3ee; --line:#dfdacd;
  --ink:#1c2733;  --muted:#696f84;
  --green:#2e7d52; --amber:#b07d1a; --red:#9e3b32; --blue:#2f5d8a;
  --card:#fff;
  --shadow:0 1px 3px rgba(15,37,64,.07),0 6px 20px rgba(15,37,64,.05);
  --accent:#79b084;
  --accent-hover:#5c9068;
  --btn-gold:#c9a227;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
}

html {
  font-size: 16px;
}

body {
  min-height: 100dvh;
  font-family: "DM Sans", -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.45;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 8px;
  top: 8px;
  z-index: 20;
  background: var(--card);
  padding: 8px 12px;
}

.app {
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.topbar {
  background: var(--navy);
  color: #fff;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  position: relative;
}

.wordmark {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: center;
}

.lang-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.lang-opt {
  min-height: 44px;
  border: 1px solid var(--navy);
  background: #fff;
  color: var(--navy);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
}
.lang-opt[aria-checked="true"] {
  background: var(--navy);
  color: #fff;
}
.lang-opt:focus-visible {
  box-shadow: 0 0 0 3px rgba(121,176,132,.45);
}

.main {
  flex: 1;
  padding: 20px 16px 96px;
}
.app.dock-hidden .main {
  padding-bottom: 32px;
}

.micro {
  font-size: 10.5px;
  letter-spacing: 1.3px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

h1, h2, .display {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 12px;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }

.login-uses {
  margin: -4px 0 10px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
}

.lede {
  color: var(--muted);
  margin: 0 0 20px;
}

.sms-consent {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}
.sms-consent a,
.legal-page a {
  color: var(--navy);
}
.legal-page hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin-bottom: 16px;
}

.ph h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  margin: 0 0 8px;
  color: var(--navy);
}

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--navy);
}

input[type="tel"],
input[type="text"],
input[type="email"],
input[type="date"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 11px;
  border: 1px solid rgba(15,37,64,.10);
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.photo-preview {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--gold-soft);
}

.photo-preview-lg {
  width: 160px;
  height: 160px;
  margin-bottom: 16px;
}

.photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.animal-card h2 { margin-bottom: 4px; }

.lease-body {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.stack { margin: 12px 0; }

.hint {
  color: var(--muted);
  font-weight: 400;
}

input[type="file"] {
  padding: 10px 12px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  font-weight: 400;
  margin: 16px 0 4px;
}
.check-row-quiet {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 4px;
}

.check-row input[type="checkbox"],
.check-row input[type="radio"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.listing-options {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.listing-options legend {
  font-weight: 600;
  margin-bottom: 8px;
}

#waitlist-property-wrap {
  margin-bottom: 12px;
}

.invite-slot {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}

.invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.invite-slot .invite-row {
  margin-top: 0;
}

.invite-row p {
  margin: 0;
  flex: 1;
}

.share-invite {
  width: 100%;
  margin-top: 8px;
}

.btn-inline {
  width: auto;
  min-width: 44px;
  padding: 10px 14px;
}

label + input,
label + .check-row {
  margin-bottom: 12px;
}

.allocation-preview {
  margin: 8px 0 0;
}

.allocation-preview p {
  margin: 0 0 4px;
}

#change-allocation {
  width: auto;
  margin: 4px 0 12px;
}

.allocation-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin: 0 0 12px;
}

.allocation-order {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(121,176,132,.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.btn:active { transform: scale(.97); }

.btn-navy {
  background: var(--navy);
  color: #fff;
}
.btn-navy:hover { filter: brightness(1.15); }

.btn:disabled {
  cursor: not-allowed;
}
.btn:disabled:active { transform: none; }
.btn-navy:disabled {
  background: var(--muted);
  color: #fff;
  filter: none;
}
.btn-navy:disabled:hover { filter: none; }
.btn-outline:disabled,
.btn-soft:disabled {
  opacity: 0.55;
  color: var(--muted);
}

.auth-submit {
  margin-top: 16px;
}

.btn-gold {
  background: var(--btn-gold);
  color: var(--navy);
}

.btn-soft {
  background: #eef0f2;
  color: var(--navy);
}

.btn-outline {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn-outline.is-selected {
  border-color: var(--navy);
  background: var(--gold-soft);
  color: var(--navy);
}

.btn-red {
  background: #fbeae8;
  color: #9e3b32;
}

.btn + .btn { margin-top: 10px; }
.btn + .text-link { margin-top: 4px; }

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 44px;
  width: auto;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 0 4px 0 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  border-radius: 8px;
}
.back-chevron {
  font-size: 1.35em;
  line-height: 1;
}
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 8px;
}
.text-link-danger {
  color: var(--red);
}
.form-actions-sticky {
  position: sticky;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  z-index: 3;
  background: var(--paper);
  padding: 12px 0 8px;
  margin-top: 8px;
}
.apply-actions {
  display: flex;
  flex-direction: column;
}
.apply-actions #submit-application {
  order: -1;
}
.app.dock-hidden .form-actions-sticky {
  bottom: 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}
.animal-more {
  margin: 8px 0 12px;
}
.animal-more > summary,
.autopay-more > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.autopay-more {
  margin: 8px 0 16px;
}
.bank-row {
  margin: 0 0 8px;
}
.bank-row select {
  font-weight: 600;
  border-color: var(--navy);
}
.home-history {
  margin: 4px 0 12px;
}

.yes-no {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
}
.yes-no-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.yes-no-opt:has(input:checked) {
  border-color: var(--navy);
  background: var(--gold-soft);
}
.yes-no-opt input[type="radio"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex: 0 0 auto;
}

.showing-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.showing-slots .btn + .btn { margin-top: 0; }
.lockbox-combo {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.kpi {
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  text-align: center;
}

.kpi .amount {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 44px;
  line-height: 1.1;
  color: var(--navy);
  font-weight: 600;
}

.kpi .hint {
  color: var(--muted);
  margin-top: 6px;
}

.due-cal {
  margin: 14px 0 18px;
  padding: 14px 14px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.due-cal h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.due-cal-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 12px;
  text-align: center;
}

.due-cal-dow {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 0;
}

.due-cal-day {
  min-height: 32px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.due-cal-day.is-empty { visibility: hidden; }

.due-cal-day.has-due {
  background: var(--gold-soft);
  font-weight: 600;
}

.due-cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--navy);
}

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

.due-snap-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.95rem;
}

.due-snap-row .amt {
  font-weight: 600;
  white-space: nowrap;
}

.due-snap-row .when { color: var(--ink); }

.due-snap-row .kind {
  color: var(--muted);
  font-size: 0.8rem;
}

.due-more {
  margin-top: 10px;
}

.due-more > summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}

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

.due-rest {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.due-rest li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  background: var(--gold-soft);
  color: var(--navy);
}
.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
}

.actas {
  background: var(--gold);
  color: var(--navy);
  text-align: center;
  min-height: 30px;
  padding: 10px 12px;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 40;
}
.actas:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.actas .btn {
  width: auto;
  min-width: 44px;
}

.banner {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 15px;
}
.banner-error {
  background: #fbeae8;
  color: var(--red);
}
.banner-offline {
  background: var(--gold-soft);
  color: var(--navy);
}
.banner-pending {
  background: #f8f1de;
  color: #8a5a10; /* 5.25:1; --amber on this bg is 3.21:1 */
}

.empty {
  text-align: center;
  padding: 28px 12px;
  color: var(--muted);
}
.empty h2 { color: var(--navy); }

.account-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.account-row:last-child { border-bottom: 0; }
.account-row span { color: var(--muted); }
.account-row strong { color: var(--navy); text-align: right; }

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: var(--navy);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav.dock-two {
  grid-template-columns: 1fr 1fr;
}

.bottom-nav button {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.72);
  min-height: 44px;
  padding: 8px 2px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}

.bottom-nav button[aria-current="page"] {
  color: var(--accent);
}
.nav-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-label {
  font-size: 14px;
  font-weight: 600;
}

.hidden { display: none !important; }

.unit-line {
  margin: 0 0 16px;
  color: var(--muted);
}

.field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin: 16px 0 8px;
  color: var(--navy);
}

#new-request { margin-bottom: 16px; }

.request-card {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}
.request-card strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--navy);
}
.request-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.request-desc {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.statement-line {
  display: block;
}
.statement-memo {
  margin: 4px 0;
  color: var(--navy);
  font-weight: 600;
}
.statement-amt {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
}
.receipt-dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 12px;
  margin: 0 0 16px;
}
.receipt-dl dt {
  margin: 8px 0 0;
  font-size: 10.5px;
  letter-spacing: 1.3px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
}
.receipt-dl dd {
  margin: 0;
  font-weight: 600;
  color: var(--navy);
}

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--navy);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.chip-btn[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.chip-lane-question {
  background: var(--paper);
  color: var(--blue);
}
.chip-lane-question::before { background: var(--blue); }
.chip-lane-concern {
  background: var(--gold-soft);
  color: var(--navy);
}
.chip-lane-concern::before { background: var(--navy); }
.chip-lane-repair {
  background: var(--navy);
  color: #fff;
}
.chip-lane-repair::before { background: var(--accent); }

.lane-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}
.lane-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 108px;
  text-align: left;
  border-radius: 14px;
  padding: 18px 16px;
  font-family: inherit;
  cursor: pointer;
  background: var(--card);
  color: var(--navy);
}
.lane-card strong {
  font-size: 1.25rem;
  font-weight: 700;
}
.lane-list-compact {
  gap: 8px;
  margin: 8px 0 16px;
}
.lane-list-compact .lane-card {
  min-height: 52px;
  padding: 12px 16px;
}
.lane-list-compact .lane-card strong {
  font-size: 1.05rem;
}
.lane-card[data-lane="question"] {
  border: 2px solid var(--blue);
}
.lane-card[data-lane="concern"] {
  border: 2px solid var(--navy);
  background: var(--gold-soft);
  color: var(--navy);
}
.lane-card[data-lane="concern"] .hint {
  color: var(--navy);
}
.lane-card[data-lane="repair"] {
  border: 2px solid var(--navy);
  background: var(--navy);
  color: #fff;
}
.lane-card[data-lane="repair"] .hint {
  color: var(--gold);
}

.urgency-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}
.urgency-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 44px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--card);
  color: var(--navy);
  font-family: inherit;
  cursor: pointer;
}
.urgency-card[aria-checked="true"] {
  border-color: var(--navy);
  background: var(--gold-soft);
}

.media-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.media-actions .btn + .btn { margin-top: 0; }
.media-actions-compact {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  grid-template-columns: none;
}
.media-actions-compact .text-link {
  align-self: flex-start;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.media-preview img,
.media-preview video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--gold-soft);
}
.media-preview .btn {
  margin-top: 8px;
}

@media (min-width: 640px) {
  .lane-list { gap: 14px; }
  .lane-card { min-height: 120px; padding: 20px 18px; }
  .yes-no { flex-direction: row; }
  .yes-no-opt { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .btn:active { transform: none; }
}
