.tracker {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.65rem 0.5rem;
  gap: 0;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.2);
}

.title {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.round {
  font-size: 0.6rem;
  color: var(--text-tertiary);
}

.phaseLabel {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin-bottom: 0.5rem;
}

/* ── Section blocks ── */

.section {
  padding: 0.4rem 0.35rem;
  border-radius: 3px;
  border: 1px solid transparent;
  margin-bottom: 0.4rem;
  transition: border-color 0.15s, background 0.15s;
}

.activeSection {
  border-color: rgba(var(--gold-rgb), 0.35);
  background: rgba(var(--gold-rgb), 0.04);
  box-shadow: inset 2px 0 0 var(--gold);
}

.sectionLabel {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.rollSummary {
  font-weight: 400;
  font-family: inherit;
  color: var(--text-tertiary);
  font-size: 0.58rem;
}

/* ── Combatant rows ── */

.rollRow,
.combatantRow {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0;
  min-height: 1.6rem;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.enemyDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(var(--gold-rgb), 0.3);
  flex-shrink: 0;
}

.rollName {
  font-size: 0.68rem;
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activeName {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: 700;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rollValue {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 20px;
  text-align: right;
  flex-shrink: 0;
}

.rollPending {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  min-width: 20px;
  text-align: right;
  flex-shrink: 0;
}

.rollBtn {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.4rem;
  background: rgba(var(--gold-rgb), 0.85);
  border: none;
  border-radius: 3px;
  color: var(--btn-active-text);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.rollBtn:hover {
  filter: brightness(1.1);
}

/* ── Enemy HP ── */

.enemyHp {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
}

.hpInput {
  width: 32px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--hp, #e05a5a);
  background: var(--bg-input, rgba(0,0,0,0.3));
  border: 1px solid rgba(var(--gold-rgb), 0.15);
  border-radius: 2px;
  padding: 0.1rem 0.2rem;
  text-align: center;
}

.hpInput:focus {
  outline: none;
  border-color: rgba(var(--gold-rgb), 0.4);
}

/* Remove arrows on number inputs */
.hpInput::-webkit-inner-spin-button,
.hpInput::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.hpMax {
  font-size: 0.58rem;
  color: var(--text-tertiary);
}

.removeBtn {
  font-size: 0.6rem;
  padding: 0.1rem 0.25rem;
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--text-tertiary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.12s;
}

.removeBtn:hover {
  color: var(--danger, #c0392b);
  border-color: rgba(var(--danger-rgb), 0.3);
}

/* ── Add enemy form ── */

.addEnemyBtn {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  background: transparent;
  border: 1px dashed rgba(var(--gold-rgb), 0.25);
  border-radius: 3px;
  color: var(--text-tertiary);
  cursor: pointer;
  width: 100%;
  margin-top: 0.25rem;
  transition: all 0.12s;
}

.addEnemyBtn:hover {
  border-color: rgba(var(--gold-rgb), 0.45);
  color: var(--gold);
}

.addEnemyForm {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.3rem;
}

.addEnemyInput {
  font-size: 0.65rem;
  background: var(--bg-input, rgba(0,0,0,0.3));
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  border-radius: 3px;
  padding: 0.25rem 0.4rem;
  color: var(--text-primary);
  width: 100%;
}

.addEnemyInput:focus {
  outline: none;
  border-color: rgba(var(--gold-rgb), 0.45);
}

/* ── Footer buttons ── */

.footer {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(var(--gold-rgb), 0.12);
  display: flex;
  gap: 0.3rem;
}

.primaryBtn {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.5rem;
  background: rgba(var(--gold-rgb), 0.85);
  border: none;
  border-radius: 3px;
  color: var(--btn-active-text);
  cursor: pointer;
  flex: 1;
  transition: filter 0.12s;
}

.primaryBtn:hover:not(:disabled) {
  filter: brightness(1.1);
}

.primaryBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.outlineBtn {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.5rem;
  background: transparent;
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  border-radius: 3px;
  color: var(--text-secondary);
  cursor: pointer;
  flex: 1;
  transition: all 0.12s;
}

.outlineBtn:hover {
  border-color: rgba(var(--gold-rgb), 0.5);
  color: var(--gold);
}
