/* Coat of Arms — standalone heraldry generator */
.arms-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  grid-auto-rows: 1fr;                     /* every card the same height */
  gap: 1rem; max-width: 78rem; margin: 1.2rem auto 0; padding: 0 .8rem 1.5rem;
}
.arms-card {
  margin: 0; background: #fdf1dc; border: 1px solid #c9ad6a; border-radius: 10px;
  padding: 1rem .9rem .7rem; display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 1px 4px rgba(80, 50, 20, .18);
}
.arms-shield {
  width: 11rem; height: 12.5rem;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3));
}
.arms-shield svg { width: 100%; height: 100%; }
/* caption fills the rest of the card: blazon+gloss on top, then flexible
   space, with the swatch/description line and the buttons pinned at the
   bottom so they align across all cards */
.arms-card figcaption {
  text-align: center; margin-top: .7rem; width: 100%;
  flex: 1; display: flex; flex-direction: column;
}
.arms-blazon {
  font-style: italic; color: #58180D; font-size: .95rem;
  line-height: 1.35; margin: 0 0 .35rem;
}
.arms-gloss {
  font-size: .8rem; color: #6a5638; line-height: 1.3; margin: 0 0 .4rem;
}
/* charge-tag chips — pinned with the detail line at the card's bottom */
.arms-tags {
  margin: auto 0 .35rem; display: flex; flex-wrap: wrap; gap: .25rem;
  justify-content: center;
}
.arms-tag {
  font-family: ScalySansSmallCaps, ScalySans, sans-serif; font-size: .68rem;
  background: #e6dcc0; color: #58180D; border: 1px solid #c9ad6a;
  border-radius: 1rem; padding: .02rem .45rem;
}
.arms-detail { margin: auto 0 .45rem; font-size: .78rem; color: #6a5638; }
.arms-tags + .arms-detail { margin-top: 0; }
.arms-swatch {
  display: inline-block; width: .8rem; height: .8rem; border-radius: 2px;
  border: 1px solid #8a7250; vertical-align: -2px; margin-right: .2rem;
}
.arms-shape {
  font-family: ScalySansSmallCaps, ScalySans, sans-serif; margin-left: .3rem;
}
.arms-actions { margin: 0; display: flex; gap: .4rem; justify-content: center; }
.arms-actions button {
  font-family: ScalySansSmallCaps, ScalySans, sans-serif;
  background: #EEE5CE; color: #58180D; border: 1px solid #c9ad6a;
  border-radius: .25rem; padding: .22rem .6rem; cursor: pointer; font-size: .8rem;
  margin: 0;
}
.arms-actions button:hover { background: #faf7ea; }
.char-sheet-empty .muted { color: #7a6a4f; font-size: .9rem; }

/* the Count number input matches the toolbar selects */
.sheet-controls input[type="number"] {
  font-family: ScalySans, sans-serif; font-size: .95rem;
  padding: .35rem .4rem; background: #EEE5CE; color: #1f1508;
  border: 1px solid #c9ad6a; border-radius: .2rem; width: 100%;
  box-sizing: border-box;
}
