:root {
  --bg: #eef3f1;
  --paper: #ffffff;
  --ink: #173735;
  --muted: #60736f;
  --line: #d6e1dd;
  --green: #0d766c;
  --green-soft: #e4f1ec;
  --red: #b44c41;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

body::before {
  display: none;
}

body.modalOpen {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.importBtn {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  padding: 9px 13px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}

button.secondary {
  border-color: #a9c3bc;
  background: #fff;
  color: var(--ink);
}

.importBtn input {
  display: none;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  color: var(--ink);
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

p,
#countText,
.muted {
  color: var(--muted);
}

.toolbar,
.formActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar {
  position: static;
  width: auto;
  max-width: 100%;
  padding: 0;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}

.toolbar button,
.toolbar .importBtn {
  flex: 0 0 auto;
  width: auto;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  box-shadow: none;
}

#homeBtn,
#memberBtn {
  order: 1;
  border-color: #a9c3bc;
  background: #fff;
  color: var(--ink);
}

#memberBtn {
  order: 3;
}

#addBtn {
  order: 2;
  flex: 0 0 auto;
  min-height: 42px;
  font-size: 14px;
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  font-weight: 800;
  box-shadow: none;
}

.brandBlock {
  display: grid;
  gap: 5px;
}

.brandKicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.detailPanel {
  display: grid;
  grid-template-columns: 1fr;
  min-width: 0;
  gap: 16px;
  margin-bottom: 16px;
}

.detailPanel > * {
  min-width: 0;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.catalogPanel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.catalogTop,
.detailHeader {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.catalogTop {
  padding: 0 0 18px;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.catalogControls {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.catalogControls input {
  width: min(760px, 62vw);
  min-height: 48px;
  font-size: 16px;
}

.catalogControls #searchBtn {
  min-height: 48px;
  white-space: nowrap;
}

.catalogControls label {
  min-width: 110px;
}

.askPanel {
  margin: 0 0 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.askPanel summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  cursor: pointer;
  list-style: none;
}

.askPanel summary::-webkit-details-marker {
  display: none;
}

.askPanel summary span {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.askPanel summary strong {
  font-size: 15px;
}

.askPanel summary::after {
  content: "+";
  margin-left: auto;
  color: var(--green);
  font-size: 22px;
}

.askPanel[open] summary::after {
  content: "−";
}

.askContent {
  display: grid;
  gap: 12px;
  padding: 0 0 18px;
}

.askIntro {
  display: grid;
  gap: 5px;
}

.askIntro p {
  font-size: 13px;
}

.askBox {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.askBox textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
}

.askQuick,
.askSources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.askQuick button {
  min-height: 32px;
  padding: 6px 10px;
  border-color: #b8cec7;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.askAnswer {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  line-height: 1.7;
  min-height: 48px;
}

.askSources a,
.askSources span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #b8cec7;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  text-decoration: none;
  font-size: 12px;
}

.homeBoards {
  display: block;
}

.newsBoard,
.showcaseBoard {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.newsBoard {
  margin-top: 34px;
}

.boardTitle {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.boardTitle p {
  font-size: 13px;
}

.newsTicker {
  height: auto;
  overflow: visible;
  position: static;
}

.newsTicker::before,
.newsTicker::after {
  display: none;
}

.newsTicker::before {
  top: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), transparent);
}

.newsTicker::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(255, 255, 255, .95), transparent);
}

.newsTrack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 0 0;
  animation: none;
}

.newsTicker:hover .newsTrack {
  animation: none;
}

.newsItem {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 92px;
  padding: 12px;
  text-align: left;
  white-space: normal;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
}

.newsItem span {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.newsItem b {
  font-size: 15px;
}

.newsItem em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

@keyframes newsScroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.catalogGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  padding: 14px 0 0;
}

.pigeonCard {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  width: 100%;
  min-height: 118px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  white-space: normal;
}

.pigeonCard:hover {
  border-color: var(--green);
  transform: none;
  box-shadow: none;
}

.cardPhoto {
  width: 92px;
  aspect-ratio: 1;
  border-radius: 7px;
  background: #eaf1ee;
  color: var(--muted);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 13px;
}

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

.cardPhoto img,
.photoZoomButton img,
.thumbStrip img,
.relativeCard img {
  cursor: zoom-in;
}

