:root {
  --bg: #f4f1ea;
  --surface: #fffdf8;
  --ink: #1f2a24;
  --muted: #5c6b62;
  --accent: #3d6b4f;
  --accent-dark: #2d5040;
  --warn: #b45309;
  --danger: #b42318;
  --border: #d9d2c5;
  --shadow: 0 10px 30px rgba(31, 42, 36, 0.08);
  --radius: 14px;
  --btn-radius: 6px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(61, 107, 79, 0.12), transparent 40%),
    var(--bg);
  min-height: 100vh;
}

a { color: var(--accent); }

.shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 3vw, 2.5rem);
  box-sizing: border-box;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.topbar-brand {
  min-width: 0;
}

.topbar-farm {
  font-size: 0.9rem;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.brand-logo {
  display: block;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
}

.auth-card .brand-logo {
  width: 2.5rem;
  height: 2.5rem;
}

.brand-text span { color: var(--accent); }

.nav-menu-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-menu-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--btn-radius);
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.nav-menu-btn:hover {
  border-color: var(--accent);
}

.nav-menu-btn.active {
  border-color: var(--accent);
  background: rgba(61, 107, 79, 0.1);
  color: var(--accent-dark);
}

.nav-home-icon {
  display: block;
}

.nav-messages-btn {
  position: relative;
}

.nav-messages-btn.has-unread {
  animation: nav-messages-pulse 1.6s ease-in-out infinite;
}

.nav-messages-icon {
  display: block;
}

.nav-messages-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}

.nav-messages-badge.hidden {
  display: none;
}

@keyframes nav-messages-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(61, 107, 79, 0.35);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 6px rgba(61, 107, 79, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-messages-btn.has-unread {
    animation: none;
  }
}

.admin-messages-list {
  display: grid;
  gap: 0.75rem;
}

.admin-message-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}

.admin-message-card.is-new {
  border-color: rgba(61, 107, 79, 0.45);
  box-shadow: 0 0 0 1px rgba(61, 107, 79, 0.12), var(--shadow);
}

.admin-message-card.is-closed {
  opacity: 0.72;
}

.admin-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.admin-message-meta .muted {
  font-size: 0.9rem;
}

.admin-message-subject {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.admin-message-body {
  white-space: pre-wrap;
  margin: 0.5rem 0 0.75rem;
  line-height: 1.45;
}

.admin-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.nav-menu-icon {
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 700;
  margin-top: -0.15rem;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 200;
  min-width: 210px;
  max-width: min(280px, calc(100vw - 2.5rem));
  padding: 0.35rem 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(31, 42, 36, 0.14);
}

.nav-menu button {
  display: block;
  width: 100%;
  padding: 0.55rem 1rem;
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.nav-menu button:hover {
  background: rgba(61, 107, 79, 0.1);
}

.nav-menu button.active {
  background: rgba(61, 107, 79, 0.14);
  color: var(--accent-dark);
  font-weight: 600;
}

.shell.subscription-locked #nav-home-btn,
.shell.subscription-locked .nav-menu [data-nav-panel="main"] button[data-page],
.shell.subscription-locked .nav-menu [data-nav-panel="main"] a.nav-menu-link,
.shell.subscription-locked .nav-menu [data-nav-panel="account"] button[data-page="profile"] {
  display: none;
}

.shell.subscription-locked .nav-menu [data-nav-account],
.shell.subscription-locked .nav-menu [data-page="billing"] {
  display: block;
}

.nav-menu-divider {
  height: 1px;
  margin: 0.35rem 0;
  background: var(--border);
}

.nav-menu-panel {
  display: block;
}

.nav-menu-panel.hidden {
  display: none;
}

.nav-menu-signout {
  color: var(--muted);
}

.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--btn-radius);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font: inherit;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.dashboard-stats-bar {
  display: flex;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  margin-bottom: 1rem;
}

.dashboard-stat-segment {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.85rem 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.15s;
}

.dashboard-stat-segment:not(:last-child) {
  border-right: 1px solid var(--border);
}

.dashboard-stat-segment:hover {
  background: rgba(61, 107, 79, 0.08);
}

.dashboard-stat-segment:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  z-index: 1;
}

.dashboard-stat-segment strong {
  font-size: 1.6rem;
  line-height: 1.1;
}

.dashboard-stat-segment span {
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-stat-segment-warn strong {
  color: var(--warn);
}

.dashboard-breeding-ready {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-breeding-ready-header {
  margin-bottom: 0.35rem;
}

.dashboard-breeding-ready-header h2 {
  margin: 0;
}

.dashboard-breeding-ready-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.dashboard-breeding-ready-icon {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 12px;
  line-height: 0;
}

.dashboard-breeding-ready-photo {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  background: #e8e2d7;
  border: 1px solid var(--border);
  display: block;
}

.dashboard-breeding-ready-icon:hover .dashboard-breeding-ready-photo,
.dashboard-breeding-ready-icon:focus-visible .dashboard-breeding-ready-photo {
  box-shadow: 0 0 0 2px var(--accent);
}

.dashboard-breeding-ready-icon:focus-visible {
  outline: none;
}

.dashboard-breeding-ready-sex {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.2rem;
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(31, 42, 36, 0.12);
  pointer-events: none;
}

.dashboard-kindle-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}

.dashboard-kindle-doe {
  font-weight: 500;
}

.dashboard-kindle-sep {
  color: var(--muted);
}

.dashboard-kindle-buck {
  font-size: inherit;
}

.table-actions .table-row-menu-wrap {
  display: inline-flex;
  vertical-align: middle;
}

h1, h2, h3 { margin: 0 0 0.75rem; }
.muted { color: var(--muted); }

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.35rem;
  margin-bottom: 1rem;
}

.page-header h1,
.page-header h2,
.page-header h3 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  min-width: 0;
}

.page-header-actions {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.page-header-close-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: var(--btn-radius);
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.page-header-close-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.page-header-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

.page-header-menu-btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: var(--btn-radius);
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.page-header-menu-btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.page-header-menu-btn[aria-expanded="true"] {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.page-header-menu-icon {
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 700;
  margin-top: -0.15rem;
}

.page-header-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 150;
  min-width: 200px;
  max-width: min(280px, calc(100vw - 2rem));
  width: max-content;
  margin: 0;
  padding: 0.35rem 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(31, 42, 36, 0.14);
}

.page-header-menu .action-menu-title {
  margin: 0;
  padding: 0.35rem 1rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.page-header-menu .action-menu-divider {
  height: 1px;
  margin: 0.35rem 0;
  background: var(--border);
}

.page-header-menu-item {
  display: block;
  width: 100%;
  padding: 0.55rem 1rem;
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.page-header-menu-item:hover:not(:disabled) {
  background: rgba(61, 107, 79, 0.1);
}

.page-header-menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-header-menu-item-danger {
  color: var(--danger);
}

.page-header-menu-item-emphasis {
  color: var(--accent-dark);
  font-weight: 600;
}

.page-header-menu-info {
  display: block;
  width: 100%;
  padding: 0.55rem 1rem 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.15rem;
}

.page-header-intro {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
}

.card > .page-header {
  margin-bottom: 0.5rem;
}

form label {
  display: block;
  margin: 0.6rem 0 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input, select, textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

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

.row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th, .table td {
  text-align: left;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--border);
}

.table th {
  white-space: nowrap;
}

.table-spread {
  table-layout: auto;
}

.table-spread .table-actions {
  width: 2.75rem;
  text-align: right;
  white-space: nowrap;
}

.thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #e8e2d7;
}

.rabbit-list-thumb-btn {
  display: inline-flex;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 10px;
  line-height: 0;
}

.rabbit-list-thumb-btn:hover .thumb,
.rabbit-list-thumb-btn:focus-visible .thumb {
  box-shadow: 0 0 0 2px var(--accent, #3d6b4f);
}

.rabbit-list-thumb-btn:focus-visible {
  outline: none;
}

.rabbit-photo-section {
  flex: 0 1 280px;
  max-width: 280px;
}

.rabbit-photo-current {
  display: block;
  width: 100%;
  max-width: 280px;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 1;
}

.rabbit-photo-placeholder {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #f5f1ea;
  font-size: 0.9rem;
}

.rabbit-photo-frame {
  position: relative;
  width: 100%;
}

.rabbit-photo-menu-wrap {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 2;
}

.rabbit-photo-menu-btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: var(--btn-radius);
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.rabbit-photo-menu-btn:hover,
.rabbit-photo-menu-btn[aria-expanded="true"] {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.rabbit-photo-menu-icon,
.rabbit-photo-menu-btn .camera-icon {
  display: block;
}

.rabbit-photo-menu.page-header-menu {
  top: auto;
  bottom: calc(100% + 0.4rem);
  right: 0;
  min-width: 11rem;
}

.rabbit-camera-panel {
  margin-top: 0.75rem;
  max-width: 320px;
}

.rabbit-camera-panel video {
  display: block;
  width: 100%;
  border-radius: 10px;
  background: #000;
}

.rabbit-camera-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.rabbit-gallery {
  margin-top: 1.25rem;
  width: 100%;
}

.rabbit-gallery-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.rabbit-gallery-title {
  margin: 0;
  font-size: 1.1rem;
}

.rabbit-gallery-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rabbit-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.rabbit-gallery-filter {
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--btn-radius);
  cursor: pointer;
}

.rabbit-gallery-filter.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.rabbit-gallery-upload-meta {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-alt, #f8f9fa);
}

.rabbit-gallery-primary-check {
  display: block;
  margin-top: 0.5rem;
}

.rabbit-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.rabbit-gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
}

.rabbit-gallery-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rabbit-gallery-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #f5f1ea;
  cursor: pointer;
}

.rabbit-gallery-card.is-primary .rabbit-gallery-thumb-btn {
  border-color: var(--accent);
}

.rabbit-gallery-thumb-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.rabbit-gallery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  align-items: center;
  font-size: 0.8rem;
}

