/* Information hierarchy only: combat definitions and calculations are unchanged. */
#game-root .kungfu-page {
  grid-template-rows: auto auto minmax(0, 1fr);
}
#game-root .kungfu-page > .feature-page-heading {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
}
#game-root .kungfu-page .page-back-button {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}
#game-root .kungfu-page__aura {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  text-align: right;
  color: #344d43 !important;
  font-size: 14px;
  line-height: 1.5;
  min-width: 0;
}
#game-root .kungfu-page__aura b {
  display: block;
  color: #344d43 !important;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#game-root .kungfu-card {
  padding: 12px !important;
  gap: 9px;
  border-radius: 12px;
  min-width: 0;
}
#game-root .kungfu-card__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
#game-root .kungfu-card__heading .kungfu-card__identity { min-width: 0; }
#game-root .kungfu-card__heading strong {
  color: #203f3d !important;
  font-size: 20px !important;
  line-height: 1.35;
}
#game-root .kungfu-card__heading > span {
  font-size: 15px !important;
  white-space: nowrap;
  color: #344d43 !important;
}
#game-root .kungfu-card__meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #435d50;
}
#game-root .kungfu-card__effects {
  padding: 11px 12px;
  border: 1px solid #ae9861;
  border-radius: 9px;
  background: #e9e7d2a6;
}
#game-root .kungfu-card .kungfu-card__current-effect,
#game-root .kungfu-card .kungfu-card__progression,
#game-root .kungfu-card .kungfu-card__milestones {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: none !important;
  box-shadow: none !important;
  color: #203f3d !important;
}
#game-root .kungfu-card .kungfu-card__current-effect strong,
#game-root .kungfu-card .kungfu-card__current-effect span {
  font-size: 15px !important;
  line-height: 1.6;
  font-weight: 500;
  color: #203f3d !important;
  overflow-wrap: anywhere;
}
#game-root .kungfu-card .kungfu-card__current-effect > strong:first-child { font-weight: 600; }
#game-root .kungfu-card .kungfu-card__milestones { margin-top: 9px !important; gap: 5px; }
#game-root .kungfu-card__milestone-title { font-size: 14px; font-weight: 500; color: #435d50; }
#game-root .kungfu-card .kungfu-card__milestone {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: #718071 !important;
  font-size: 14px !important;
  line-height: 1.65;
  font-weight: 400 !important;
  text-shadow: none !important;
}
#game-root .kungfu-card .kungfu-card__milestone[data-active="true"] {
  color: #94650d !important;
  font-weight: 600 !important;
  text-shadow: 0 1px #fff5d7 !important;
}
#game-root .kungfu-card__footer { gap: 10px; align-items: center; flex-wrap: wrap; }
#game-root .kungfu-card__footer span { font-size: 13px !important; line-height: 1.5; }
#game-root .kungfu-card .kungfu-upgrade-button { min-height: 36px; min-width: 90px; padding: 6px 14px; }

#game-root dialog.sect-kungfu-library-dialog {
  width: min(calc(var(--game-design-width) - 36px), 480px) !important;
  max-width: 480px !important;
  max-height: 82vh !important;
}
#game-root .sect-kungfu-library__list { max-height: min(64vh, 600px); }
#game-root .sect-kungfu-row.sect-kungfu-row--compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px;
  align-items: center;
  gap: 10px;
  padding: 11px 9px;
  min-width: 0;
}
#game-root .sect-kungfu-row--compact.sect-kungfu-row--illustrated {
  grid-template-columns: 38px minmax(0, 1fr) 80px;
}
#game-root .sect-kungfu-row--compact > .kungfu-item-art { width: 38px; height: 46px; flex-basis: 38px; }
#game-root .sect-kungfu-row__copy { min-width: 0; }
#game-root .sect-kungfu-row__heading { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
#game-root .sect-kungfu-row--compact .sect-kungfu-row__name {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  text-align: left;
  font-size: 18px !important;
  line-height: 1.4;
  font-weight: 600;
}
#game-root .sect-kungfu-row--compact .sect-kungfu-row__type { padding: 0; font-size: 11px !important; }
#game-root .sect-kungfu-row__summary { margin: 4px 0 0; font-size: 15px; line-height: 1.55; color: #344d43; }
#game-root .sect-kungfu-row--compact .sect-kungfu-row__exchange { min-width: 0; min-height: 36px; padding: 5px 6px; font-size: 12px; }
#game-root .sect-kungfu-detail__description { font-size: 16px !important; line-height: 1.8; }
@media (max-width: 360px) {
  #game-root .kungfu-card { padding: 10px !important; }
  #game-root .kungfu-card__heading strong { font-size: 18px !important; }
  #game-root .kungfu-card__effects { padding: 9px; }
  #game-root .sect-kungfu-row--compact.sect-kungfu-row--illustrated { grid-template-columns: 30px minmax(0, 1fr) 72px; gap: 7px; }
  #game-root .sect-kungfu-row--compact > .kungfu-item-art { width: 30px; height: 40px; }
}