.cardBody {
  display: grid;
  align-content: start;
  gap: 5px;
}

.cardBody b,
.cardNickname,
.cardBody small,
.cardBody em {
  display: block;
}

.cardBody b {
  font-size: 17px;
  line-height: 1.25;
}

.cardBody small {
  color: var(--green);
  font-weight: 700;
}

.cardBody em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.45;
}

.cardNickname {
  color: var(--green);
  font-size: 12px;
  line-height: 1.35;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.pager button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.detailSection {
  display: block;
}

.detailHeader {
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

#detailHint {
  color: var(--muted);
  font-weight: 700;
}

.shareActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.shareDetailStatus {
  max-width: 280px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.photoBox,
.profileBox,
.tableWrap,
.editor {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(28, 112, 160, .18);
  backdrop-filter: blur(10px);
}

.detailPhotoStage {
  display: grid;
  width: min(100%, 680px);
  min-width: 0;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
}

.detailPhotoStage .photoBox {
  width: 100%;
}

.photoBox {
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  align-content: center;
}

.photoBox img {
  width: 100%;
  height: 100%;
  max-height: min(72vh, 640px);
  object-fit: contain;
  background: #e9f7ff;
}

.photoZoomButton {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #e9f7ff;
  box-shadow: none;
}

.thumbStrip {
  width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
}

.thumbStrip button {
  width: 72px;
  min-width: 72px;
  height: 72px;
  padding: 0;
  border: 1px solid var(--line);
  background: #d7f0ff;
}

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

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

.photoModal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(7, 20, 31, .88);
  backdrop-filter: blur(8px);
}

.photoModalBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: #fff;
  background: rgba(4, 24, 39, .78);
}

.photoModalStage {
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 18px;
}

.photoModalStage img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  image-rendering: auto;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.profileBox {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

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

.profileTitle strong {
  display: block;
  font-size: 30px;
  line-height: 1.15;
}

.profileTitle span {
  color: var(--muted);
}

.profileTitle small {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 13px;
}

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

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

.infoItem,
.relationItem {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .78);
  padding: 10px;
  min-height: 64px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pedigreeBook {
  border: 2px solid var(--ink);
  background: #fffef9;
  width: 100%;
  overflow: hidden;
  box-shadow: inset 0 0 0 4px rgba(83, 181, 231, .1);
}

.pedigreeBrand,
.pedigreeHead,
.pedigreeIdentity {
  display: grid;
  border-bottom: 2px solid var(--ink);
}

.pedigreeBrand {
  place-items: center;
  min-height: 42px;
  font-weight: 700;
}

.pedigreeHead {
  grid-template-columns: 1fr 1fr 1fr;
  min-height: 48px;
  align-items: center;
  text-align: center;
}

.pedigreeHead strong {
  font-size: 24px;
}

.pedigreeIdentity {
  grid-template-columns: 1fr 1fr;
}

.pedigreeIdentity > div,
.pedigreeHead > div,
.pedigreeHead > strong {
  padding: 12px;
}

.pedigreeIdentity > div:not(:last-child),
.pedigreeHead > *:not(:last-child) {
  border-right: 2px solid var(--ink);
}

.pedigreeScroll {
  overflow: visible;
  background: #fff;
}

.pedigreeGrid {
  display: grid;
  min-width: 0;
}

.pedigreeGenerationRow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  grid-column: 1 / -1;
  border-bottom: 1px solid rgba(18, 48, 71, .48);
}