.rabbit-gallery-chip {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--surface-alt, #eee);
  font-size: 0.75rem;
}

.rabbit-gallery-chip.is-primary-chip {
  background: var(--accent);
  color: #fff;
}

.rabbit-gallery-caption {
  flex: 1 1 100%;
}

.rabbit-gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.rabbit-gallery-actions .btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

.litter-kit-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.litter-kit-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.litter-kit-thumb-btn {
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.litter-kit-thumb {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f1ea;
}

.litter-kit-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.litter-kit-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.litter-kit-weight {
  font-weight: 600;
  color: var(--ink, inherit);
}

.litter-kit-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.genetics-form {
  margin-top: 0.5rem;
}

.add-rabbit-form .form-section-title {
  margin: 1.25rem 0 0.65rem;
  font-size: 1rem;
}

.add-rabbit-form .form-section-title:first-of-type {
  margin-top: 0;
}

.genetics-parent {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem 1rem;
  margin: 0 0 1rem;
}

.genetics-parent legend {
  font-weight: 600;
  padding: 0 0.35rem;
}

.genetics-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.genetics-mode label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.genetics-panel .row {
  margin-bottom: 0.5rem;
}

.genetics-current {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}

.pedigree-tree {
  font-size: 0.9rem;
  line-height: 1.45;
}

.pedigree-node {
  margin: 0.2rem 0;
}

.pedigree-children {
  margin-top: 0.35rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--border);
}

.pedigree-notes {
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.family-tree-modal {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.family-tree-modal.hidden {
  display: none;
}

.family-tree-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(31, 42, 36, 0.5);
  cursor: default;
}

.family-tree-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 1.5rem));
  max-height: min(92vh, 900px);
  overflow: auto;
  margin: 0;
  padding: 1.25rem 1.5rem 1.5rem;
}

.family-tree-modal.family-tree-modal--wide {
  padding: 0.75rem;
}

.family-tree-modal.family-tree-modal--wide .family-tree-modal-panel {
  width: min(98vw, 1600px);
  max-height: 96vh;
}

.family-tree-modal-toolbar {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.family-tree-graph-summary {
  margin: 0 0 0.75rem;
}

.family-tree-graph-scroll {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #faf8f4;
}

.family-graph-svg {
  display: block;
  min-width: 100%;
}

.family-graph-node.is-subject rect {
  filter: drop-shadow(0 2px 4px rgba(61, 107, 79, 0.18));
}

.family-tree-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.family-tree-modal-title {
  margin: 0 2rem 1rem 0;
  font-size: 1.2rem;
}

.family-tree-modal-body {
  display: grid;
  gap: 1.5rem;
}

.family-tree-section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--accent-dark);
}

.family-tree-ancestors {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 12rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.family-tree-gen {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-width: 11rem;
  padding: 0 0.85rem;
}

.family-tree-gen:first-child {
  padding-left: 0;
}

.family-tree-gen:not(:last-child) {
  border-right: 2px solid var(--border);
  margin-right: 0.85rem;
}

.family-tree-gen-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.65rem;
  text-align: center;
}

.family-tree-gen-slots {
  flex: 1;
  display: grid;
  grid-template-rows: repeat(var(--slot-count), minmax(4.5rem, 1fr));
  gap: 0.5rem;
  align-items: center;
  min-height: calc(var(--family-tree-max-rows, 1) * 4.75rem);
}

.family-tree-slot {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  justify-content: center;
  position: relative;
}

.family-tree-slot-role {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.family-tree-node {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: #fff;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: default;
}

button.family-tree-node {
  cursor: pointer;
}

button.family-tree-node:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(31, 42, 36, 0.08);
}

.family-tree-node.sex-buck {
  border-left: 4px solid #5b8ec9;
}

.family-tree-node.sex-doe {
  border-left: 4px solid #c96b8e;
}

.family-tree-node.sex-unknown,
.family-tree-node.empty,
.family-tree-node.restricted,
.family-tree-node.circular {
  border-left: 4px solid #c8c0b4;
}

.family-tree-node.is-subject {
  border-color: var(--accent);
  background: #f3faf5;
  box-shadow: 0 2px 8px rgba(61, 107, 79, 0.12);
}

.family-tree-node.manual {
  background: #faf8f4;
}

.family-tree-node-photo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.4rem;
  object-fit: cover;
  flex-shrink: 0;
  background: #ebe5da;
}

.family-tree-node-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--muted);
}

.family-tree-node-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.family-tree-node-name {
  font-size: 0.88rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.family-tree-node-meta,
.family-tree-node-farm {
  font-size: 0.76rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.family-tree-unknown {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.family-tree-descendants {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--border);
}

.family-tree-descendants > li {
  margin: 0.5rem 0;
}

.family-tree-descendant-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.family-tree-descendant-row .family-tree-node {
  max-width: 18rem;
}

.family-tree-descendant-role {
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .family-tree-modal-panel {
    width: calc(100% - 1rem);
    padding: 1rem;
  }

  .family-tree-gen {
    min-width: 9.5rem;
  }

  .family-tree-node-photo {
    width: 2.25rem;
    height: 2.25rem;
  }
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: #ebe5da;
}

.badge.warn { background: #fdecd5; color: var(--warn); }
.badge.danger { background: #fee4e2; color: var(--danger); }
.badge.ok { background: #d8f0e3; color: var(--accent-dark); }

.rabbits-page-toolbar {
  margin: 0;
}

.rabbits-page-toolbar .btn {
  margin: 0;
}

.rabbit-filters-panel {
  margin-bottom: 0.75rem;
}

.rabbit-filters-panel .rabbit-filter-summary {
  margin: 0;
}

.rabbit-filter-compact {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.rabbit-filters {
  margin-bottom: 0.75rem;
}

.rabbit-filters-row {
  align-items: end;
  gap: 0.75rem 1rem;
}

.rabbit-filters-row > div {
  flex: 1 1 140px;
  min-width: 120px;
}

.rabbit-filters-actions {
  flex: 0 0 auto;
  align-self: end;
}

.rabbit-filter-summary {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.hidden { display: none !important; }

button.linkish {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

button.linkish:hover {
  color: var(--accent-dark);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-card {
  width: min(420px, 100%);
  position: relative;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0 0.85rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.auth-back:hover {
  color: var(--accent-dark);
}

.auth-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.auth-form-actions .btn {
  width: auto;
  flex: 1 1 auto;
  min-width: 7rem;
}

/* ——— Landing / front page ——— */
.landing {
  --landing-ink: #f3f6f2;
  --landing-muted: rgba(243, 246, 242, 0.82);
  --landing-deep: #15241c;
  --landing-moss: #2f5a42;
  min-height: 100vh;
  background: #e8efe9;
  color: var(--ink);
  font-family: "Figtree", "Segoe UI", system-ui, sans-serif;
}

.landing-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--landing-ink);
}

.landing-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 35%;
  transform: scale(1.04);
  animation: landing-hero-drift 18s ease-in-out infinite alternate;
}

.landing-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(21, 36, 28, 0.25) 0%, rgba(21, 36, 28, 0.15) 35%, rgba(21, 36, 28, 0.78) 78%, rgba(21, 36, 28, 0.92) 100%),
    linear-gradient(90deg, rgba(21, 36, 28, 0.55) 0%, rgba(21, 36, 28, 0.2) 55%, rgba(21, 36, 28, 0.35) 100%);
}

.landing-hero-inner {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 8vh, 4.5rem);
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.35rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 6vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  animation: landing-rise 0.9s ease-out both;
}

.landing-brand-logo {
  width: clamp(2.4rem, 5vw, 3rem);
  height: clamp(2.4rem, 5vw, 3rem);
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.landing-brand-text span {
  color: #9dccb0;
  font-weight: 500;
}

.landing-headline {
  margin: 0 0 0.85rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.35rem, 3.4vw, 1.85rem);
  font-weight: 500;
  line-height: 1.25;
  max-width: 18ch;
  animation: landing-rise 0.9s ease-out 0.12s both;
}

.landing-lede {
  margin: 0 0 1.6rem;
  max-width: 46ch;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.55;
  color: var(--landing-muted);
  animation: landing-rise 0.9s ease-out 0.22s both;
}

.landing-section-intro p {
  font-size: 1.08rem;
}

.landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: landing-rise 0.9s ease-out 0.34s both;
}

.landing-cta .btn {
  width: auto;
  min-width: 8.5rem;
  font-family: inherit;
  font-weight: 600;
}

.landing-cta-primary {
  background: #e8f3ec;
  color: var(--landing-deep);
  border-color: #e8f3ec;
}

.landing-cta-primary:hover {
  background: #fff;
  border-color: #fff;
}

.landing-cta-secondary,
.landing-section-final .btn:not(.primary) {
  background: transparent;
  color: var(--landing-ink);
  border-color: rgba(243, 246, 242, 0.55);
}

.landing-cta-secondary:hover,
.landing-section-final .btn:not(.primary):hover {
  background: rgba(243, 246, 242, 0.12);
  border-color: rgba(243, 246, 242, 0.85);
}

.landing-section-final .btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.landing-section-final .btn.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.landing-section-final .btn:not(.primary) {
  color: var(--ink);
  border-color: var(--border);
  background: var(--surface);
}

.landing-section-final .btn:not(.primary):hover {
  background: #f0f4f1;
  border-color: var(--accent);
}

.landing-main {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2rem) 2rem;
}

.landing-section {
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(61, 107, 79, 0.18);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.landing-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.landing-section:last-child {
  border-bottom: none;
}

.landing-section h2 {
  margin: 0 0 0.55rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--landing-moss);
}

.landing-section p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

.landing-section-final {
  margin-top: 0.5rem;
  padding-top: 2rem;
}

.landing-section-final .landing-cta {
  margin-top: 1.25rem;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 2rem) 2rem;
  border-top: 1px solid rgba(61, 107, 79, 0.15);
  background: #dde8e0;
}

.landing-footer-brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  color: var(--landing-moss);
}

