/* The fight's ability row (ability-bar.js): four slim slots in the grade
   buttons' columns, 12px above them so neither is misclicked. The selected
   one wears a gold rim and a marker; locked ones are greyed with a padlock. */
.ability-bar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
  margin: 8px 0 -4px; /* with .answer-actions' own top margin: a clear 12px gap */
}
.ability-slot {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 30px;
  border: 1px solid var(--card-line, #c4ccc8);
  border-radius: 6px;
  background: var(--surface-2, #f4f1e8);
  color: var(--ink, #2c2a24);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.ability-slot button {
  margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; box-shadow: none; cursor: pointer;
}
.ability-icon {
  flex: none;
  width: 28px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--card-line, #c4ccc8) !important;
  background: rgba(0, 0, 0, .06) !important;
}
.ability-icon:hover { background: rgba(0, 0, 0, .12) !important; }
.ability-glyph { display: grid; place-items: center; }
.ability-glyph svg { width: 16px; height: 16px; }
.ability-name {
  flex: 1;
  min-width: 0;
  font: 700 12px/1 var(--font-ui, Inter, system-ui, sans-serif) !important;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Discreet on purpose: the card is what matters. The row sits back (dimmed);
   the selected ability keeps the same surface, with only a muted gold edge,
   gold-tinted text and a small dot -- no fill, no glow. */
.ability-slot { opacity: .72; }
.ability-slot.is-selected {
  opacity: 1;
  border-color: rgba(200, 160, 80, .75);
  box-shadow: inset 0 -2px 0 rgba(200, 160, 80, .55);
  color: #d9b770;
}
.ability-slot.is-selected .ability-name::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}
.ability-slot.is-locked {
  opacity: .5;
  justify-content: center;
  align-items: center;
  gap: 4px;
  font: 700 11px/1 var(--font-ui, Inter, system-ui, sans-serif);
}
.ability-slot.is-locked .ability-glyph svg { width: 12px; height: 12px; }
.ability-slot.is-locked .ability-name { flex: none; }

/* The info panel: above the row, the attack animation beside two lines. */
.ability-info {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px 8px 6px;
  border: 1px solid var(--card-line, #c4ccc8);
  border-radius: 8px;
  background: var(--card-bg, #fffdf8);
  color: var(--ink, #2c2a24);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  animation: ability-info-in .16s ease-out;
}
.ability-info-stage { flex: none; width: 96px; height: 96px; }
.ability-info-stage canvas { display: block; width: 96px; height: 96px; } /* frames are drawn at 2x */
.ability-info-text { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; line-height: 1.35; text-align: left; }
.ability-info-text strong { font-weight: 700; }
.ability-info-text em { font-size: 11.5px; opacity: .78; }
@keyframes ability-info-in { from { opacity: 0; transform: translateY(4px); } }
[data-reduced-motion=true] .ability-info { animation: none; }
/* in a fight, the same width and gaps as the grade buttons: the columns line up */
.encounter-sheet.is-reading .ability-bar { width: min(100%, 960px); gap: 8px; }