.pedigreeGenerationRow.generation-4,
.pedigreeGenerationRow.generation-8,
.pedigreeGenerationRow.generation-16 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 760px) {
  .pedigreeGenerationRow.generation-4,
  .pedigreeGenerationRow.generation-8,
  .pedigreeGenerationRow.generation-16 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pedigreeGenerationRow:last-child {
  border-bottom: 0;
}

.pedigreeNode {
  min-width: 0;
  min-height: 104px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-right: 1px solid rgba(18, 48, 71, .34);
  overflow-wrap: anywhere;
}

.pedigreeGenerationRow .pedigreeNode:last-child {
  border-right: 0;
}

.pedigreeNode.generation-1 {
  min-height: 126px;
  padding: 14px;
}

.pedigreeNode.generation-2 {
  min-height: 116px;
}

.pedigreeNode.generation-3,
.pedigreeNode.generation-4 {
  min-height: 108px;
}

.pedigreeNode.father {
  background: rgba(236, 250, 255, .72);
}

.pedigreeNode.mother {
  background: rgba(255, 247, 244, .72);
}

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

.pedigreeScrollHint {
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(18, 48, 71, .24);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.homeAskResult {
  display: grid;
  gap: 10px;
  margin: -4px 0 18px;
  padding: 14px;
  border: 1px solid #a9cfc4;
  border-left: 4px solid var(--green);
  border-radius: 7px;
  background: #f7fcf9;
  line-height: 1.7;
}

.homeAskResultHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.homeAskResultHead strong {
  color: var(--ink);
}

.homeAskResultHead span,
.askStatus {
  color: var(--muted);
  font-size: 12px;
}

.homeAskResultBody {
  color: var(--ink);
}

.homeAskResult button {
  justify-self: start;
}

.askStatus {
  min-height: 18px;
  margin: 0;
}

.askLoading {
  color: var(--muted);
  border-style: dashed;
}

.askAi {
  border-color: #a9cfc4;
}

.askFallback {
  border-color: #d8cda9;
  background: #fffdf5;
}

.pedigreeBook span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.relativeStrip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.relativeCard {
  width: 148px;
  min-width: 148px;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
  text-align: left;
  white-space: normal;
}

.relativeCard img,
.relativeNoPhoto {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 5px;
  object-fit: cover;
  background: #d7f0ff;
  display: grid;
  place-items: center;
  color: var(--muted);
  margin-bottom: 8px;
}

.relativeCard b,
.relativeCard small {
  display: block;
}

.relativeCard small {
  color: var(--muted);
  margin-top: 3px;
}

.achievementBox {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .78);
  padding: 12px;
  line-height: 1.75;
  max-height: 240px;
  overflow: auto;
}

.infoItem span,
.relationItem span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.ringLink {
  border: 0;
  padding: 0;
  background: transparent;
  color: #006f98;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  white-space: normal;
}

.ringMissing {
  color: var(--muted);
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.controls input {
  max-width: 560px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .88);
  color: var(--ink);
  padding: 9px 10px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(32, 111, 84, .12);
}

.tableWrap {
  overflow: auto;
  max-height: 48vh;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1480px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #e6f7ff, #cbefff);
  font-weight: 700;
}

tbody tr:hover,
tbody tr.active {
  background: var(--green-soft);
}

.empty {
  color: var(--muted);
}

.rowActions {
  display: flex;
  gap: 6px;
}

.rowActions button {
  padding: 6px 9px;
}

.rowActions .delete {
  border-color: var(--red);
  background: var(--red);
}

.editor {
  margin-top: 16px;
  padding: 16px;
}

form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.wide {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  body {
    padding-bottom: 0;
  }

  .page {
    width: min(100% - 18px, 760px);
    padding: 12px 0 28px;
  }

  .header,
  .detailPanel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .header {
    flex-direction: column;
    margin-bottom: 10px;
  }

  .header p {
    font-size: 13px;
  }

  .catalogTop,
  .detailHeader {
    align-items: stretch;
    flex-direction: column;
  }

  .newsTicker {
    height: auto;
  }

  .catalogControls input {
    width: 100%;
  }

  .infoGrid,
  form {
    grid-template-columns: 1fr 1fr;
  }

  .relationGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 560px) {
  .controls,
  .formActions,
  .catalogControls,
  .pager {
    align-items: stretch;
    flex-direction: column;
  }

  .catalogControls #searchBtn,
  .catalogControls label {
    width: 100%;
  }

  .shareActions {
    width: 100%;
    justify-content: space-between;
    align-items: flex-start;
  }

  .shareDetailStatus {
    flex: 1;
    max-width: none;
    padding-top: 4px;
  }

  .page {
    width: calc(100% - 12px);
    padding-right: 0;
  }

  h1 {
    font-size: 28px;
  }

  .askIntro p {
    display: none;
  }

  .askAnswer {
    max-height: 110px;
    overflow: auto;
  }

  .askBox {
    grid-template-columns: 1fr;
  }

  .askBox button {
    width: 100%;
  }

  .pigeonCard {
    grid-template-columns: 76px 1fr;
  }

  .cardPhoto {
    width: 76px;
  }

  .photoModalStage {
    padding: 10px;
    place-items: start;
  }

  .infoGrid,
  form {
    grid-template-columns: 1fr;
  }

  .relationGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pedigreeHead,
  .pedigreeIdentity {
    grid-template-columns: 1fr;
  }

  .pedigreeIdentity > div:not(:last-child),
  .pedigreeHead > *:not(:last-child) {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }

}

@media (max-width: 700px) {
  body {
    padding-bottom: 84px;
  }

  .toolbar {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 20;
    display: flex;
    width: auto;
    max-width: none;
    padding: 7px;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 55, 53, .14);
  }

  .toolbar button,
  .toolbar .importBtn {
    flex: 1;
    width: auto;
    min-height: 42px;
    padding: 7px 8px;
    font-size: 13px;
  }

  #addBtn {
    flex: 1.35;
    min-height: 42px;
  }

  .newsTrack {
    grid-template-columns: 1fr;
  }
}