.landing-footer-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent-dark);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.landing-footer-link:hover {
  color: var(--ink);
}

@keyframes landing-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes landing-hero-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.2%, -0.8%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero-photo,
  .landing-brand,
  .landing-headline,
  .landing-lede,
  .landing-cta,
  .landing-section {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .landing-hero {
    align-items: flex-end;
    min-height: 92svh;
  }

  .landing-hero-photo {
    object-position: 62% 30%;
  }

  .landing-cta .btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }

.toast {
  position: fixed;
  right: 1rem;
  bottom: 2.5rem;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
  z-index: 20;
  max-width: 320px;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--danger); }

.app-revision {
  position: fixed;
  right: 0.65rem;
  bottom: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  opacity: 0.9;
  z-index: 15;
  pointer-events: none;
  user-select: none;
}

.risk-list { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.risk-list li { margin: 0.25rem 0; }

.cages-tabs { margin-bottom: 1rem; }

.cages-tabs-row {
  display: contents;
}

.cages-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cages-add-btn,
.action-icon-btn {
  flex-shrink: 0;
  min-width: 2.35rem;
  padding: 0.45rem 0.75rem;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 600;
}

.view-icon-btn,
.edit-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
}

.action-icon {
  display: block;
}

.layout-area-tabs {
  flex-wrap: wrap;
}

.layout-editor .layout-area-tabs,
.layout-editor .layout-tier-tabs {
  margin-bottom: 0.75rem;
}

.layout-frame {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-height: 0;
}

.layout-tab-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  background: rgba(61, 107, 79, 0.08);
  flex-shrink: 0;
}

.layout-tab-bar-top {
  border-bottom: 1px solid var(--border);
}

.layout-tab-bar-tiers {
  border-bottom: 1px solid var(--border);
}

.layout-tab-bar-bottom {
  border-top: 1px solid var(--border);
}

.layout-area-tabs,
.layout-tier-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
}

.layout-editor .layout-toolbar { margin-bottom: 1rem; }

.layout-shell {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.layout-side {
  flex: 0 0 200px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.layout-shelf h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.layout-cage-props {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  background: rgba(61, 107, 79, 0.05);
}

.layout-cage-props h3 {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
}

.layout-cage-props-name {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.layout-unplaced {
  min-height: 100px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(255, 253, 248, 0.8);
}

.layout-unplaced.drop-target {
  border-color: var(--accent);
  background: rgba(61, 107, 79, 0.08);
}

.layout-unplaced .layout-empty {
  margin: 0;
  font-size: 0.85rem;
}

.layout-canvas-wrap {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  max-width: 100%;
}

.layout-view {
  width: 100%;
}

.layout-view .layout-canvas-wrap {
  display: block;
  width: 100%;
  padding: 0.65rem;
  background: rgba(61, 107, 79, 0.04);
  box-sizing: border-box;
}

.layout-view .layout-area-tabs,
.layout-view .layout-tier-tabs {
  margin-bottom: 0;
}

.layout-grid {
  display: grid;
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  min-width: min(100%, 320px);
}

.layout-cell {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  min-height: 44px;
}

.layout-cell.drop-target {
  background: rgba(61, 107, 79, 0.3);
  outline: 2px solid var(--accent);
}

.layout-cage {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 0.3rem 0.4rem;
  cursor: grab;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  user-select: none;
  box-shadow: var(--shadow);
  position: relative;
}

.layout-cage.layout-cage-edit {
  touch-action: none;
  -webkit-user-select: none;
}

.layout-cage.layout-cage-pointer-drag {
  cursor: grabbing;
  box-shadow: 0 10px 28px rgba(31, 42, 36, 0.28);
  touch-action: none;
}

body.layout-pointer-dragging {
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

body.layout-pointer-dragging .layout-canvas-wrap {
  overflow: hidden;
}

.layout-cage.selected {
  outline: 3px solid var(--accent-dark);
  outline-offset: 1px;
}

.layout-cage.placed {
  z-index: 2;
}

.layout-cage.tier-2.placed { z-index: 3; transform: translateY(-3px); }
.layout-cage.tier-3.placed { z-index: 4; transform: translateY(-6px); }

.layout-tier-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(255, 253, 248, 0.9);
  border-radius: 4px;
  padding: 0 0.2rem;
}

.layout-cage-size {
  font-size: 0.7rem;
  color: var(--muted);
}

.layout-cage.over {
  border-color: var(--warn);
}

.layout-cage.available-mate {
  border-color: #1f8a4c;
  border-width: 3px;
  box-shadow: 0 0 0 4px rgba(46, 158, 91, 0.55), 0 0 14px 3px rgba(46, 158, 91, 0.45), var(--shadow);
  background: rgba(46, 158, 91, 0.3);
}

.layout-cage.available-mate .layout-cage-name {
  color: #0f5a30;
}

.layout-cage.available-mate.over {
  border-color: var(--warn);
}

@keyframes layout-cage-due-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(196, 122, 58, 0.55), var(--shadow);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(196, 122, 58, 0.22), var(--shadow);
  }
}

@keyframes layout-cage-overdue-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(176, 58, 58, 0.65), var(--shadow);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(176, 58, 58, 0.25), var(--shadow);
  }
}

.layout-cage.has-due-task {
  animation: layout-cage-due-pulse 1.6s ease-in-out infinite;
  border-color: #c47a3a;
}

.layout-cage.has-overdue-task {
  animation: layout-cage-overdue-pulse 1.25s ease-in-out infinite;
  border-color: #b03a3a;
}

@media (prefers-reduced-motion: reduce) {
  .layout-cage.has-due-task,
  .layout-cage.has-overdue-task {
    animation: none;
    outline: 2px solid #c47a3a;
  }
  .layout-cage.has-overdue-task {
    outline-color: #b03a3a;
  }
}

@keyframes layout-cage-locate-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 158, 91, 0.85), var(--shadow);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 18px rgba(46, 158, 91, 0), var(--shadow);
    transform: scale(1.14);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 158, 91, 0), var(--shadow);
    transform: scale(1);
  }
}

.layout-cage.locate-pulse {
  animation: layout-cage-locate-pulse 0.85s ease-out 6;
  border-color: #1f8a4c;
  border-width: 3px;
  z-index: 6;
}

.layout-cage.tier-2.placed.locate-pulse,
.layout-cage.tier-3.placed.locate-pulse {
  z-index: 6;
}

.layout-cage.dragging {
  opacity: 0.45;
  cursor: grabbing;
  pointer-events: none;
}

.layout-cage-name {
  font-weight: 600;
  word-break: break-word;
}

.layout-cage-count {
  color: var(--muted);
  font-size: 0.75rem;
}

.layout-cage-count.warn {
  color: var(--warn);
  font-weight: 600;
}

.layout-cage.has-solo-photo {
  padding: 0;
  overflow: hidden;
  justify-content: flex-end;
}

.layout-cage-photo {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: cover;
  display: block;
}

.layout-cage.has-solo-photo .layout-cage-name,
.layout-cage.has-solo-photo .layout-cage-size,
.layout-cage.has-solo-photo .layout-cage-count {
  padding: 0 0.3rem 0.15rem;
}

.layout-cage.has-solo-photo .layout-tier-badge {
  z-index: 1;
}

.layout-cage-kit-badge {
  position: absolute;
  top: 2px;
  left: 4px;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fffdf8;
  background: var(--accent-dark);
  border-radius: 999px;
  padding: 0 0.35rem;
  box-shadow: 0 1px 3px rgba(31, 42, 36, 0.35);
}