/* Detail gallery and pedigree book: both columns must stay visible without page scrolling. */
.detailPhotoStage {
  display: grid;
  width: min(100%, 680px);
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  justify-self: center;
}

.detailGallery {
  display: grid;
  gap: 12px;
  width: 100%;
}

.galleryPhotoButton {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e9f7ff;
}

.galleryPhotoButton img {
  display: block;
  width: 100%;
  max-height: min(65vh, 560px);
  object-fit: contain;
}

.galleryPhotoButton span {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 4px 8px;
  border-radius: 4px;
  color: #fff;
  background: rgba(9, 38, 52, .76);
  font-size: 12px;
}

.pedigreeBranchPair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.pedigreeBranch {
  min-width: 0;
  overflow: hidden;
}

.pedigreeBranch:first-child {
  border-right: 2px solid var(--ink);
}

.pedigreeBranch h4 {
  margin: 0;
  padding: 11px 12px;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font-size: 18px;
  text-align: center;
}

.fatherBranch h4 { background: #eaf7fb; }
.motherBranch h4 { background: #fff4ef; }

.pedigreeBranchGeneration {
  display: grid;
  min-width: 0;
  border-bottom: 1px solid rgba(18, 48, 71, .42);
}

.pedigreeBranchGeneration.generation-1 { grid-template-columns: minmax(0, 1fr); }
.pedigreeBranchGeneration.generation-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pedigreeBranchGeneration.generation-3,
.pedigreeBranchGeneration.generation-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.pedigreeBranchGeneration .pedigreeNode {
  min-width: 0;
  min-height: 94px;
  padding: 9px;
  border-right: 1px solid rgba(18, 48, 71, .34);
  border-bottom: 1px solid rgba(18, 48, 71, .2);
}

.pedigreeBranchGeneration .pedigreeNode:nth-child(2n) { border-right: 0; }
.pedigreeBranchGeneration.generation-1 .pedigreeNode { border-right: 0; }
.pedigreeBranchGeneration .pedigreeNode:last-child { border-bottom: 0; }

.pedigreeBranchGeneration.generation-1 .pedigreeNode { min-height: 116px; }
.pedigreeBranchGeneration.generation-2 .pedigreeNode { min-height: 106px; }

.pedigreeScrollHint {
  margin: 0;
  padding: 10px 12px;
}

.pedigreeExportActions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.pedigreeExportStatus {
  color: var(--muted);
  font-size: 13px;
}

.sourceInfo {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.askVoteActions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.askVoteSummary {
  margin-right: 4px;
  color: var(--muted);
  font-size: 13px;
}

.askVoteActions button {
  padding: 7px 11px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.askVoteActions button.active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.askHotQuestions {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.askHotQuestions h3 { margin: 0 0 8px; font-size: 16px; }

.askHotQuestions ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding-left: 24px;
}

.askHotQuestions li { min-width: 0; }

.askHotQuestions li button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.askHotQuestions li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.askHotQuestions li small { color: var(--muted); white-space: nowrap; }

@media (max-width: 560px) {
  .askAnswer { max-height: none; overflow: visible; }
  .pedigreeHead strong { font-size: 17px; }
  .pedigreeBranch h4 { padding: 8px 5px; font-size: 15px; }
  .pedigreeBranchGeneration .pedigreeNode { min-height: 88px; padding: 7px; }
  .pedigreeNode small { font-size: 10px; }
  .askHotQuestions ol { grid-template-columns: 1fr; }
}