.layout-grid.view-mode .layout-cage-kit-badge {
  font-size: clamp(0.5rem, 0.95vmin, 0.68rem);
  top: 1px;
  left: 2px;
  padding: 0 0.28rem;
}

.layout-grid.view-mode {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(61, 107, 79, 0.06);
}

.layout-grid.view-mode .layout-cage.tier-2.placed,
.layout-grid.view-mode .layout-cage.tier-3.placed {
  transform: none;
}

.layout-grid.view-mode .layout-tier-badge {
  display: none;
}

.layout-grid.view-mode .layout-cell {
  display: none;
}

.layout-grid.view-mode .layout-cage {
  font-size: clamp(0.6rem, 1.1vmin, 0.8rem);
  line-height: 1.15;
  padding: 0.15rem 0.2rem;
  border-width: 1px;
  border-radius: 5px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.layout-grid.view-mode .layout-cage-size {
  display: none;
}

.layout-grid.view-mode .layout-cage-name {
  font-size: clamp(0.55rem, 1vmin, 0.72rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.layout-grid.view-mode .layout-cage-count {
  font-size: clamp(0.5rem, 0.95vmin, 0.68rem);
}

.layout-grid.view-mode .layout-cage.has-solo-photo {
  justify-content: flex-end;
}

.layout-grid.view-mode .layout-cage-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  flex: none;
  object-fit: cover;
  z-index: 0;
  opacity: 0.9;
}

.layout-grid.view-mode .layout-cage.has-solo-photo .layout-cage-name,
.layout-grid.view-mode .layout-cage.has-solo-photo .layout-cage-count {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0.05rem 0.15rem;
  background: rgba(255, 253, 248, 0.82);
}

.layout-room-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.layout-tier-actions {
  margin-top: -0.35rem;
}

.layout-view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.layout-shell-view {
  flex-wrap: nowrap;
}

.layout-filter-unassigned {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.5rem 0 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.layout-filter-unassigned input {
  margin: 0;
}

.layout-cage-detail {
  min-width: 0;
}

.layout-cage-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.layout-cage-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(31, 42, 36, 0.45);
  cursor: default;
}

.layout-cage-modal-panel {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100% - 2rem));
  max-height: min(85vh, 640px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1rem 1.25rem;
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(31, 42, 36, 0.2);
}

.layout-cage-modal-close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
}

.layout-cage-modal-close:hover {
  color: var(--text);
  background: rgba(31, 42, 36, 0.06);
}

.layout-cage-modal-panel .layout-cage-detail {
  padding-right: 0;
}

.layout-cage-detail-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  /* Keep the title/count clear of the absolute close control without skewing the body. */
  padding-right: 1.75rem;
}

.layout-cage-detail-name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.layout-cage-detail-count {
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.layout-cage-detail-count.warn {
  color: var(--warn);
  font-weight: 600;
}

.layout-cage-detail-body {
  margin-bottom: 0.25rem;
}

.layout-cage-kit-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0.35rem 0 0.15rem;
}

.layout-cage-kit-tile {
  position: relative;
  width: 100%;
}

.layout-cage-kit-sex-num {
  position: absolute;
  top: -0.28rem;
  right: -0.28rem;
  z-index: 2;
  box-sizing: border-box;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  border: 2px solid #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.layout-cage-kit-sex-num--buck {
  background: #2f6fed;
}

.layout-cage-kit-sex-num--doe {
  background: #e85a9b;
}

.layout-cage-kit-sex-num--unknown {
  background: #1a1a1a;
}

.layout-cage-kit-btn {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--surface, #fff) 92%, var(--accent, #2d5a3d) 8%);
  overflow: hidden;
  cursor: pointer;
}

.layout-cage-kit-btn:hover,
.layout-cage-kit-btn:focus-visible {
  border-color: var(--accent, #2d5a3d);
}

.layout-cage-kit-btn:focus-visible {
  outline: 2px solid var(--accent, #2d5a3d);
  outline-offset: 1px;
}

.layout-cage-kit-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.layout-cage-kit-tile .page-header-menu {
  min-width: 12rem;
}

.layout-cage-kit-menu {
  padding-top: 0.55rem;
}

.layout-cage-kit-details {
  padding: 0 1rem 0.45rem;
}

.layout-cage-kit-detail-name {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

.layout-cage-kit-detail-line {
  font-size: 0.86rem;
  line-height: 1.35;
}

.layout-cage-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.layout-cage-floating-menu {
  position: fixed;
  right: auto;
  z-index: 600;
}

.layout-cage-detail-row:last-child {
  border-bottom: none;
}

.layout-cage-detail-row.empty {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.layout-cage-detail-rabbit-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
  margin: 0;
  padding: 0.15rem 0.25rem 0.15rem 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  border-radius: 0.35rem;
}

.layout-cage-detail-rabbit-info:hover,
.layout-cage-detail-rabbit-info:focus-visible {
  background: color-mix(in srgb, var(--accent, #2d5a3d) 8%, transparent);
}

.layout-cage-detail-rabbit-info:focus-visible {
  outline: 2px solid var(--accent, #2d5a3d);
  outline-offset: 1px;
}

.layout-cage-detail-row .table-row-menu-wrap {
  flex-shrink: 0;
}

.layout-cage-detail-rabbit-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.3;
}

.layout-rabbit-meta {
  font-size: 0.85rem;
}

.layout-rabbit-status {
  font-size: 0.85rem;
  color: var(--accent-dark);
  font-weight: 500;
}

.layout-cage-detail-actions {
  margin-top: 0.75rem;
}

.add-to-cage-panel {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.add-to-cage-form select {
  width: 100%;
  margin: 0.35rem 0 0.5rem;
}

.add-to-cage-form-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.add-rabbit-breeding-status.hidden {
  display: none;
}

.doe-breeding-status-form {
  margin: 0.75rem 0 0;
}

.doe-breeding-status-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.doe-breeding-status-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.doe-breeding-status-row select {
  flex: 1 1 160px;
}

.life-stage-form {
  margin: 0.75rem 0 0;
}

.life-stage-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.life-stage-form-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.life-stage-form-row select {
  flex: 1 1 160px;
}

.temperament-form {
  margin: 0.5rem 0;
}

.temperament-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.temperament-form-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.temperament-form-row select {
  flex: 1 1 160px;
}

.dob-form {
  margin: 0.5rem 0;
}

.dob-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.dob-form-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.dob-form-row input[type="date"] {
  flex: 1 1 160px;
}

.birth-litter-form {
  margin: 0.5rem 0;
}

.birth-litter-form > label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.birth-litter-form-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.birth-litter-field {
  flex: 0 0 auto;
}

.birth-litter-field .sub-label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
  color: var(--muted, #5c6670);
}

.birth-litter-field input[type="number"] {
  width: 5rem;
  max-width: 100%;
}

.rabbit-profile-save-bar {
  position: sticky;
  bottom: 0.5rem;
  z-index: 4;
  margin-top: 1.25rem;
  padding: 0.85rem 0 0.25rem;
  display: flex;
  justify-content: flex-end;
  background: linear-gradient(to top, var(--surface, #fff) 55%, transparent);
}

.rabbit-profile-status-glance {
  margin: 0.35rem 0 0.85rem;
  color: var(--muted, #6b7280);
  font-size: 0.95rem;
}

.rabbit-profile-topics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.75rem 0.5rem;
  margin: 0.25rem 0 0.5rem;
  max-width: 28rem;
}

.rabbit-profile-topic-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.rabbit-profile-topic-btn-icon {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
}

.rabbit-profile-topic-btn:hover .rabbit-profile-topic-btn-icon,
.rabbit-profile-topic-btn:focus-visible .rabbit-profile-topic-btn-icon {
  border-color: var(--accent);
  background: rgba(61, 107, 79, 0.1);
  color: var(--accent-dark);
}

.rabbit-profile-topic-btn:focus-visible {
  outline: none;
}

.rabbit-profile-topic-btn-label {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--ink);
}

.rabbit-profile-topic-icon {
  display: block;
}

.rabbit-profile-topic-modal {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rabbit-profile-topic-modal.hidden {
  display: none;
}

.rabbit-profile-topic-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(31, 42, 36, 0.45);
  cursor: default;
}

.rabbit-profile-topic-modal-panel {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100% - 1.5rem));
  max-height: min(88vh, 720px);
  overflow: auto;
  margin: 0;
  padding: 1.1rem 1.15rem 1rem;
}

.rabbit-profile-topic-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.rabbit-profile-topic-modal-body {
  margin-top: 0.35rem;
}

.rabbit-profile-topic-modal-footer {
  position: sticky;
  bottom: 0;
  margin-top: 1rem;
  padding-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
  background: linear-gradient(to top, var(--surface, #fff) 65%, transparent);
}

.rabbit-profile-topic-modal-footer.hidden {
  display: none;
}

.rabbit-profile-status {
  margin: 0 0 0.25rem;
}

.rabbit-profile-status-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.rabbit-profile-status .life-stage-form {
  margin-top: 0;
}

.rabbit-profile-status .doe-breeding-status-form {
  margin-top: 0.5rem;
}

.profile-collapse-general {
  margin-top: 0.75rem;
}

.rabbit-gallery-header-actions-only {
  justify-content: flex-end;
}

.rabbit-profile-form .dob-form,
.rabbit-profile-form .introduced-date-form,
.rabbit-profile-form .birth-litter-form,
.rabbit-profile-form .life-stage-form,
.rabbit-profile-form .doe-breeding-status-form,
.rabbit-profile-form .temperament-form {
  margin-top: 0.75rem;
}

.birth-litter-form-row .btn {
  margin-left: auto;
}

.rabbit-history-header {
  margin-top: 1.25rem;
}

.profile-collapse {
  margin-top: 1.25rem;
}

.profile-collapse-mating {
  margin-top: 1rem;
}

.profile-collapse > .profile-collapse-summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  min-height: 2.25rem;
}

.profile-collapse > .profile-collapse-summary::-webkit-details-marker {
  display: none;
}

.profile-collapse-summary-main {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

.profile-collapse-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.profile-collapse-count {
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-collapse-summary-main::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.15rem;
  border-right: 2px solid var(--muted, #6b7280);
  border-bottom: 2px solid var(--muted, #6b7280);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  translate: 0 -0.05rem;
}

.profile-collapse[open] > .profile-collapse-summary .profile-collapse-summary-main::before {
  transform: rotate(45deg);
  translate: 0 -0.15rem;
}

.profile-collapse-aside {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.profile-collapse-aside .page-header-actions {
  margin: 0;
}

.profile-collapse-body {
  margin-top: 0.5rem;
}

.rabbit-detail-topbar {
  margin: -0.25rem 0 0.75rem;
}

.rabbit-detail-topbar.page-header {
  margin-bottom: 0.75rem;
}

.rabbit-detail-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rabbit-detail-info {
  min-width: 0;
}

.rabbit-detail-title {
  margin: 0;
}

.rabbit-inactive-notice {
  margin: 0 0 0.75rem;
}

.rabbit-loan-return {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.rabbit-loan-return .rabbit-inactive-notice {
  margin: 0;
}

.rabbit-rename-form {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.rabbit-rename-form input {
  width: 100%;
  max-width: 24rem;
}

#rabbit-detail:not(:empty) {
  margin-bottom: 1rem;
}

.rabbit-age-label {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}

.rabbit-timeline {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  border-left: 2px solid var(--border);
}

.breeding-datetime-row input[type="time"] {
  min-width: 8.5rem;
}

/* Shared mobile-friendly list tables (Breedings, Litters, Cages) */
.list-table-card {
  overflow: visible;
}

.list-table {
  table-layout: auto;
  width: 100%;
}

.list-table th,
.list-table td {
  vertical-align: middle;
}

.list-table th {
  white-space: nowrap;
}

.list-row-main {
  min-width: 0;
}

.list-row-single {
  font-weight: 560;
  font-size: 1rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
}

.list-row-single-sep {
  font-weight: 500;
  opacity: 0.55;
}

.list-row-single-meta {
  font-weight: 500;
}

.list-row-stack {
  display: none;
}

.list-row-main.is-stacked .list-row-single {
  display: none;
}

.list-row-main.is-stacked .list-row-stack {
  display: block;
}

.list-row-primary {
  font-weight: 560;
  line-height: 1.3;
  word-break: break-word;
}

.list-row-meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.88rem;
  line-height: 1.35;
  word-break: break-word;
}

.list-table th.table-actions,
.list-table td.table-actions {
  width: 2.75rem;
  padding-left: 0.25rem;
  padding-right: 0;
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

.list-table td.table-actions .table-row-menu-wrap,
.list-table td.table-actions .page-header-menu-wrap {
  display: inline-flex;
  justify-content: flex-end;
}

.list-col-mobile {
  display: none;
}

.breeding-list-table td.table-actions .btn {
  padding: 0.35rem 0.5rem;
}

.litters-list-table th.litter-kits-col,
.litters-list-table td.litter-kits-col {
  width: 1%;
  min-width: 6.75rem;
  text-align: center;
  white-space: nowrap;
}

.litters-list-table .litter-kit-age-cell {
  white-space: nowrap;
}

.litters-list-table .litter-alive-cell {
  line-height: 1.3;
  white-space: normal;
}

.litters-list-table .litter-alive-now {
  display: block;
  font-weight: 560;
}

.litters-list-table .litter-alive-detail {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.88rem;
  line-height: 1.35;
}

@media (max-width: 700px) {
  .list-col-desktop {
    display: none !important;
  }

  .list-col-mobile {
    display: table-cell;
  }

  /* Plan: always double-line primary + muted meta under 700px */
  .list-row-main .list-row-single {
    display: none;
  }

  .list-row-main .list-row-stack {
    display: block;
  }

  .list-table th.table-actions,
  .list-table td.table-actions {
    position: sticky;
    right: 0;
    background: var(--surface);
    z-index: 2;
    box-shadow: -6px 0 8px -6px rgba(31, 42, 36, 0.18);
  }

  .list-table td.table-actions {
    z-index: 1;
  }

  .cages-list-table .cage-rabbit-thumb {
    width: 32px;
    height: 32px;
  }

  .cages-list-table th.cage-rabbits-col,
  .cages-list-table td.cage-rabbits-col {
    text-align: center;
    width: 4.5rem;
  }
}

.breeding-notes-cell {
  max-width: 16rem;
  font-size: 0.9rem;
}

.breeding-note-line + .breeding-note-line {
  margin-top: 0.35rem;
}

.breeding-notes-row textarea {
  min-height: 4rem;
}

.breeding-completed-table .breeding-summary-cell {
  font-size: 0.95rem;
}

.breeding-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.breeding-detail-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(31, 42, 36, 0.45);
  cursor: default;
}

.breeding-detail-modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 2rem));
  max-height: min(85vh, 640px);
  overflow: auto;
  margin: 0;
}

.breeding-detail-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.contact-admin-modal {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.contact-admin-modal.hidden {
  display: none;
}

.contact-admin-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(31, 42, 36, 0.45);
  cursor: default;
}

.contact-admin-modal-panel {
  position: relative;
  z-index: 1;
  width: min(480px, calc(100% - 2rem));
  max-height: min(88vh, 640px);
  overflow: auto;
  margin: 0;
}

.contact-admin-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.daily-due-modal {
  position: fixed;
  inset: 0;
  z-index: 460;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.daily-due-modal.hidden {
  display: none;
}

.daily-due-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(31, 42, 36, 0.45);
  cursor: default;
}

.daily-due-modal-panel {
  position: relative;
  z-index: 1;
  width: min(480px, calc(100% - 2rem));
  max-height: min(88vh, 640px);
  overflow: auto;
  margin: 0;
}

.daily-due-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.daily-due-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.daily-due-item {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(61, 107, 79, 0.04);
}

.daily-due-item-overdue {
  border-color: rgba(199, 80, 80, 0.45);
  background: rgba(199, 80, 80, 0.08);
}

.daily-due-item-clickable {
  cursor: pointer;
}

.daily-due-item-clickable:hover {
  border-color: rgba(61, 107, 79, 0.45);
  background: rgba(61, 107, 79, 0.08);
}

.daily-due-workflow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.layout-cage-detail-tasks {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.layout-cage-detail-litters {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.layout-cage-litter-block {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: color-mix(in srgb, var(--surface, #fff) 88%, var(--primary, #3d6b4f) 12%);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.layout-cage-litter-info-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--accent, #2d5a3d);
  cursor: pointer;
}

.layout-cage-litter-info-btn:hover,
.layout-cage-litter-info-btn:focus-visible {
  border-color: var(--accent, #2d5a3d);
  background: color-mix(in srgb, var(--accent, #2d5a3d) 12%, #fff);
}

.layout-cage-litter-info-btn:focus-visible {
  outline: 2px solid var(--accent, #2d5a3d);
  outline-offset: 1px;
}

.layout-cage-litter-info-icon {
  display: block;
}

.layout-cage-litter-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.layout-cage-litter-line {
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--text);
}

.layout-cage-litter-line-label {
  font-weight: 600;
  color: var(--muted);
}

.layout-cage-litter-fact {
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--text);
}

.layout-cage-litter-fact-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.05rem;
}

.layout-cage-litter-link {
  font-size: 0.95rem;
}

.layout-cage-detail-tasks-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.rabbit-profile-topic-btn.disabled,
.rabbit-profile-topic-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.daily-due-item-type {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.daily-due-item-date {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.daily-due-item-date.warn {
  color: var(--warn);
  font-weight: 600;
}

.dashboard-due-tasks-header {
  align-items: center;
  margin-bottom: 0.75rem;
}

.dashboard-due-tasks-header h2 {
  margin: 0;
}

.dashboard-due-list {
  margin: 0;
}

.daily-due-item-summary {
  margin: 0;
  font-weight: 600;
}

.daily-due-item-details {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
}

.daily-due-confirm {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-dark);
  cursor: pointer;
  user-select: none;
}

.daily-due-confirm input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.daily-due-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  justify-content: flex-end;
}

.contact-admin-modal-panel label {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.contact-admin-modal-panel select,
.contact-admin-modal-panel input,
.contact-admin-modal-panel textarea {
  width: 100%;
  font: inherit;
}

.contact-admin-modal-panel textarea {
  resize: vertical;
  min-height: 7rem;
}

.subscription-lock-notice {
  border-color: rgba(180, 35, 24, 0.35);
  background: rgba(180, 35, 24, 0.04);
}

.subscription-lock-notice h2 {
  margin: 0.75rem 0 0.35rem;
}

.subscription-lock-notice p {
  margin-bottom: 0;
}

.subscription-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.subscription-stats .stat {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
}

.subscription-stats .stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

.subscription-stats .stat strong {
  color: var(--accent-dark);
  font-size: 1.15rem;
}

.billing-summary-card {
  margin-bottom: 1rem;
}

.subscription-tier-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.subscription-tier-list > div {
  display: grid;
  grid-template-columns: minmax(5rem, 0.7fr) minmax(10rem, 1.5fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.subscription-tier-list > div:last-child {
  border-bottom: none;
}

.subscription-tier-list span {
  color: var(--muted);
}

.subscription-tier-list b {
  color: var(--accent-dark);
}

@media (max-width: 720px) {
  .subscription-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subscription-tier-list > div {
    grid-template-columns: 1fr auto;
  }

  .subscription-tier-list span {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.breeding-detail-dl {
  display: grid;
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
}

.breeding-detail-dl > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem 1rem;
  align-items: start;
}

.breeding-detail-dl dt {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
}

.breeding-detail-dl dd {
  margin: 0;
}

.breeding-detail-notes h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.breeding-detail-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0;
}

.pairing-history-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.pairing-history-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.pairing-history-item:last-child {
  border-bottom: none;
}

.pairing-note {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
}

.pairing-litter-row {
  margin-top: 0.35rem;
}

.pairing-litter-link,
.litter-history-link {
  font: inherit;
  padding: 0;
}

.profile-collapse-litters {
  margin-top: 1rem;
}

.rabbit-timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.5rem 0 0.5rem 0.75rem;
  margin-left: 0.35rem;
  position: relative;
}

.rabbit-timeline-item .rabbit-timeline-delete {
  margin-left: auto;
}

.rabbit-timeline-item::before {
  content: "";
  position: absolute;
  left: -0.45rem;
  top: 0.85rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}

.rabbit-timeline-item.type-health::before {
  background: var(--danger);
}

.rabbit-timeline-item.type-mated::before,
.rabbit-timeline-item.type-kindled::before,
.rabbit-timeline-item.type-born::before {
  background: var(--accent-dark);
}

.rabbit-timeline-date {
  flex: 0 0 6.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.rabbit-timeline-body {
  flex: 1 1 auto;
  min-width: 0;
}

.rabbit-timeline-summary {
  font-size: 0.92rem;
}

.rabbit-timeline-details {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
}

.rabbit-timeline-delete {
  flex-shrink: 0;
  padding: 0.1rem 0.45rem;
  line-height: 1.2;
  font-size: 1.1rem;
}

.add-history-form textarea {
  width: 100%;
  min-height: 3rem;
}

.weight-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 5rem;
  margin: 0.5rem 0 0.75rem;
  padding: 0.5rem 0.25rem 0;
  border-bottom: 1px solid var(--border);
}

.weight-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.weight-bar {
  width: 100%;
  max-width: 2.5rem;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
}

.weight-bar-label {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.weight-trend-summary {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.weight-trend-summary.up,
.weight-change.up {
  color: #2d6a3e;
}

.weight-trend-summary.down,
.weight-change.down {
  color: #a33;
}

.weight-table td {
  vertical-align: middle;
}

.weight-form .row {
  gap: 1rem;
}

.farm-rules-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.farm-rules-list li {
  margin: 0.25rem 0;
}

.farm-rules-form .farm-rules-field {
  margin-bottom: 1rem;
}

.farm-rules-field-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 12rem;
}

.farm-rules-field-row input {
  flex: 1;
}

.farm-rules-hint {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}

.network-loans-subhead {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
}

.network-loans-subhead:first-of-type {
  margin-top: 0.5rem;
}

.network-loans-table {
  margin-bottom: 0.25rem;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.calendar-title {
  margin: 0;
  font-size: 1.15rem;
  text-align: center;
  flex: 1;
}

.cal-grid-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}

.cal-cell {
  min-height: 3.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.cal-cell-empty {
  border: none;
  background: transparent;
  min-height: 0;
}

.cal-cell:hover:not(.cal-cell-empty) {
  border-color: var(--accent);
}

.cal-today {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.cal-selected:not(.cal-day-cycle) {
  background: rgba(61, 107, 79, 0.12);
  border-color: var(--accent-dark);
}

.cal-cell.cal-day-mated:not(.cal-day-cycle) {
  background: rgba(61, 107, 79, 0.22);
  border-color: var(--accent-dark);
}

.cal-cell.cal-day-cycle {
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.cal-cell.cal-day-cycle-2 {
  animation-duration: 4s;
}

.cal-cell.cal-day-cycle-3 {
  animation-duration: 6s;
}

.cal-cell.cal-day-cycle.cal-selected {
  box-shadow: inset 0 0 0 2px var(--accent-dark);
}

@keyframes cal-hl-cycle-health-due-expected-kindle {
  0%,
  49.999% {
    background-color: rgba(199, 80, 80, 0.2);
    border-color: #c75050;
  }
  50%,
  100% {
    background-color: rgba(122, 90, 199, 0.24);
    border-color: #7a5ac7;
  }
}

@keyframes cal-hl-cycle-health-due-mated {
  0%,
  49.999% {
    background-color: rgba(199, 80, 80, 0.2);
    border-color: #c75050;
  }
  50%,
  100% {
    background-color: rgba(61, 107, 79, 0.22);
    border-color: var(--accent-dark);
  }
}

@keyframes cal-hl-cycle-expected-kindle-mated {
  0%,
  49.999% {
    background-color: rgba(122, 90, 199, 0.24);
    border-color: #7a5ac7;
  }
  50%,
  100% {
    background-color: rgba(61, 107, 79, 0.22);
    border-color: var(--accent-dark);
  }
}

@keyframes cal-hl-cycle-health-due-expected-kindle-mated {
  0%,
  33.332% {
    background-color: rgba(199, 80, 80, 0.2);
    border-color: #c75050;
  }
  33.333%,
  66.666% {
    background-color: rgba(122, 90, 199, 0.24);
    border-color: #7a5ac7;
  }
  66.667%,
  100% {
    background-color: rgba(61, 107, 79, 0.22);
    border-color: var(--accent-dark);
  }
}

.cal-cell.cal-day-cycle-2.cal-day-cycle-health-due-expected-kindle {
  animation-name: cal-hl-cycle-health-due-expected-kindle;
}

.cal-cell.cal-day-cycle-2.cal-day-cycle-health-due-mated {
  animation-name: cal-hl-cycle-health-due-mated;
}

.cal-cell.cal-day-cycle-2.cal-day-cycle-expected-kindle-mated {
  animation-name: cal-hl-cycle-expected-kindle-mated;
}

.cal-cell.cal-day-cycle-3.cal-day-cycle-health-due-expected-kindle-mated {
  animation-name: cal-hl-cycle-health-due-expected-kindle-mated;
}

@media (prefers-reduced-motion: reduce) {
  .cal-cell.cal-day-cycle {
    animation: none;
  }

  .cal-cell.cal-day-cycle-2.cal-day-cycle-health-due-expected-kindle {
    background-color: rgba(199, 80, 80, 0.2);
    border-color: #c75050;
  }

  .cal-cell.cal-day-cycle-2.cal-day-cycle-health-due-mated {
    background-color: rgba(199, 80, 80, 0.2);
    border-color: #c75050;
  }

  .cal-cell.cal-day-cycle-2.cal-day-cycle-expected-kindle-mated {
    background-color: rgba(122, 90, 199, 0.24);
    border-color: #7a5ac7;
  }

  .cal-cell.cal-day-cycle-3.cal-day-cycle-health-due-expected-kindle-mated {
    background-color: rgba(199, 80, 80, 0.2);
    border-color: #c75050;
  }
}

.cal-cell.cal-day-expected-kindle:not(.cal-day-cycle) {
  background: rgba(122, 90, 199, 0.24);
  border-color: #7a5ac7;
}

.cal-cell.cal-day-nesting-box:not(.cal-day-cycle) {
  background: rgba(166, 124, 82, 0.22);
  border-color: #a67c52;
}

.cal-cell.cal-day-nesting-box-remove:not(.cal-day-cycle) {
  background: rgba(143, 104, 66, 0.28);
  border-color: #8f6842;
}

.cal-cell.cal-day-kits-wean:not(.cal-day-cycle) {
  background: rgba(61, 107, 79, 0.2);
  border-color: var(--accent);
}

.cal-cell.cal-day-health-due:not(.cal-day-cycle) {
  background: rgba(199, 80, 80, 0.2);
  border-color: #c75050;
}

.cal-cell.cal-day-mated.cal-selected:not(.cal-day-cycle) {
  background: rgba(61, 107, 79, 0.3);
  border-color: var(--accent-dark);
}

.cal-cell.cal-day-expected-kindle.cal-selected:not(.cal-day-cycle) {
  background: rgba(122, 90, 199, 0.32);
  border-color: #6a4ab7;
}

.cal-cell.cal-day-nesting-box.cal-selected:not(.cal-day-cycle) {
  background: rgba(166, 124, 82, 0.3);
  border-color: #8f6842;
}

.cal-cell.cal-day-nesting-box-remove.cal-selected:not(.cal-day-cycle) {
  background: rgba(143, 104, 66, 0.36);
  border-color: #745436;
}

.cal-cell.cal-day-kits-wean.cal-selected:not(.cal-day-cycle) {
  background: rgba(61, 107, 79, 0.3);
  border-color: var(--accent-dark);
}

.cal-cell.cal-day-health-due.cal-selected:not(.cal-day-cycle) {
  background: rgba(199, 80, 80, 0.28);
  border-color: #b54545;
}

.cal-day-num {
  font-size: 0.85rem;
  font-weight: 600;
}

.cal-dots {
  display: flex;
  gap: 2px;
  margin-top: 0.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.cal-dot.type-mated {
  background: #5a7fc7;
}

.cal-dot.type-mated-successful {
  background: var(--accent-dark);
}

.cal-dot.type-expected_kindle {
  background: #7a5ac7;
}

.cal-dot.type-pregnancy_check {
  background: #b8860b;
}

.cal-dot.type-nesting_box {
  background: #a67c52;
}

.cal-dot.type-nesting_box_remove {
  background: #8f6842;
}

.cal-dot.type-kits_wean {
  background: var(--accent);
}

.cal-dot.type-baby_monitoring {
  background: #c47a3a;
}

.cal-dot.type-kindled {
  background: #c75a8a;
}

.cal-legend {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.cal-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cal-dot.type-born {
  background: #7a5ac7;
}

.cal-dot.type-weight {
  background: #8a6a3d;
}

.cal-dot.type-health,
.cal-dot.type-health_followup {
  background: #c75050;
}

.cal-day-detail {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.cal-day-detail h4 {
  margin: 0 0 0.75rem;
}

.cal-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cal-event-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.cal-event-item:last-child {
  border-bottom: none;
}

.cal-event-type {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-right: 0.5rem;
}

.cal-event-summary {
  font-weight: 500;
}

.cal-event-rabbit {
  margin-left: 0.5rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.8rem;
}

.cal-event-details {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}

.table-actions {
  white-space: nowrap;
}

.table-actions .btn {
  margin-right: 0.35rem;
}

.table-actions .action-menu-wrap {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 0;
}

.rabbits-table th:nth-child(3),
.rabbits-table td:nth-child(3) {
  width: auto;
}

.rabbits-list-table .rabbit-list-thumb-btn .thumb {
  width: 40px;
  height: 40px;
}

.rabbit-status-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  line-height: 1.3;
}

.rabbit-status-label {
  font-weight: 560;
}

.rabbit-status-days {
  font-size: 0.88rem;
  white-space: nowrap;
}

.rabbits-list-table td.list-col-desktop .rabbit-status-cell {
  min-width: 4.5rem;
}

.rabbit-list-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.rabbit-list-name .sex-symbol {
  flex-shrink: 0;
  font-size: 1.05rem;
  line-height: 1;
}

.rabbit-sort-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.rabbit-sort-btn {
  border: none;
  background: transparent;
  padding: 0.1rem 0.15rem;
  line-height: 1;
  cursor: pointer;
  color: #d4cdc2;
  vertical-align: middle;
}

.rabbit-sort-btn:hover {
  color: #a8a095;
}

.rabbit-sort-btn-active {
  color: var(--accent);
}

.rabbit-sort-btn-active:hover {
  color: var(--accent-dark);
}

.rabbit-sort-icon {
  display: block;
  font-size: 0.65rem;
}

.sex-symbol {
  display: inline-block;
  min-width: 1.25rem;
}

.rabbit-stock-leave-wrap {
  position: relative;
}

.rabbit-stock-leave-wrap .action-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 50;
  margin-top: 0;
  width: min(260px, calc(100vw - 2rem));
}

.rabbit-detail-topbar .page-header-actions {
  grid-column: 2;
  grid-row: 1;
}

.table-actions .btn:last-child {
  margin-right: 0;
}

.cages-list-table .list-col-desktop {
  text-align: center;
}

.cages-list-table th.list-col-desktop:nth-child(2),
.cages-list-table td.list-col-desktop:nth-child(2) {
  text-align: left;
}

.cages-list-table .cage-rabbits-cell {
  justify-content: center;
  max-width: none;
  margin: 0 auto;
}

.cage-rabbits-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  max-width: 12rem;
}

.cage-rabbit-thumb-btn {
  display: inline-flex;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  line-height: 0;
}

.cage-rabbit-thumb-btn:hover .cage-rabbit-thumb,
.cage-rabbit-thumb-btn:focus-visible .cage-rabbit-thumb {
  box-shadow: 0 0 0 2px var(--accent, #3d6b4f);
}

.cage-rabbit-thumb-btn:focus-visible {
  outline: none;
}

.cage-rabbit-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  background: #e8e2d7;
  flex-shrink: 0;
}

.cage-rabbits-cell-over .cage-rabbit-thumb {
  box-shadow: 0 0 0 2px var(--warn);
}

.team-member-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.team-member-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.team-member-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.team-member-row:first-child {
  padding-top: 0;
}

.team-member-main {
  min-width: 0;
  flex: 1 1 12rem;
}

.team-member-name {
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.team-member-email {
  margin-top: 0.15rem;
  font-size: 0.92rem;
  line-height: 1.3;
  word-break: break-word;
}

.team-member-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.team-member-actions select {
  min-width: 6rem;
}

.team-member-self {
  background: rgba(61, 107, 79, 0.06);
  margin: 0 -0.85rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  border-radius: 8px;
}

.team-table select {
  min-width: 6rem;
}

.team-member-self td {
  background: rgba(61, 107, 79, 0.06);
}

.layout-cage-detail h3 {
  margin: 0 0 0.35rem;
}

.layout-cage-view {
  cursor: pointer;
}

.layout-cage-view:hover {
  border-color: var(--accent-dark);
  box-shadow: 0 4px 14px rgba(31, 42, 36, 0.12);
}

.layout-cage-view.selected {
  outline: 3px solid var(--accent-dark);
  outline-offset: 1px;
}

.layout-cage-rabbit-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.layout-cage-rabbit-item:last-child {
  border-bottom: none;
}

.action-menu-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
}

.action-menu-wrap:has(.action-menu:not(.hidden)) {
  flex: 1 1 100%;
  align-items: stretch;
}

.action-menu-wrap:has(.action-menu:not(.hidden)) .action-menu {
  width: 100%;
}

.action-menu {
  width: min(100%, 260px);
  margin-top: 0.35rem;
  padding: 0.35rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.action-menu-title {
  margin: 0;
  padding: 0.35rem 0.75rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.action-menu-item {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.action-menu-item:hover:not(:disabled) {
  background: rgba(61, 107, 79, 0.1);
}

.action-menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.action-menu-divider {
  height: 1px;
  margin: 0.35rem 0;
  background: var(--border);
}

.action-menu-sub {
  padding: 0.5rem 0.75rem 0.35rem;
  border-top: 1px solid var(--border);
}

.action-menu-sub label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.action-menu-sub select {
  width: 100%;
  margin-bottom: 0.5rem;
}

.action-menu-sub-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.layout-rabbit-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.health-finding {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  max-width: 16rem;
}

.health-closed-date {
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.health-close-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.health-close-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(31, 42, 36, 0.45);
  cursor: default;
}

.health-close-modal-panel {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100% - 2rem));
  max-height: min(85vh, 520px);
  overflow: auto;
  margin: 0;
}

@media (max-width: 700px) {
  .topbar-farm {
    white-space: normal;
  }

  .rabbit-detail-body {
    gap: 1rem;
  }

  .rabbit-photo-section {
    width: 100%;
    max-width: none;
    flex: none;
  }

  .rabbit-photo-current,
  .rabbit-photo-placeholder {
    width: 100%;
    max-width: none;
    max-height: min(85vw, 420px);
    margin: 0 auto;
  }

  .rabbit-camera-panel {
    max-width: none;
    width: 100%;
  }
}

@media (min-width: 701px) {
  .rabbit-detail-body {
    flex-direction: row;
    align-items: flex-start;
  }

  .rabbit-detail-info {
    flex: 1 1 auto;
  }
}
.recommended-bucks-modal {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.recommended-bucks-modal.hidden {
  display: none;
}

.recommended-bucks-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(31, 42, 36, 0.45);
  cursor: default;
}

.recommended-bucks-modal-panel {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100% - 2rem));
  max-height: min(88vh, 780px);
  margin: 0;
  margin-bottom: 0;
  padding: 1.1rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}

.recommended-bucks-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: var(--btn-radius);
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
}

.recommended-bucks-modal-head {
  flex: 0 0 auto;
  padding-right: 2.5rem;
}

.recommended-bucks-modal-head h3 {
  margin: 0 0 0.35rem;
}

.recommended-bucks-modal-subtitle {
  margin: 0 0 0.65rem;
}

.recommended-bucks-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.recommended-bucks-toggle input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  cursor: pointer;
}

.recommended-bucks-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.recommended-bucks-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.recommended-buck-card {
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  padding: 0.85rem 0.9rem;
  background: var(--surface);
}

.recommended-buck-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.recommended-buck-card-header-left {
  min-width: 0;
  flex: 1 1 auto;
}

.recommended-buck-name {
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
}

.recommended-buck-farm {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  line-height: 1.35;
}

.recommended-buck-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.recommended-buck-score {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.buck-rec-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.buck-rec-label-best {
  background: #d4edda;
  color: #155724;
}

.buck-rec-label-good {
  background: #d1ecf1;
  color: #0c5460;
}

.buck-rec-label-caution {
  background: #fff3cd;
  color: #856404;
}

.buck-rec-label-avoid {
  background: #f8d7da;
  color: #721c24;
}

.recommended-buck-meta {
  margin-bottom: 0.65rem;
}

.recommended-buck-meta > div {
  grid-template-columns: 7.5rem 1fr;
}

.recommended-buck-reasons {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.recommended-buck-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recommended-buck-actions .btn {
  width: auto;
}

.recommended-bucks-modal-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.recommended-bucks-modal-footer .btn {
  width: auto;
}

/* Public marketplace / farm profile / invite pages */
.public-view {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(61, 107, 79, 0.12), transparent),
    linear-gradient(180deg, #f7f3ec 0%, #efe8dc 100%);
  color: var(--text);
}

.public-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 252, 247, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
}

.public-brand span span {
  color: var(--accent);
}

.public-top-nav {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.public-top-nav a {
  color: var(--accent-dark, #2f5440);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.public-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.public-section {
  margin-top: 1.75rem;
}

.public-section h2 {
  margin-bottom: 0.75rem;
}

.public-farm-desc {
  white-space: pre-wrap;
  line-height: 1.5;
}

.public-listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.public-listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.public-listing-card.is-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.public-listing-card.is-clickable:hover,
.public-listing-card.is-clickable:focus-visible {
  border-color: var(--accent, #3d6b4f);
  box-shadow: 0 4px 14px rgba(31, 42, 36, 0.12);
  outline: none;
}

.public-listing-card.is-clickable:focus-visible {
  outline: 2px solid var(--accent, #3d6b4f);
  outline-offset: 2px;
}

.public-listing-open-hint {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
}

.listing-detail-panel {
  width: min(760px, calc(100% - 2rem));
}

.listing-detail-hero-wrap {
  margin-top: 0.25rem;
}

.listing-detail-hero {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #e8e2d7;
  display: block;
}

.listing-detail-hero-label {
  margin: 0.4rem 0 0.5rem;
  font-size: 0.9rem;
}

.listing-detail-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.listing-detail-thumb {
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0;
  background: #e8e2d7;
  width: 64px;
  height: 64px;
  overflow: hidden;
  cursor: pointer;
}

.listing-detail-thumb.is-active {
  border-color: var(--accent, #3d6b4f);
}

.listing-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-detail-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem 1rem;
  margin: 0.85rem 0;
}

.listing-detail-facts dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin: 0;
}

.listing-detail-facts dd {
  margin: 0.1rem 0 0;
  font-weight: 600;
}

.listing-detail-photo-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .listing-detail-photo-list {
    grid-template-columns: 1fr 1fr;
  }
}

.listing-detail-photo-card {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.listing-detail-photo-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #e8e2d7;
}

.listing-detail-photo-card figcaption {
  padding: 0.45rem 0.65rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.9rem;
}

.public-listing-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #e8e2d7;
  display: block;
}

.public-listing-body {
  padding: 0.75rem 0.85rem 1rem;
}

.public-listing-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.public-listing-price {
  font-weight: 700;
  color: var(--accent-dark, #2f5440);
  margin: 0.35rem 0;
}

.public-listing-farm {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
}

.public-listing-meta,
.public-listing-pedigree {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.rabbit-sale-modal {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rabbit-sale-modal.hidden {
  display: none;
}

.rabbit-sale-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(31, 42, 36, 0.45);
  cursor: default;
}

.rabbit-sale-modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 2rem));
  max-height: min(92vh, 860px);
  overflow: auto;
  margin: 0;
}

.rabbit-sale-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.sale-photo-group-title {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
}

.sale-photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .sale-photo-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.sale-photo-slot {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem;
  background: #fff;
}

.sale-photo-slot.is-required {
  border-color: #9a7b4a;
}

.sale-photo-slot.has-photo {
  border-color: var(--accent, #2f5440);
}

.sale-photo-slot-preview {
  position: relative;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #e8e2d7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sale-photo-slot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.sale-photo-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  padding: 0.35rem;
  line-height: 1.2;
}

.sale-photo-slot-empty .camera-icon {
  opacity: 0.65;
}

.sale-photo-picker {
  position: absolute;
  right: 0.3rem;
  bottom: 0.3rem;
  z-index: 2;
}

.sale-photo-menu-wrap .rabbit-photo-menu-btn {
  width: 2rem;
  height: 2rem;
}

.sale-photo-menu-wrap .rabbit-photo-menu-btn .camera-icon {
  width: 16px;
  height: 16px;
}

.sale-photo-slot-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.sale-photo-slot-meta strong {
  display: block;
  margin-bottom: 0.25rem;
}

.sale-photo-slot-meta .muted {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.sale-photo-slot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.sale-photo-camera-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sale-photo-camera-btn .camera-icon {
  flex: 0 0 auto;
}

.sale-camera-panel {
  margin-top: 1rem;
  max-width: 100%;
}

.sale-camera-panel video {
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius);
  background: #111;
}

.public-listing-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.4rem;
  margin: 0.65rem 0 0.25rem;
}

.public-listing-gallery-item {
  margin: 0;
}

.public-listing-gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  background: #e8e2d7;
}

.public-listing-gallery-item figcaption {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.15rem;
  line-height: 1.2;
}

.rabbit-sale-photo-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.rabbit-sale-preview {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #e8e2d7;
  flex-shrink: 0;
}

.selling-disclaimer {
  max-height: min(50vh, 22rem);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f7f4ef;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}

.selling-disclaimer-inner p {
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.selling-disclaimer-inner p:last-child {
  margin-bottom: 0;
}

.selling-disclaimer-end {
  text-align: center;
  margin-top: 1rem !important;
  padding-bottom: 0.25rem;
}

.selling-disclaimer-read {
  border-color: var(--accent, #2f5440);
}

.selling-enable-form {
  margin-top: 0.25rem;
}

.selling-enable-form .selling-enable-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.75rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text, #1f2a24);
  cursor: pointer;
  line-height: 1.35;
}

.selling-enable-form .selling-enable-label input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  flex: 0 0 auto;
  margin: 0.15rem 0 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--accent, #2f5440);
}

.selling-enable-form .selling-enable-label span {
  flex: 1 1 auto;
  min-width: 0;
}

.selling-enable-hint {
  margin: 0 0 0 1.8rem;
  max-width: 40rem;
}

.selling-enable-actions {
  margin: 0.85rem 0 0;
}

.marketplace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.marketplace-manage-card {
  margin-bottom: 1.25rem;
}

.marketplace-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}

.sale-public-fields-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.5rem 0 0.75rem;
}

.sale-public-field-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.sale-public-field-option input {
  width: auto;
  margin: 0.2rem 0 0;
  flex: 0 0 auto;
}

.sale-public-field-option span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.sale-public-field-option .muted {
  font-size: 0.85rem;
}

.sale-list-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.sale-list-checkbox input {
  width: auto;
  margin: 0;
}

.sale-age-preview {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}

.listing-detail-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.listing-detail-history-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.4;
}

.listing-detail-history-list li:last-child {
  border-bottom: none;
}

.public-awards-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.public-awards-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-menu a.nav-menu-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.9rem;
  border: none;
  background: transparent;
  color: inherit;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.nav-menu a.nav-menu-link:hover {
  background: rgba(61, 107, 79, 0.08);
}

.health-disclaimer {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7f3ea;
  font-size: 0.92rem;
  line-height: 1.4;
}

.health-symptom-search {
  margin-bottom: 0.65rem;
}

.health-symptom-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.health-symptom-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: inherit;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.health-symptom-chip:hover,
.health-symptom-chip.is-selected {
  border-color: var(--accent);
  background: rgba(61, 107, 79, 0.1);
  color: var(--accent-dark);
}

.health-condition-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0 0 0.75rem;
  background: #fff;
}

.health-condition-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.health-condition-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.health-source-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.health-source-list li {
  margin: 0.2rem 0;
  font-size: 0.9rem;
  word-break: break-word;
}

.health-source-list a {
  text-decoration: underline;
}

.health-research-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.health-lookup-empty {
  margin: 0;
}
